diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 4e50c4bd6..5cde8c527 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -212,7 +212,7 @@ bool GEOM_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject, CORBA::Object_ptr theObject, const char* theName) - throw (SALOME::SALOME_Exception) + { Unexpect aCatch(SALOME_SalomeException); SALOMEDS::SObject_var aResultSO; @@ -2237,7 +2237,6 @@ void GEOM_Gen_i::Redo() // purpose : //============================================================================ GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations() - throw ( SALOME::SALOME_Exception ) { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetIBasicOperations" ); @@ -2259,7 +2258,6 @@ GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations() // purpose : //============================================================================ GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations() - throw ( SALOME::SALOME_Exception ) { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetITransformOperations" ); @@ -2279,7 +2277,7 @@ GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations() // purpose : //============================================================================ GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetI3DPrimOperations" ); @@ -2300,7 +2298,7 @@ GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations() // purpose : //============================================================================ GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetIShapesOperations" ); @@ -2320,7 +2318,7 @@ GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations() // purpose : //============================================================================ GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetIBlocksOperations" ); @@ -2340,7 +2338,7 @@ GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations() // purpose : //============================================================================ GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetIBooleanOperations" ); @@ -2360,7 +2358,7 @@ GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations() // purpose : //============================================================================ GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetICurvesOperations" ); @@ -2380,7 +2378,7 @@ GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations() // purpose : //============================================================================ GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetILocalOperations" ); @@ -2400,7 +2398,7 @@ GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations() // purpose : //============================================================================ GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::IHealingOperations" ); @@ -2420,7 +2418,7 @@ GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations() // purpose : //============================================================================ GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetIInsertOperations" ); @@ -2440,7 +2438,7 @@ GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations() // purpose : //============================================================================ GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetIMeasureOperations" ); @@ -2460,7 +2458,7 @@ GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations() // purpose : //============================================================================ GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetIGroupOperations" ); @@ -2480,7 +2478,7 @@ GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations() // purpose : //============================================================================ GEOM::GEOM_IFieldOperations_ptr GEOM_Gen_i::GetIFieldOperations() - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetIFieldOperations" ); @@ -2500,7 +2498,7 @@ GEOM::GEOM_IFieldOperations_ptr GEOM_Gen_i::GetIFieldOperations() // purpose : //============================================================================ GEOM::GEOM_IOperations_ptr GEOM_Gen_i::GetPluginOperations(const char* theLibName) - throw ( SALOME::SALOME_Exception ) + { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "GEOM_Gen_i::GetPluginOperations" ); diff --git a/src/GEOM_I/GEOM_Gen_i.hh b/src/GEOM_I/GEOM_Gen_i.hh index cd515fe03..ce3035be4 100644 --- a/src/GEOM_I/GEOM_Gen_i.hh +++ b/src/GEOM_I/GEOM_Gen_i.hh @@ -150,7 +150,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi bool CanPublishInStudy(CORBA::Object_ptr theIOR); SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject, CORBA::Object_ptr theObject, - const char* theName) throw (SALOME::SALOME_Exception) ; + const char* theName) ; GEOM::ListOfGO* PublishNamedShapesInStudy(CORBA::Object_ptr theObject); @@ -213,60 +213,55 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi //-----------------------------------------------------------------------// //Returns a pointer to BasicOperations interface - virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations() - throw (SALOME::SALOME_Exception); + virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations(); //Returns a pointer to TransformOperations interface - virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations() - throw (SALOME::SALOME_Exception); + virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations(); //Returns a pointer to 3DPrimOperations interface - virtual GEOM::GEOM_I3DPrimOperations_ptr GetI3DPrimOperations() - throw (SALOME::SALOME_Exception); + virtual GEOM::GEOM_I3DPrimOperations_ptr GetI3DPrimOperations(); //Returns a pointer to ShapesOperations interface - virtual GEOM::GEOM_IShapesOperations_ptr GetIShapesOperations() - throw (SALOME::SALOME_Exception); + virtual GEOM::GEOM_IShapesOperations_ptr GetIShapesOperations(); //Returns a pointer to BlocksOperations interface - virtual GEOM::GEOM_IBlocksOperations_ptr GetIBlocksOperations() - throw (SALOME::SALOME_Exception); + virtual GEOM::GEOM_IBlocksOperations_ptr GetIBlocksOperations(); //Returns a pointer to BooleanOperations interface virtual GEOM::GEOM_IBooleanOperations_ptr GetIBooleanOperations() - throw (SALOME::SALOME_Exception); + ; //Returns a pointer to CurvesOperations interface virtual GEOM::GEOM_ICurvesOperations_ptr GetICurvesOperations() - throw (SALOME::SALOME_Exception); + ; //Returns a pointer to LocalOperations interface virtual GEOM::GEOM_ILocalOperations_ptr GetILocalOperations() - throw (SALOME::SALOME_Exception); + ; //Returns a pointer to HealingOperations interface virtual GEOM::GEOM_IHealingOperations_ptr GetIHealingOperations() - throw (SALOME::SALOME_Exception); + ; //Returns a pointer to InsertOperations interface virtual GEOM::GEOM_IInsertOperations_ptr GetIInsertOperations() - throw (SALOME::SALOME_Exception); + ; //Returns a pointer to MeasureOperations interface virtual GEOM::GEOM_IMeasureOperations_ptr GetIMeasureOperations() - throw (SALOME::SALOME_Exception); + ; //Returns a pointer to GroupOperations interface virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations() - throw (SALOME::SALOME_Exception); + ; //Returns a pointer to FiedlOperations interface virtual GEOM::GEOM_IFieldOperations_ptr GetIFieldOperations() - throw (SALOME::SALOME_Exception); + ; //Returns a pointer to corresponding plugin operations interface virtual GEOM::GEOM_IOperations_ptr GetPluginOperations (const char* theLibName) - throw (SALOME::SALOME_Exception); + ; //Adds a new sub-shape virtual GEOM::GEOM_Object_ptr AddSubShape (GEOM::GEOM_Object_ptr theMainShape, diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 750fe0c35..d77f4a4b2 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -523,7 +523,7 @@ CORBA::Boolean GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR) //============================================================================ SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject, CORBA::Object_ptr theObject, - const char* theName) throw (SALOME::SALOME_Exception) + const char* theName) { if (CORBA::is_nil(myGeomEngine)) setGeomEngine(); diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh index f1f653ad2..1229bf595 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.hh +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -140,7 +140,7 @@ public: CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR); SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject, CORBA::Object_ptr theObject, - const char* theName) throw (SALOME::SALOME_Exception) ; + const char* theName) ; GEOM::ListOfGO* PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject, CORBA::Object_ptr theObject); diff --git a/src/XAO/XAO_BooleanField.cxx b/src/XAO/XAO_BooleanField.cxx index 052d1b752..2d050c068 100644 --- a/src/XAO/XAO_BooleanField.cxx +++ b/src/XAO/XAO_BooleanField.cxx @@ -31,19 +31,16 @@ BooleanField::BooleanField(const XAO::Dimension& dimension, } Step* BooleanField::addNewStep(const int& step) -throw (XAO_Exception) { return addStep(step, 0); } BooleanStep* BooleanField::addStep(const int& step) -throw (XAO_Exception) { return addStep(step, 0); } BooleanStep* BooleanField::addStep(const int& step, const int& stamp) -throw (XAO_Exception) { if (hasStep(step)) throw XAO_Exception(MsgBuilder() << "Step with number " << step << " already exists."); @@ -54,7 +51,6 @@ throw (XAO_Exception) } BooleanStep* BooleanField::getStep(const int& index) -throw (XAO_Exception) { checkStepIndex(index); return (BooleanStep*)m_steps[index]; diff --git a/src/XAO/XAO_BooleanField.hxx b/src/XAO/XAO_BooleanField.hxx index fc49270c6..db6c76af6 100644 --- a/src/XAO/XAO_BooleanField.hxx +++ b/src/XAO/XAO_BooleanField.hxx @@ -53,14 +53,14 @@ namespace XAO virtual const XAO::Type getType() { return XAO::BOOLEAN; } - virtual Step* addNewStep(const int& step) throw (XAO_Exception); + virtual Step* addNewStep(const int& step); /** * Adds a new step. * @param step the number of the step. * @return the newly created step. */ - BooleanStep* addStep(const int& step) throw (XAO_Exception); + BooleanStep* addStep(const int& step); /** * Adds a new step. @@ -68,15 +68,14 @@ namespace XAO * @param stamp the stamp of the step. * @return the newly created step. */ - BooleanStep* addStep(const int& step, const int& stamp) - throw (XAO_Exception); + BooleanStep* addStep(const int& step, const int& stamp); /** * Gets the step of given index. * @param index the index. * @return the step for the given index. */ - BooleanStep* getStep(const int& index) throw (XAO_Exception); + BooleanStep* getStep(const int& index); }; } diff --git a/src/XAO/XAO_BooleanStep.cxx b/src/XAO/XAO_BooleanStep.cxx index 15e875f5b..47849b1ef 100644 --- a/src/XAO/XAO_BooleanStep.cxx +++ b/src/XAO/XAO_BooleanStep.cxx @@ -57,7 +57,6 @@ std::vector BooleanStep::getValues() } std::vector BooleanStep::getElement(const int& element) -throw (XAO_Exception) { checkElementIndex(element); @@ -66,7 +65,6 @@ throw (XAO_Exception) } std::vector BooleanStep::getComponent(const int& component) -throw (XAO_Exception) { checkComponentIndex(component); @@ -84,7 +82,6 @@ throw (XAO_Exception) } const bool BooleanStep::getValue(const int& element, const int& component) -throw (XAO_Exception) { checkElementIndex(element); checkComponentIndex(component); @@ -93,13 +90,11 @@ throw (XAO_Exception) } const std::string BooleanStep::getStringValue(const int& element, const int& component) -throw (XAO_Exception) { return XaoUtils::booleanToString(getValue(element, component)); } void BooleanStep::setValues(const std::vector& values) -throw (XAO_Exception) { checkNbValues((int)values.size()); @@ -113,7 +108,6 @@ throw (XAO_Exception) } void BooleanStep::setElement(const int& element, const std::vector& elements) -throw (XAO_Exception) { checkElementIndex(element); checkNbComponents(elements.size()); @@ -123,7 +117,6 @@ throw (XAO_Exception) } void BooleanStep::setComponent(const int& component, const std::vector& components) -throw (XAO_Exception) { checkComponentIndex(component); checkNbElements(components.size()); @@ -133,7 +126,6 @@ throw (XAO_Exception) } void BooleanStep::setValue(const int& element, const int& component, const bool& value) -throw (XAO_Exception) { checkElementIndex(element); checkComponentIndex(component); @@ -142,7 +134,6 @@ throw (XAO_Exception) } void BooleanStep::setStringValue(const int& element, const int& component, const std::string& value) -throw (XAO_Exception) { setValue(element, component, XaoUtils::stringToBoolean(value)); } diff --git a/src/XAO/XAO_BooleanStep.hxx b/src/XAO/XAO_BooleanStep.hxx index 39eb8d8b1..cd672b7d9 100644 --- a/src/XAO/XAO_BooleanStep.hxx +++ b/src/XAO/XAO_BooleanStep.hxx @@ -64,14 +64,14 @@ namespace XAO * @param element the index of the element to get. * @return a vector containing all the values for the given element. */ - std::vector getElement(const int& element) throw (XAO_Exception); + std::vector getElement(const int& element); /** * Gets all the values for a component. * @param component the index of the component to get. * @return a vector containing all the values for the given component. */ - std::vector getComponent(const int& component) throw (XAO_Exception); + std::vector getComponent(const int& component); /** * Gets a value for an element and a component. @@ -79,27 +79,27 @@ namespace XAO * @param component the index of the component. * @return the value. */ - const bool getValue(const int& element, const int& component) throw (XAO_Exception); + const bool getValue(const int& element, const int& component); /** * Sets all the values from a list. * @param values the list of values to set. */ - void setValues(const std::vector& values) throw (XAO_Exception); + void setValues(const std::vector& values); /** * Sets the values for an element. * @param element the index of the element to set. * @param elements the values to set. */ - void setElement(const int& element, const std::vector& elements) throw (XAO_Exception); + void setElement(const int& element, const std::vector& elements); /** * Sets the values for a component. * @param component the index of the component to set. * @param components the values to set. */ - void setComponent(const int& component, const std::vector& components) throw (XAO_Exception); + void setComponent(const int& component, const std::vector& components); /** * Sets the value for an element and a component. @@ -107,10 +107,10 @@ namespace XAO * @param component the index of the component. * @param value the value. */ - void setValue(const int& element, const int& component, const bool& value) throw (XAO_Exception); + void setValue(const int& element, const int& component, const bool& value); - virtual const std::string getStringValue(const int& element, const int& component) throw (XAO_Exception); - virtual void setStringValue(const int& element, const int& component, const std::string& value) throw (XAO_Exception); + virtual const std::string getStringValue(const int& element, const int& component); + virtual void setStringValue(const int& element, const int& component, const std::string& value); private: std::vector< std::vector > m_values; diff --git a/src/XAO/XAO_BrepGeometry.cxx b/src/XAO/XAO_BrepGeometry.cxx index 4751570a5..6c1e77d07 100644 --- a/src/XAO/XAO_BrepGeometry.cxx +++ b/src/XAO/XAO_BrepGeometry.cxx @@ -66,7 +66,6 @@ void BrepGeometry::setShapeString(const std::string& shape) } void BrepGeometry::writeShapeFile(const std::string& fileName) -throw (XAO_Exception) { bool res = BRepTools::Write(m_shape, fileName.c_str()); if (!res) @@ -74,7 +73,6 @@ throw (XAO_Exception) } void BrepGeometry::readShapeFile(const std::string& fileName) -throw (XAO_Exception) { BRep_Builder builder; bool res = BRepTools::Read(m_shape, fileName.c_str(), builder); @@ -137,7 +135,6 @@ void BrepGeometry::initListIds(const TopAbs_ShapeEnum& shapeType, GeometricEleme } TopoDS_Shape BrepGeometry::getSubShape(const TopoDS_Shape& mainShape, const TopAbs_ShapeEnum& shapeType, const int& shapeIndex) -throw (XAO_Exception) { TopTools_MapOfShape mapShape; TopTools_ListOfShape listShape; @@ -247,7 +244,6 @@ std::vector BrepGeometry::getSolidFaces(const int& solidIndex, const int& s } void BrepGeometry::getVertexXYZ(const int& vertexIndex, double& xCoord, double& yCoord, double& zCoord) -throw (XAO_Exception) { xCoord = 0.; yCoord = 0.; @@ -336,7 +332,6 @@ void BrepGeometry::setSolidID(const int& index, const int& id) // ----------------------------- const int BrepGeometry::findElement(const XAO::Dimension& dim, const int& id) -throw (XAO_Exception) { if (dim == XAO::VERTEX) return findVertex(id); @@ -393,25 +388,21 @@ const std::string BrepGeometry::findSolidName(const int& id) // ----------------------------- void BrepGeometry::changeVertexName(const int& id, const std::string& name) -throw (XAO_Exception) { setVertexName(findVertex(id), name); } void BrepGeometry::changeEdgeName(const int& id, const std::string& name) -throw (XAO_Exception) { setEdgeName(findEdge(id), name); } void BrepGeometry::changeFaceName(const int& id, const std::string& name) -throw (XAO_Exception) { setFaceName(findFace(id), name); } void BrepGeometry::changeSolidName(const int& id, const std::string& name) -throw (XAO_Exception) { setSolidName(findSolid(id), name); } diff --git a/src/XAO/XAO_BrepGeometry.hxx b/src/XAO/XAO_BrepGeometry.hxx index e0cd8f9de..fe7ec5065 100644 --- a/src/XAO/XAO_BrepGeometry.hxx +++ b/src/XAO/XAO_BrepGeometry.hxx @@ -79,13 +79,13 @@ namespace XAO * Writes shape to a file * @param fileName the path to the file */ - virtual void writeShapeFile(const std::string& fileName) throw (XAO_Exception); + virtual void writeShapeFile(const std::string& fileName) ; /** * Reads shape from a file * @param fileName the path to the file */ - virtual void readShapeFile(const std::string& fileName) throw (XAO_Exception); + virtual void readShapeFile(const std::string& fileName) ; #ifdef SWIG %pythoncode %{ @@ -155,7 +155,7 @@ namespace XAO * @param zCoord the Z coordinate. */ void getVertexXYZ(const int& vertexIndex, double& xCoord, double& yCoord, double& zCoord) - throw (XAO_Exception); + ; /** * Gets the length of an edge. @@ -295,38 +295,38 @@ namespace XAO * @param id the ID of the vertex. * @param name the name to set. */ - void changeVertexName(const int& id, const std::string& name) throw (XAO_Exception); + void changeVertexName(const int& id, const std::string& name) ; /** * Changes the name of an edge. * @param id the ID of the edge * @param name the name to set. */ - void changeEdgeName(const int& id, const std::string& name) throw (XAO_Exception); + void changeEdgeName(const int& id, const std::string& name) ; /** * Changes the name of a face. * @param id the ID of the face. * @param name the name to set. */ - void changeFaceName(const int& id, const std::string& name) throw (XAO_Exception); + void changeFaceName(const int& id, const std::string& name) ; /** * Changes the name of a solid. * @param id the ID of the solid. * @param name the name to set. */ - void changeSolidName(const int& id, const std::string& name) throw (XAO_Exception); + void changeSolidName(const int& id, const std::string& name) ; private: void initIds(); void initListIds(const TopAbs_ShapeEnum& shapeType, GeometricElementList& eltList); TopoDS_Shape getSubShape(const TopoDS_Shape& mainShape, const TopAbs_ShapeEnum& shapeType, const int& shapeIndex) - throw (XAO_Exception); + ; const int countGeometricalElements(const TopoDS_Shape& shape, const TopAbs_ShapeEnum& shapeType); std::vector getGeometricalElements(const TopoDS_Shape& shape, const TopAbs_ShapeEnum& shapeType, const XAO::Dimension& dim); const int findElement(const XAO::Dimension& dim, const int& id) - throw (XAO_Exception); + ; private: TopoDS_Shape m_shape; diff --git a/src/XAO/XAO_DoubleField.cxx b/src/XAO/XAO_DoubleField.cxx index fd93623f2..468eba0f3 100644 --- a/src/XAO/XAO_DoubleField.cxx +++ b/src/XAO/XAO_DoubleField.cxx @@ -30,19 +30,19 @@ DoubleField::DoubleField(const XAO::Dimension& dimension, const int& nbElements, } Step* DoubleField::addNewStep(const int& step) -throw (XAO_Exception) + { return addStep(step, 0); } DoubleStep* DoubleField::addStep(const int& step) -throw (XAO_Exception) + { return addStep(step, 0); } DoubleStep* DoubleField::addStep(const int& step, const int& stamp) -throw (XAO_Exception) + { if (hasStep(step)) throw XAO_Exception(MsgBuilder() << "Step with number " << step << " already exists."); @@ -53,7 +53,7 @@ throw (XAO_Exception) } DoubleStep* DoubleField::getStep(const int& index) -throw (XAO_Exception) + { checkStepIndex(index); return (DoubleStep*)m_steps[index]; diff --git a/src/XAO/XAO_DoubleField.hxx b/src/XAO/XAO_DoubleField.hxx index 55ba47a89..5e0a9eedc 100644 --- a/src/XAO/XAO_DoubleField.hxx +++ b/src/XAO/XAO_DoubleField.hxx @@ -53,14 +53,14 @@ namespace XAO virtual const XAO::Type getType() { return XAO::DOUBLE; } - virtual Step* addNewStep(const int& step) throw (XAO_Exception); + virtual Step* addNewStep(const int& step) ; /** * Adds a new step. * @param step the number of the step. * @return the newly created step. */ - DoubleStep* addStep(const int& step) throw (XAO_Exception); + DoubleStep* addStep(const int& step) ; /** * Adds a new step. @@ -68,14 +68,14 @@ namespace XAO * @param stamp the stamp of the step. * @return the newly created step. */ - DoubleStep* addStep(const int& step, const int& stamp) throw (XAO_Exception); + DoubleStep* addStep(const int& step, const int& stamp) ; /** * Gets the step of given index. * @param index the index. * @return the step for the given index. */ - DoubleStep* getStep(const int& index) throw (XAO_Exception); + DoubleStep* getStep(const int& index) ; }; } diff --git a/src/XAO/XAO_DoubleStep.cxx b/src/XAO/XAO_DoubleStep.cxx index 34fa09695..fd9f87df1 100644 --- a/src/XAO/XAO_DoubleStep.cxx +++ b/src/XAO/XAO_DoubleStep.cxx @@ -57,7 +57,7 @@ std::vector DoubleStep::getValues() } std::vector DoubleStep::getElement(const int& element) -throw (XAO_Exception) + { checkElementIndex(element); @@ -66,7 +66,7 @@ throw (XAO_Exception) } std::vector DoubleStep::getComponent(const int& component) -throw (XAO_Exception) + { checkComponentIndex(component); @@ -84,7 +84,7 @@ throw (XAO_Exception) } const double DoubleStep::getValue(const int& element, const int& component) -throw (XAO_Exception) + { checkElementIndex(element); checkComponentIndex(component); @@ -93,13 +93,13 @@ throw (XAO_Exception) } const std::string DoubleStep::getStringValue(const int& element, const int& component) -throw (XAO_Exception) + { return XaoUtils::doubleToString(getValue(element, component)); } void DoubleStep::setValues(const std::vector& values) -throw (XAO_Exception) + { checkNbValues(values.size()); @@ -113,7 +113,7 @@ throw (XAO_Exception) } void DoubleStep::setElement(const int& element, const std::vector& elements) -throw (XAO_Exception) + { checkElementIndex(element); checkNbComponents(elements.size()); @@ -123,7 +123,7 @@ throw (XAO_Exception) } void DoubleStep::setComponent(const int& component, const std::vector& components) -throw (XAO_Exception) + { checkElementIndex(component); checkNbElements(components.size()); @@ -133,7 +133,7 @@ throw (XAO_Exception) } void DoubleStep::setValue(const int& element, const int& component, const double& value) -throw (XAO_Exception) + { checkElementIndex(element); checkComponentIndex(component); @@ -142,7 +142,7 @@ throw (XAO_Exception) } void DoubleStep::setStringValue(const int& element, const int& component, const std::string& value) -throw (XAO_Exception) + { setValue(element, component, XaoUtils::stringToDouble(value)); } diff --git a/src/XAO/XAO_DoubleStep.hxx b/src/XAO/XAO_DoubleStep.hxx index ae8516ea5..c2cc72a11 100644 --- a/src/XAO/XAO_DoubleStep.hxx +++ b/src/XAO/XAO_DoubleStep.hxx @@ -63,14 +63,14 @@ namespace XAO * @param element the index of the element. * @return a vector containing all the values for the given element. */ - std::vector getElement(const int& element) throw (XAO_Exception); + std::vector getElement(const int& element) ; /** * Gets all the values for a given component. * @param component the index of the component. * @return a vector containing all the values for the given component. */ - std::vector getComponent(const int& component) throw (XAO_Exception); + std::vector getComponent(const int& component) ; /** * Gets the value for an element and a component. @@ -78,27 +78,27 @@ namespace XAO * @param component the index of the component. * @return the value for the given element and component. */ - const double getValue(const int& element, const int& component) throw (XAO_Exception); + const double getValue(const int& element, const int& component) ; /** * Sets all the values from a list. * @param values the list of values to set. */ - void setValues(const std::vector& values) throw (XAO_Exception); + void setValues(const std::vector& values) ; /** * Sets the values for an element. * @param element the index of the element to set. * @param elements the values to set. */ - void setElement(const int& element, const std::vector& elements) throw (XAO_Exception); + void setElement(const int& element, const std::vector& elements) ; /** * Sets the values for a component. * @param component the index of the component to set. * @param components the values to set. */ - void setComponent(const int& component, const std::vector& components) throw (XAO_Exception); + void setComponent(const int& component, const std::vector& components) ; /** * Sets the value for an element and a component. @@ -106,10 +106,10 @@ namespace XAO * @param component the index of the component. * @param value the value. */ - void setValue(const int& element, const int& component, const double& value) throw (XAO_Exception); + void setValue(const int& element, const int& component, const double& value) ; - virtual const std::string getStringValue(const int& element, const int& component) throw (XAO_Exception); - virtual void setStringValue(const int& element, const int& component, const std::string& value) throw (XAO_Exception); + virtual const std::string getStringValue(const int& element, const int& component) ; + virtual void setStringValue(const int& element, const int& component, const std::string& value) ; private: std::vector< std::vector > m_values; diff --git a/src/XAO/XAO_Exception.hxx b/src/XAO/XAO_Exception.hxx index 3d76f9c0d..10da10787 100644 --- a/src/XAO/XAO_Exception.hxx +++ b/src/XAO/XAO_Exception.hxx @@ -41,13 +41,13 @@ namespace XAO { } - virtual ~XAO_Exception() throw() {}; + virtual ~XAO_Exception() noexcept {}; /** * Returns the error message. * @return the error message. */ - virtual const char* what() const throw () + virtual const char* what() const noexcept { return m_message; } diff --git a/src/XAO/XAO_Field.cxx b/src/XAO/XAO_Field.cxx index de7daac38..a3e0c3cba 100644 --- a/src/XAO/XAO_Field.cxx +++ b/src/XAO/XAO_Field.cxx @@ -49,7 +49,6 @@ Field::~Field() Field* Field::createField(const XAO::Type& type, const XAO::Dimension& dimension, const int& nbElements, const int& nbComponents, const std::string& name) -throw (XAO_Exception) { if (type == XAO::BOOLEAN) return new BooleanField(dimension, nbElements, nbComponents, name); @@ -64,21 +63,18 @@ throw (XAO_Exception) } const std::string Field::getComponentName(const int& index) -throw (XAO_Exception) { checkComponent(index); return m_components[index]; } void Field::setComponentName(const int& index, const std::string& name) -throw (XAO_Exception) { checkComponent(index); m_components[index] = name; } void Field::setComponentsNames(const std::vector& names) -throw (XAO_Exception) { for (unsigned int i = 0; i < names.size(); ++i) { @@ -117,7 +113,6 @@ bool Field::hasStep(const int& step) } void Field::checkComponent(const int& component) -throw (XAO_Exception) { if (component < m_nbComponents && component >= 0) return; @@ -127,7 +122,6 @@ throw (XAO_Exception) } void Field::checkStepIndex(const int& step) -throw (XAO_Exception) { if (step < (int)m_steps.size() && step >= 0) return; diff --git a/src/XAO/XAO_Field.hxx b/src/XAO/XAO_Field.hxx index 3f8296aed..0612aabf5 100644 --- a/src/XAO/XAO_Field.hxx +++ b/src/XAO/XAO_Field.hxx @@ -67,8 +67,7 @@ namespace XAO */ static Field* createField(const XAO::Type& type, const XAO::Dimension& dimension, const int& nbElements, const int& nbComponents, - const std::string& name = std::string("")) - throw (XAO_Exception); + const std::string& name = std::string("")); /** * Destructor. @@ -146,27 +145,27 @@ namespace XAO * @param index the index of the component to get. * @return the name of the component for the given index. */ - const std::string getComponentName(const int& index) throw (XAO_Exception); + const std::string getComponentName(const int& index); /** * Sets the name of a component. * @param componentIndex the index of the component to set. * @param name the name to set. */ - void setComponentName(const int& componentIndex, const std::string& name) throw (XAO_Exception); + void setComponentName(const int& componentIndex, const std::string& name); /** * Sets the name of the components. * @param names the names to set. */ - void setComponentsNames(const std::vector& names) throw (XAO_Exception); + void setComponentsNames(const std::vector& names); /** * Adds a new step of the same type than the field. * @param number the numer of the step. * @return the new create step. */ - virtual Step* addNewStep(const int& number) throw (XAO_Exception) = 0; + virtual Step* addNewStep(const int& number) = 0; /** * Remove a step. @@ -195,8 +194,8 @@ namespace XAO stepIterator end() { return m_steps.end(); } protected: - void checkComponent(const int& component) throw (XAO_Exception); - void checkStepIndex(const int& step) throw (XAO_Exception); + void checkComponent(const int& component) ; + void checkStepIndex(const int& step) ; protected: /** The name of the Field. */ diff --git a/src/XAO/XAO_GeometricElement.cxx b/src/XAO/XAO_GeometricElement.cxx index cee2fc9ea..221da286a 100644 --- a/src/XAO/XAO_GeometricElement.cxx +++ b/src/XAO/XAO_GeometricElement.cxx @@ -66,7 +66,6 @@ void GeometricElementList::setSize(const int& nb) } void GeometricElementList::checkElementIndex(const int& index) const -throw (XAO_Exception) { if (m_count >= 0 && index < m_count) return; @@ -76,7 +75,6 @@ throw (XAO_Exception) } void GeometricElementList::setElement(const int& index, const std::string& name, const std::string& reference) -throw (XAO_Exception) { checkElementIndex(index); m_elements[index].setName(name); @@ -84,42 +82,36 @@ throw (XAO_Exception) } const std::string GeometricElementList::getName(const int& index) -throw (XAO_Exception) { checkElementIndex(index); return m_elements[index].getName(); } void GeometricElementList::setName(const int& index, const std::string& name) -throw (XAO_Exception) { checkElementIndex(index); m_elements[index].setName(name); } const bool GeometricElementList::hasName(const int& index) -throw (XAO_Exception) { checkElementIndex(index); return m_elements[index].hasName(); } const std::string GeometricElementList::getReference(const int& index) -throw (XAO_Exception) { checkElementIndex(index); return m_elements[index].getReference(); } void GeometricElementList::setReference(const int& index, const std::string& name) -throw (XAO_Exception) { checkElementIndex(index); m_elements[index].setReference(name); } const int GeometricElementList::getIndexByReference(const std::string& ref) -throw (XAO_Exception) { for (int index = 0; index < m_count; ++index) { diff --git a/src/XAO/XAO_GeometricElement.hxx b/src/XAO/XAO_GeometricElement.hxx index 9dba418df..ada6225b2 100644 --- a/src/XAO/XAO_GeometricElement.hxx +++ b/src/XAO/XAO_GeometricElement.hxx @@ -147,28 +147,28 @@ namespace XAO * \param reference the reference to set. * \throw XAO_Exception if index is bigger than the size of the list. */ - void setElement(const int& index, const std::string& name, const std::string& reference) throw (XAO_Exception); + void setElement(const int& index, const std::string& name, const std::string& reference); /** * Gets the name of an element. * \param index the index of the element to set. * \return the name of the element with the given index. * \throw XAO_Exception if index is bigger than the size of the list. */ - const std::string getName(const int& index) throw (XAO_Exception); + const std::string getName(const int& index); /** * Sets the name of an element. * \param index the index of the element. * \param name the name to set. * \throw XAO_Exception if index is bigger than the size of the list. */ - void setName(const int& index, const std::string& name) throw (XAO_Exception); + void setName(const int& index, const std::string& name); /** * Checks if an element has a name. * @param index the index of the element. * @return true if the element has a name, false otherwise. */ - const bool hasName(const int& index) throw (XAO_Exception); + const bool hasName(const int& index); /** * Gets the reference of an element. @@ -176,21 +176,21 @@ namespace XAO * \return the reference of the element. * \throw XAO_Exception if index is bigger than the size of the list. */ - const std::string getReference(const int& index) throw (XAO_Exception); + const std::string getReference(const int& index); /** * Sets the reference of an element. * \param index the index of the element to set. * \param reference the reference to set. * \throw XAO_Exception if index is bigger than the size of the list. */ - void setReference(const int& index, const std::string& reference) throw (XAO_Exception); + void setReference(const int& index, const std::string& reference); /** * Gets the index of an element using its reference. * \param reference the searched reference. * \return the index of the element or -1 if no element found. */ - const int getIndexByReference(const std::string& reference) throw (XAO_Exception); + const int getIndexByReference(const std::string& reference); /** * Iterator on the element of the list. @@ -210,7 +210,7 @@ namespace XAO iterator end() { return m_elements.end(); } private: - void checkElementIndex(const int& index) const throw (XAO_Exception); + void checkElementIndex(const int& index) const; private: int m_count; diff --git a/src/XAO/XAO_Geometry.cxx b/src/XAO/XAO_Geometry.cxx index 25e1c98c6..0120d2414 100644 --- a/src/XAO/XAO_Geometry.cxx +++ b/src/XAO/XAO_Geometry.cxx @@ -31,13 +31,11 @@ Geometry::Geometry(const std::string& name) } Geometry* Geometry::createGeometry(const XAO::Format& format) -throw (XAO_Exception) { return createGeometry(format, ""); } Geometry* Geometry::createGeometry(const XAO::Format& format, const std::string& name) -throw (XAO_Exception) { if (format == XAO::BREP) return new BrepGeometry(name); @@ -50,14 +48,12 @@ Geometry::~Geometry() } void Geometry::checkReadOnly() -throw (XAO_Exception) { if (m_readOnly) throw XAO_Exception("Geometry is read only."); } const int Geometry::countElements(const XAO::Dimension& dim) const -throw (XAO_Exception) { if (dim == XAO::VERTEX) return countVertices(); @@ -74,7 +70,6 @@ throw (XAO_Exception) } const std::string Geometry::getElementReference(const XAO::Dimension& dim, const int& index) -throw (XAO_Exception) { if (dim == XAO::VERTEX) return getVertexReference(index); @@ -89,7 +84,6 @@ throw (XAO_Exception) } const int Geometry::getElementIndexByReference(const XAO::Dimension& dim, const std::string& reference) -throw (XAO_Exception) { if (dim == XAO::VERTEX) return getVertexIndexByReference(reference); @@ -104,7 +98,6 @@ throw (XAO_Exception) } GeometricElementList::iterator Geometry::begin(const XAO::Dimension& dim) -throw (XAO_Exception) { if (dim == XAO::VERTEX) return m_vertices.begin(); @@ -119,7 +112,6 @@ throw (XAO_Exception) } GeometricElementList::iterator Geometry::end(const XAO::Dimension& dim) -throw (XAO_Exception) { if (dim == XAO::VERTEX) return m_vertices.end(); @@ -133,64 +125,64 @@ throw (XAO_Exception) throw XAO_Exception(MsgBuilder() << "Unknown dimension:" << dim); } -void Geometry::setCountVertices(const int& nb) throw (XAO_Exception) +void Geometry::setCountVertices(const int& nb) { checkReadOnly(); m_vertices.setSize(nb); } -void Geometry::setCountEdges(const int& nb) throw (XAO_Exception) +void Geometry::setCountEdges(const int& nb) { checkReadOnly(); m_edges.setSize(nb); } -void Geometry::setCountFaces(const int& nb) throw (XAO_Exception) +void Geometry::setCountFaces(const int& nb) { checkReadOnly(); m_faces.setSize(nb); } -void Geometry::setCountSolids(const int& nb) throw (XAO_Exception) +void Geometry::setCountSolids(const int& nb) { checkReadOnly(); m_solids.setSize(nb); } -void Geometry::setVertexReference(const int& index, const std::string& reference) throw (XAO_Exception) +void Geometry::setVertexReference(const int& index, const std::string& reference) { checkReadOnly(); m_vertices.setReference(index, reference); } -void Geometry::setEdgeReference(const int& index, const std::string& reference) throw (XAO_Exception) +void Geometry::setEdgeReference(const int& index, const std::string& reference) { checkReadOnly(); m_edges.setReference(index, reference); } -void Geometry::setFaceReference(const int& index, const std::string& reference) throw (XAO_Exception) +void Geometry::setFaceReference(const int& index, const std::string& reference) { checkReadOnly(); m_faces.setReference(index, reference); } -void Geometry::setSolidReference(const int& index, const std::string& reference) throw (XAO_Exception) +void Geometry::setSolidReference(const int& index, const std::string& reference) { checkReadOnly(); m_solids.setReference(index, reference); } -void Geometry::setVertex(const int& index, const std::string& name, const std::string& reference) throw (XAO_Exception) +void Geometry::setVertex(const int& index, const std::string& name, const std::string& reference) { checkReadOnly(); m_vertices.setElement(index, name, reference); } -void Geometry::setEdge(const int& index, const std::string& name, const std::string& reference) throw (XAO_Exception) +void Geometry::setEdge(const int& index, const std::string& name, const std::string& reference) { checkReadOnly(); m_edges.setElement(index, name, reference); } -void Geometry::setFace(const int& index, const std::string& name, const std::string& reference) throw (XAO_Exception) +void Geometry::setFace(const int& index, const std::string& name, const std::string& reference) { checkReadOnly(); m_faces.setElement(index, name, reference); } -void Geometry::setSolid(const int& index, const std::string& name, const std::string& reference) throw (XAO_Exception) +void Geometry::setSolid(const int& index, const std::string& name, const std::string& reference) { checkReadOnly(); m_solids.setElement(index, name, reference); diff --git a/src/XAO/XAO_Geometry.hxx b/src/XAO/XAO_Geometry.hxx index 2ac3d5588..f5d39aee1 100644 --- a/src/XAO/XAO_Geometry.hxx +++ b/src/XAO/XAO_Geometry.hxx @@ -55,7 +55,7 @@ namespace XAO * @param format the format of the geometry. * @return the created geometry. */ - static Geometry* createGeometry(const XAO::Format& format) throw (XAO_Exception); + static Geometry* createGeometry(const XAO::Format& format) ; /** * Constructor. @@ -63,8 +63,7 @@ namespace XAO * @name name the name of the geometry. * @return the created geometry. */ - static Geometry* createGeometry(const XAO::Format& format, const std::string& name) - throw (XAO_Exception); + static Geometry* createGeometry(const XAO::Format& format, const std::string& name); /** Destructor. */ virtual ~Geometry(); @@ -97,56 +96,56 @@ namespace XAO virtual void writeShapeFile(const std::string& fileName) = 0; virtual void readShapeFile(const std::string& fileName) = 0; - const int countElements(const XAO::Dimension& dim) const throw (XAO_Exception); + const int countElements(const XAO::Dimension& dim) const ; const int countVertices() const { return m_vertices.getSize(); } const int countEdges() const { return m_edges.getSize(); } const int countFaces() const { return m_faces.getSize(); } const int countSolids() const { return m_solids.getSize(); } - void setCountVertices(const int& nb) throw (XAO_Exception); - void setCountEdges(const int& nb) throw (XAO_Exception); - void setCountFaces(const int& nb) throw (XAO_Exception); - void setCountSolids(const int& nb) throw (XAO_Exception); + void setCountVertices(const int& nb); + void setCountEdges(const int& nb); + void setCountFaces(const int& nb); + void setCountSolids(const int& nb); - const std::string getVertexName(const int& index) throw (XAO_Exception) { return m_vertices.getName(index); } - const std::string getEdgeName(const int& index) throw (XAO_Exception) { return m_edges.getName(index); } - const std::string getFaceName(const int& index) throw (XAO_Exception) { return m_faces.getName(index); } - const std::string getSolidName(const int& index) throw (XAO_Exception) { return m_solids.getName(index); } + const std::string getVertexName(const int& index) { return m_vertices.getName(index); } + const std::string getEdgeName(const int& index) { return m_edges.getName(index); } + const std::string getFaceName(const int& index) { return m_faces.getName(index); } + const std::string getSolidName(const int& index) { return m_solids.getName(index); } - void setVertexName(const int& index, const std::string& name) throw (XAO_Exception) { m_vertices.setName(index, name); } - void setEdgeName(const int& index, const std::string& name) throw (XAO_Exception) { m_edges.setName(index, name); } - void setFaceName(const int& index, const std::string& name) throw (XAO_Exception) { m_faces.setName(index, name); } - void setSolidName(const int& index, const std::string& name) throw (XAO_Exception) { m_solids.setName(index, name); } + void setVertexName(const int& index, const std::string& name) { m_vertices.setName(index, name); } + void setEdgeName(const int& index, const std::string& name) { m_edges.setName(index, name); } + void setFaceName(const int& index, const std::string& name) { m_faces.setName(index, name); } + void setSolidName(const int& index, const std::string& name) { m_solids.setName(index, name); } - const bool hasVertexName(const int& index) throw (XAO_Exception) { return m_vertices.hasName(index); } - const bool hasEdgeName(const int& index) throw (XAO_Exception) { return m_edges.hasName(index); } - const bool hasFaceName(const int& index) throw (XAO_Exception) { return m_faces.hasName(index); } - const bool hasSolidName(const int& index) throw (XAO_Exception) { return m_solids.hasName(index); } + const bool hasVertexName(const int& index) { return m_vertices.hasName(index); } + const bool hasEdgeName(const int& index) { return m_edges.hasName(index); } + const bool hasFaceName(const int& index) { return m_faces.hasName(index); } + const bool hasSolidName(const int& index) { return m_solids.hasName(index); } - const std::string getVertexReference(const int& index) throw (XAO_Exception) { return m_vertices.getReference(index); } - const std::string getEdgeReference(const int& index) throw (XAO_Exception) { return m_edges.getReference(index); } - const std::string getFaceReference(const int& index) throw (XAO_Exception) { return m_faces.getReference(index); } - const std::string getSolidReference(const int& index) throw (XAO_Exception) { return m_solids.getReference(index); } - const std::string getElementReference(const XAO::Dimension& dim, const int& index) throw (XAO_Exception); + const std::string getVertexReference(const int& index) { return m_vertices.getReference(index); } + const std::string getEdgeReference(const int& index) { return m_edges.getReference(index); } + const std::string getFaceReference(const int& index) { return m_faces.getReference(index); } + const std::string getSolidReference(const int& index) { return m_solids.getReference(index); } + const std::string getElementReference(const XAO::Dimension& dim, const int& index) ; - void setVertexReference(const int& index, const std::string& reference) throw (XAO_Exception); - void setEdgeReference(const int& index, const std::string& reference) throw (XAO_Exception); - void setFaceReference(const int& index, const std::string& reference) throw (XAO_Exception); - void setSolidReference(const int& index, const std::string& reference) throw (XAO_Exception); + void setVertexReference(const int& index, const std::string& reference) ; + void setEdgeReference(const int& index, const std::string& reference) ; + void setFaceReference(const int& index, const std::string& reference) ; + void setSolidReference(const int& index, const std::string& reference) ; - void setVertex(const int& index, const std::string& name, const std::string& reference) throw (XAO_Exception); - void setEdge(const int& index, const std::string& name, const std::string& reference) throw (XAO_Exception); - void setFace(const int& index, const std::string& name, const std::string& reference) throw (XAO_Exception); - void setSolid(const int& index, const std::string& name, const std::string& reference) throw (XAO_Exception); + void setVertex(const int& index, const std::string& name, const std::string& reference) ; + void setEdge(const int& index, const std::string& name, const std::string& reference) ; + void setFace(const int& index, const std::string& name, const std::string& reference) ; + void setSolid(const int& index, const std::string& name, const std::string& reference) ; const int getVertexIndexByReference(const std::string& reference) { return m_vertices.getIndexByReference(reference); } const int getEdgeIndexByReference(const std::string& reference) { return m_edges.getIndexByReference(reference); } const int getFaceIndexByReference(const std::string& reference) { return m_faces.getIndexByReference(reference); } const int getSolidIndexByReference(const std::string& reference) { return m_solids.getIndexByReference(reference); } - const int getElementIndexByReference(const XAO::Dimension& dim, const std::string& reference) throw (XAO_Exception); + const int getElementIndexByReference(const XAO::Dimension& dim, const std::string& reference) ; - GeometricElementList::iterator begin(const XAO::Dimension& dim) throw (XAO_Exception); - GeometricElementList::iterator end(const XAO::Dimension& dim) throw (XAO_Exception); + GeometricElementList::iterator begin(const XAO::Dimension& dim) ; + GeometricElementList::iterator end(const XAO::Dimension& dim) ; /** * Verifies if the geometry is read only. @@ -160,7 +159,7 @@ namespace XAO void setReadOnly() { m_readOnly = true; } protected: - void checkReadOnly() throw (XAO_Exception); + void checkReadOnly() ; protected: std::string m_name; diff --git a/src/XAO/XAO_Group.cxx b/src/XAO/XAO_Group.cxx index 07e5485cd..c0efcba3c 100644 --- a/src/XAO/XAO_Group.cxx +++ b/src/XAO/XAO_Group.cxx @@ -25,7 +25,6 @@ using namespace XAO; Group::Group(const XAO::Dimension& dim, const int& nbElements, const std::string& name) -throw (XAO_Exception) { if (dim == XAO::WHOLE) throw XAO_Exception("Dimension WHOLE is not valid for group."); @@ -41,7 +40,6 @@ Group::~Group() } void Group::checkIndex(const int& element) -throw (XAO_Exception) { if (element < (int)m_elements.size() && element >= 0) return; diff --git a/src/XAO/XAO_Group.hxx b/src/XAO/XAO_Group.hxx index 1a8a01cfd..6691b73b5 100644 --- a/src/XAO/XAO_Group.hxx +++ b/src/XAO/XAO_Group.hxx @@ -44,8 +44,7 @@ namespace XAO * @param nbElements the number of geometrical elements for the dimension in the geometry. * @param name the name of the group. */ - Group(const XAO::Dimension& dim, const int& nbElements, const std::string& name = std::string("")) - throw (XAO_Exception); + Group(const XAO::Dimension& dim, const int& nbElements, const std::string& name = std::string("")); /** * Destructor. @@ -140,8 +139,7 @@ namespace XAO * @param element * @throw XAO_Exception if element is bigger than the number of elements. */ - void checkIndex(const int& element) - throw (XAO_Exception); + void checkIndex(const int& element); private: /** The name of the group. */ diff --git a/src/XAO/XAO_IntegerField.cxx b/src/XAO/XAO_IntegerField.cxx index b7980a75e..2dbe7ff87 100644 --- a/src/XAO/XAO_IntegerField.cxx +++ b/src/XAO/XAO_IntegerField.cxx @@ -30,19 +30,19 @@ IntegerField::IntegerField(const XAO::Dimension& dimension, const int& nbElement } Step* IntegerField::addNewStep(const int& step) -throw (XAO_Exception) + { return addStep(step, 0); } IntegerStep* IntegerField::addStep(const int& step) -throw (XAO_Exception) + { return addStep(step, 0); } IntegerStep* IntegerField::addStep(const int& step, const int& stamp) -throw (XAO_Exception) + { if (hasStep(step)) throw XAO_Exception(MsgBuilder() << "Step with number " << step << " already exists."); @@ -53,7 +53,7 @@ throw (XAO_Exception) } IntegerStep* IntegerField::getStep(const int& index) -throw (XAO_Exception) + { checkStepIndex(index); return (IntegerStep*)m_steps[index]; diff --git a/src/XAO/XAO_IntegerField.hxx b/src/XAO/XAO_IntegerField.hxx index 38fd961ac..649e4d846 100644 --- a/src/XAO/XAO_IntegerField.hxx +++ b/src/XAO/XAO_IntegerField.hxx @@ -53,14 +53,14 @@ namespace XAO virtual const XAO::Type getType() { return XAO::INTEGER; } - virtual Step* addNewStep(const int& step) throw (XAO_Exception); + virtual Step* addNewStep(const int& step) ; /** * Adds a new step. * @param step the number of the step. * @return the newly created step. */ - IntegerStep* addStep(const int& step) throw (XAO_Exception); + IntegerStep* addStep(const int& step) ; /** * Adds a new step. @@ -68,14 +68,14 @@ namespace XAO * @param stamp the stamp of the step. * @return the newly created step. */ - IntegerStep* addStep(const int& step, const int& stamp) throw (XAO_Exception); + IntegerStep* addStep(const int& step, const int& stamp) ; /** * Gets the step of given index. * @param index the index of the step. * @return the step for the given index. */ - IntegerStep* getStep(const int& index) throw (XAO_Exception); + IntegerStep* getStep(const int& index) ; }; } diff --git a/src/XAO/XAO_IntegerStep.cxx b/src/XAO/XAO_IntegerStep.cxx index dbd2f5ef0..58f82483e 100644 --- a/src/XAO/XAO_IntegerStep.cxx +++ b/src/XAO/XAO_IntegerStep.cxx @@ -57,7 +57,7 @@ std::vector IntegerStep::getValues() } std::vector IntegerStep::getElement(const int& element) -throw (XAO_Exception) + { checkElementIndex(element); @@ -66,7 +66,7 @@ throw (XAO_Exception) } std::vector IntegerStep::getComponent(const int& component) -throw (XAO_Exception) + { checkComponentIndex(component); @@ -84,7 +84,7 @@ throw (XAO_Exception) } const int IntegerStep::getValue(const int& element, const int& component) -throw (XAO_Exception) + { checkElementIndex(element); checkComponentIndex(component); @@ -93,13 +93,13 @@ throw (XAO_Exception) } const std::string IntegerStep::getStringValue(const int& element, const int& component) -throw (XAO_Exception) + { return XaoUtils::intToString(getValue(element, component)); } void IntegerStep::setValues(const std::vector& values) -throw (XAO_Exception) + { checkNbValues(values.size()); @@ -113,7 +113,7 @@ throw (XAO_Exception) } void IntegerStep::setElement(const int& element, const std::vector& elements) -throw (XAO_Exception) + { checkElementIndex(element); checkNbComponents(elements.size()); @@ -123,7 +123,7 @@ throw (XAO_Exception) } void IntegerStep::setComponent(const int& component, const std::vector& components) -throw (XAO_Exception) + { checkElementIndex(component); checkNbElements(components.size()); @@ -133,7 +133,7 @@ throw (XAO_Exception) } void IntegerStep::setValue(const int& element, const int& component, const int& value) -throw (XAO_Exception) + { checkElementIndex(element); checkComponentIndex(component); @@ -142,7 +142,7 @@ throw (XAO_Exception) } void IntegerStep::setStringValue(const int& element, const int& component, const std::string& value) -throw (XAO_Exception) + { setValue(element, component, XaoUtils::stringToInt(value)); } diff --git a/src/XAO/XAO_IntegerStep.hxx b/src/XAO/XAO_IntegerStep.hxx index 7b4ca7da7..1ac26e527 100644 --- a/src/XAO/XAO_IntegerStep.hxx +++ b/src/XAO/XAO_IntegerStep.hxx @@ -64,14 +64,14 @@ namespace XAO * @param element the index of the element. * @return a vector containing all the values for the given element. */ - std::vector getElement(const int& element) throw (XAO_Exception); + std::vector getElement(const int& element) ; /** * Gets all the values for a given component. * @param component the index of the component. * @return a vector containing all the values for the given component. */ - std::vector getComponent(const int& component) throw (XAO_Exception); + std::vector getComponent(const int& component) ; /** * Gets the value for an element and a component. @@ -79,27 +79,27 @@ namespace XAO * @param component the index of the component. * @return the value for the given element and component. */ - const int getValue(const int& element, const int& component) throw (XAO_Exception); + const int getValue(const int& element, const int& component) ; /** * Sets all the values from a list. * @param values the list of values to set. */ - void setValues(const std::vector& values) throw (XAO_Exception); + void setValues(const std::vector& values) ; /** * Sets the values for an element. * @param element the index of the element to set. * @param elements the values to set. */ - void setElement(const int& element, const std::vector& elements) throw (XAO_Exception); + void setElement(const int& element, const std::vector& elements) ; /** * Sets the values for a component. * @param component the index of the component to set. * @param components the values to set. */ - void setComponent(const int& component, const std::vector& components) throw (XAO_Exception); + void setComponent(const int& component, const std::vector& components) ; /** * Sets the value for an element and a component. @@ -107,10 +107,10 @@ namespace XAO * @param component the index of the component. * @param value the value. */ - void setValue(const int& element, const int& component, const int& value) throw (XAO_Exception); + void setValue(const int& element, const int& component, const int& value) ; - virtual const std::string getStringValue(const int& element, const int& component) throw (XAO_Exception); - virtual void setStringValue(const int& element, const int& component, const std::string& value) throw (XAO_Exception); + virtual const std::string getStringValue(const int& element, const int& component) ; + virtual void setStringValue(const int& element, const int& component, const std::string& value) ; private: std::vector< std::vector > m_values; diff --git a/src/XAO/XAO_Step.cxx b/src/XAO/XAO_Step.cxx index fb29f9ab9..ef554c9b8 100644 --- a/src/XAO/XAO_Step.cxx +++ b/src/XAO/XAO_Step.cxx @@ -29,7 +29,6 @@ using namespace XAO; void Step::checkElementIndex(const int& element) -throw (XAO_Exception) { if (element < m_nbElements && element >= 0) return; @@ -39,7 +38,6 @@ throw (XAO_Exception) } void Step::checkComponentIndex(const int& component) -throw (XAO_Exception) { if (component < m_nbComponents && component >= 0) return; @@ -49,7 +47,6 @@ throw (XAO_Exception) } void Step::checkNbElements(const int& nbElements) -throw (XAO_Exception) { if (nbElements == m_nbElements) return; @@ -59,7 +56,6 @@ throw (XAO_Exception) } void Step::checkNbComponents(const int& nbComponents) -throw (XAO_Exception) { if (nbComponents == m_nbComponents) return; @@ -69,7 +65,6 @@ throw (XAO_Exception) } void Step::checkNbValues(const int& nbValues) -throw (XAO_Exception) { if (nbValues == m_nbElements * m_nbComponents) return; diff --git a/src/XAO/XAO_Step.hxx b/src/XAO/XAO_Step.hxx index 66bdf0297..18ba6e359 100644 --- a/src/XAO/XAO_Step.hxx +++ b/src/XAO/XAO_Step.hxx @@ -117,30 +117,30 @@ namespace XAO * Checks that given element index is in the range of element indexes. * @param element the index to check. */ - void checkElementIndex(const int& element) throw (XAO_Exception); + void checkElementIndex(const int& element); /** * Checks that given component index is in the range of component indexes. * @param component the index to check. */ - void checkComponentIndex(const int& component)throw (XAO_Exception); + void checkComponentIndex(const int& component); /** * Checks that the given number of elements is correct. * @param nbElements the number of elements to check. */ - void checkNbElements(const int& nbElements)throw (XAO_Exception); + void checkNbElements(const int& nbElements); /** * Checks that the given number of components is correct. * @param nbComponents the number of components to check. */ - void checkNbComponents(const int& nbComponents)throw (XAO_Exception); + void checkNbComponents(const int& nbComponents); /** * checks that the given number of values is correct. * @param nbValues the number of values to check. */ - void checkNbValues(const int& nbValues)throw (XAO_Exception); + void checkNbValues(const int& nbValues); protected: /** the index of the step. */ diff --git a/src/XAO/XAO_StringField.cxx b/src/XAO/XAO_StringField.cxx index 63bd027da..d2abe3066 100644 --- a/src/XAO/XAO_StringField.cxx +++ b/src/XAO/XAO_StringField.cxx @@ -30,19 +30,19 @@ StringField::StringField(const XAO::Dimension& dimension, const int& nbElements, } Step* StringField::addNewStep(const int& step) -throw (XAO_Exception) + { return addStep(step, 0); } StringStep* StringField::addStep(const int& step) -throw (XAO_Exception) + { return addStep(step, 0); } StringStep* StringField::addStep(const int& step, const int& stamp) -throw (XAO_Exception) + { if (hasStep(step)) throw XAO_Exception(MsgBuilder() << "Step with number " << step << " already exists."); @@ -53,7 +53,7 @@ throw (XAO_Exception) } StringStep* StringField::getStep(const int& index) -throw (XAO_Exception) + { checkStepIndex(index); return (StringStep*)m_steps[index]; diff --git a/src/XAO/XAO_StringField.hxx b/src/XAO/XAO_StringField.hxx index 8788a1274..6423ae144 100644 --- a/src/XAO/XAO_StringField.hxx +++ b/src/XAO/XAO_StringField.hxx @@ -52,14 +52,14 @@ namespace XAO virtual const XAO::Type getType() { return XAO::STRING; } - virtual Step* addNewStep(const int& step) throw (XAO_Exception); + virtual Step* addNewStep(const int& step) ; /** * Adds a new step. * @param step the number of the step. * @return the newly created step. */ - StringStep* addStep(const int& step) throw (XAO_Exception); + StringStep* addStep(const int& step) ; /** * Adds a new step. @@ -67,14 +67,14 @@ namespace XAO * @param stamp the stamp of the step. * @return the newly created step. */ - StringStep* addStep(const int& step, const int& stamp) throw (XAO_Exception); + StringStep* addStep(const int& step, const int& stamp) ; /** * Gets the step of given index. * @param index the index of the step. * @return the step for the given index. */ - StringStep* getStep(const int& index) throw (XAO_Exception); + StringStep* getStep(const int& index) ; }; } diff --git a/src/XAO/XAO_StringStep.cxx b/src/XAO/XAO_StringStep.cxx index 7c1d40e98..ab498ca36 100644 --- a/src/XAO/XAO_StringStep.cxx +++ b/src/XAO/XAO_StringStep.cxx @@ -56,7 +56,7 @@ std::vector StringStep::getValues() } std::vector StringStep::getElement(const int& element) -throw (XAO_Exception) + { checkElementIndex(element); @@ -65,7 +65,7 @@ throw (XAO_Exception) } std::vector StringStep::getComponent(const int& component) -throw (XAO_Exception) + { checkComponentIndex(component); @@ -83,7 +83,7 @@ throw (XAO_Exception) } const std::string StringStep::getValue(const int& element, const int& component) -throw (XAO_Exception) + { checkElementIndex(element); checkComponentIndex(component); @@ -92,13 +92,13 @@ throw (XAO_Exception) } const std::string StringStep::getStringValue(const int& element, const int& component) -throw (XAO_Exception) + { return getValue(element, component); } void StringStep::setValues(const std::vector& values) -throw (XAO_Exception) + { checkNbValues(values.size()); @@ -112,7 +112,7 @@ throw (XAO_Exception) } void StringStep::setElement(const int& element, const std::vector& elements) -throw (XAO_Exception) + { checkElementIndex(element); checkNbComponents(elements.size()); @@ -122,7 +122,7 @@ throw (XAO_Exception) } void StringStep::setComponent(const int& component, const std::vector& components) -throw (XAO_Exception) + { checkElementIndex(component); checkNbElements(components.size()); @@ -132,7 +132,7 @@ throw (XAO_Exception) } void StringStep::setValue(const int& element, const int& component, const std::string& value) -throw (XAO_Exception) + { checkElementIndex(element); checkComponentIndex(component); @@ -141,7 +141,7 @@ throw (XAO_Exception) } void StringStep::setStringValue(const int& element, const int& component, const std::string& value) -throw (XAO_Exception) + { setValue(element, component, value); } diff --git a/src/XAO/XAO_StringStep.hxx b/src/XAO/XAO_StringStep.hxx index c26fd942d..f807d1a78 100644 --- a/src/XAO/XAO_StringStep.hxx +++ b/src/XAO/XAO_StringStep.hxx @@ -64,14 +64,14 @@ namespace XAO * @param element the index of the element. * @return a vector containing all the values for the given element. */ - std::vector getElement(const int& element) throw (XAO_Exception); + std::vector getElement(const int& element) ; /** * Gets all the values for a given component. * @param component the index of the component. * @return a vector containing all the values for the given component. */ - std::vector getComponent(const int& component) throw (XAO_Exception); + std::vector getComponent(const int& component) ; /** * Gets the value for an element and a component. @@ -79,27 +79,27 @@ namespace XAO * @param component the index of the component. * @return the value for the given element and component. */ - const std::string getValue(const int& element, const int& component) throw (XAO_Exception); + const std::string getValue(const int& element, const int& component) ; /** * Sets all the values from a list. * @param values the list of values to set. */ - void setValues(const std::vector& values) throw (XAO_Exception); + void setValues(const std::vector& values) ; /** * Sets the values for an element. * @param element the index of the element to set. * @param elements the values to set. */ - void setElement(const int& element, const std::vector& elements) throw (XAO_Exception); + void setElement(const int& element, const std::vector& elements) ; /** * Sets the values for a component. * @param component the index of the component to set. * @param components the values to set. */ - void setComponent(const int& component, const std::vector& components) throw (XAO_Exception); + void setComponent(const int& component, const std::vector& components) ; /** * Sets the value for an element and a component. @@ -107,10 +107,10 @@ namespace XAO * @param component the index of the component. * @param value the value. */ - void setValue(const int& element, const int& component, const std::string& value) throw (XAO_Exception); + void setValue(const int& element, const int& component, const std::string& value) ; - virtual const std::string getStringValue(const int& element, const int& component) throw (XAO_Exception); - virtual void setStringValue(const int& element, const int& component, const std::string& value) throw (XAO_Exception); + virtual const std::string getStringValue(const int& element, const int& component) ; + virtual void setStringValue(const int& element, const int& component, const std::string& value) ; private: std::vector< std::vector > m_values; diff --git a/src/XAO/XAO_Xao.cxx b/src/XAO/XAO_Xao.cxx index c9bdf0e6a..ee2447e09 100644 --- a/src/XAO/XAO_Xao.cxx +++ b/src/XAO/XAO_Xao.cxx @@ -75,7 +75,7 @@ const int Xao::countGroups() const } Group* Xao::getGroup(const int& index) -throw (XAO_Exception) + { checkGroupIndex(index); @@ -90,7 +90,7 @@ throw (XAO_Exception) } Group* Xao::addGroup(const XAO::Dimension& dim, const std::string& name) -throw (XAO_Exception) + { checkGeometry(); checkGroupDimension(dim); @@ -121,13 +121,13 @@ const int Xao::countFields() const } const XAO::Type Xao::getFieldType(const int& index) -throw (XAO_Exception) + { return getField(index)->getType(); } Field* Xao::getField(const int& index) -throw (XAO_Exception) + { checkFieldIndex(index); @@ -142,7 +142,7 @@ throw (XAO_Exception) } BooleanField* Xao::getBooleanField(const int& index) -throw (XAO_Exception) + { Field* field = getField(index); if (field->getType() != XAO::BOOLEAN) @@ -151,7 +151,7 @@ throw (XAO_Exception) } DoubleField* Xao::getDoubleField(const int& index) -throw (XAO_Exception) + { Field* field = getField(index); if (field->getType() != XAO::DOUBLE) @@ -160,7 +160,7 @@ throw (XAO_Exception) } IntegerField* Xao::getIntegerField(const int& index) -throw (XAO_Exception) + { Field* field = getField(index); if (field->getType() != XAO::INTEGER) @@ -169,7 +169,7 @@ throw (XAO_Exception) } StringField* Xao::getStringField(const int& index) -throw (XAO_Exception) + { Field* field = getField(index); if (field->getType() != XAO::STRING) @@ -178,7 +178,7 @@ throw (XAO_Exception) } Field* Xao::addField(const XAO::Type& type, const XAO::Dimension& dim, const int& nbComponents, const std::string& name) -throw (XAO_Exception) + { checkGeometry(); int nbElts = m_geometry->countElements(dim); @@ -188,7 +188,7 @@ throw (XAO_Exception) } IntegerField* Xao::addIntegerField(const XAO::Dimension& dim, const int& nbComponents, const std::string& name) -throw (XAO_Exception) + { checkGeometry(); int nbElts = m_geometry->countElements(dim); @@ -197,7 +197,7 @@ throw (XAO_Exception) return field; } BooleanField* Xao::addBooleanField(const XAO::Dimension& dim, const int& nbComponents, const std::string& name) -throw (XAO_Exception) + { checkGeometry(); int nbElts = m_geometry->countElements(dim); @@ -206,7 +206,7 @@ throw (XAO_Exception) return field; } DoubleField* Xao::addDoubleField(const XAO::Dimension& dim, const int& nbComponents, const std::string& name) -throw (XAO_Exception) + { checkGeometry(); int nbElts = m_geometry->countElements(dim); @@ -215,7 +215,7 @@ throw (XAO_Exception) return field; } StringField* Xao::addStringField(const XAO::Dimension& dim, const int& nbComponents, const std::string& name) -throw (XAO_Exception) + { checkGeometry(); int nbElts = m_geometry->countElements(dim); @@ -262,14 +262,12 @@ const bool Xao::setXML(const std::string& xml) } void Xao::checkGeometry() const -throw(XAO_Exception) { if (m_geometry == NULL) throw XAO_Exception("Geometry is null"); } void Xao::checkGroupIndex(const int& index) const -throw(XAO_Exception) { if (index >= 0 && index < countGroups()) return; @@ -279,7 +277,6 @@ throw(XAO_Exception) } void Xao::checkFieldIndex(const int& index) const -throw(XAO_Exception) { if (index >= 0 && index < countFields()) return; @@ -289,7 +286,6 @@ throw(XAO_Exception) } void Xao::checkGroupDimension(const XAO::Dimension& dim) const -throw(XAO_Exception) { if (dim == XAO::WHOLE) throw XAO_Exception(MsgBuilder() << "Invalid dimension for group: " << dim); diff --git a/src/XAO/XAO_Xao.hxx b/src/XAO/XAO_Xao.hxx index 8a005cb66..6bbf9de58 100644 --- a/src/XAO/XAO_Xao.hxx +++ b/src/XAO/XAO_Xao.hxx @@ -115,7 +115,7 @@ namespace XAO * Sets the geometry. * \param geometry the geometry to set. */ - void setGeometry(Geometry* geometry) throw (XAO_Exception) + void setGeometry(Geometry* geometry) { if (m_geometry != NULL) throw XAO_Exception("Geometry already set."); @@ -137,14 +137,14 @@ namespace XAO * \param index the index of the wanted group. * \return the group. */ - Group* getGroup(const int& index) throw (XAO_Exception); + Group* getGroup(const int& index) ; /** * Adds a group. * \param dim the dimension of the group. * \param name the name of the group. * \return the created group. */ - Group* addGroup(const XAO::Dimension& dim, const std::string& name = std::string("")) throw (XAO_Exception); + Group* addGroup(const XAO::Dimension& dim, const std::string& name = std::string("")) ; /** * Removes a group. * \param group the group to remove. @@ -167,19 +167,19 @@ namespace XAO * \param index the index of the wanted field. * \return the type of the field. */ - const XAO::Type getFieldType(const int& index) throw (XAO_Exception); + const XAO::Type getFieldType(const int& index) ; /** * Gets a field. * \param index the index of the wanted field. * \return the field. */ - Field* getField(const int& index) throw (XAO_Exception); + Field* getField(const int& index) ; - BooleanField* getBooleanField(const int& index) throw (XAO_Exception); - DoubleField* getDoubleField(const int& index) throw (XAO_Exception); - IntegerField* getIntegerField(const int& index) throw (XAO_Exception); - StringField* getStringField(const int& index) throw (XAO_Exception); + BooleanField* getBooleanField(const int& index) ; + DoubleField* getDoubleField(const int& index) ; + IntegerField* getIntegerField(const int& index) ; + StringField* getStringField(const int& index) ; /** * Adds a field. @@ -191,16 +191,16 @@ namespace XAO */ Field* addField(const XAO::Type& type, const XAO::Dimension& dim, const int& nbComponents, const std::string& name = std::string("")) - throw (XAO_Exception); + ; BooleanField* addBooleanField(const XAO::Dimension& dim, const int& nbComponents, - const std::string& name = std::string("")) throw (XAO_Exception); + const std::string& name = std::string("")) ; IntegerField* addIntegerField(const XAO::Dimension& dim, const int& nbComponents, - const std::string& name = std::string("")) throw (XAO_Exception); + const std::string& name = std::string("")) ; DoubleField* addDoubleField(const XAO::Dimension& dim, const int& nbComponents, - const std::string& name = std::string("")) throw (XAO_Exception); + const std::string& name = std::string("")) ; StringField* addStringField(const XAO::Dimension& dim, const int& nbComponents, - const std::string& name = std::string("")) throw (XAO_Exception); + const std::string& name = std::string("")) ; /** * Removes a field. @@ -239,10 +239,10 @@ namespace XAO const bool setXML(const std::string& xml); private: - void checkGeometry() const throw (XAO_Exception); - void checkGroupIndex(const int& index) const throw (XAO_Exception); - void checkFieldIndex(const int& index) const throw (XAO_Exception); - void checkGroupDimension(const XAO::Dimension& dim) const throw (XAO_Exception); + void checkGeometry() const ; + void checkGroupIndex(const int& index) const ; + void checkFieldIndex(const int& index) const ; + void checkGroupDimension(const XAO::Dimension& dim) const ; private: /** The author of the file. */ diff --git a/src/XAO/XAO_XaoExporter.cxx b/src/XAO/XAO_XaoExporter.cxx index 5f0230681..53313292d 100644 --- a/src/XAO/XAO_XaoExporter.cxx +++ b/src/XAO/XAO_XaoExporter.cxx @@ -639,7 +639,7 @@ namespace { } const bool XaoExporter::saveToFile(Xao* xaoObject, const std::string& fileName, const std::string& shapeFileName) -throw (XAO_Exception) + { xmlDocPtr doc = exportXMLDoc(xaoObject, shapeFileName); xmlSaveFormatFileEnc(fileName.c_str(), doc, "UTF-8", 1); // format = 1 for node indentation @@ -649,7 +649,7 @@ throw (XAO_Exception) } const std::string XaoExporter::saveToXml(Xao* xaoObject) -throw (XAO_Exception) + { xmlDocPtr doc = exportXMLDoc(xaoObject, ""); @@ -663,7 +663,7 @@ throw (XAO_Exception) } const bool XaoExporter::readFromFile(const std::string& fileName, Xao* xaoObject) -throw (XAO_Exception) + { // parse the file and get the DOM int options = XML_PARSE_HUGE | XML_PARSE_NOCDATA; @@ -678,7 +678,7 @@ throw (XAO_Exception) } const bool XaoExporter::setXML(const std::string& xml, Xao* xaoObject) -throw (XAO_Exception) + { int options = XML_PARSE_HUGE | XML_PARSE_NOCDATA; xmlDocPtr doc = xmlReadDoc(BAD_CAST xml.c_str(), "", NULL, options); diff --git a/src/XAO/XAO_XaoExporter.hxx b/src/XAO/XAO_XaoExporter.hxx index 6367bebe2..bdf2bcea6 100644 --- a/src/XAO/XAO_XaoExporter.hxx +++ b/src/XAO/XAO_XaoExporter.hxx @@ -48,7 +48,7 @@ namespace XAO * @return true if the export was successful, false otherwise. */ static const bool saveToFile(Xao* xaoObject, const std::string& fileName, const std::string& shapeFileName) - throw (XAO_Exception); + ; /** * Saves the XAO object to a XML string. @@ -56,7 +56,7 @@ namespace XAO * @return the XML string. */ static const std::string saveToXml(Xao* xaoObject) - throw (XAO_Exception); + ; /** * Reads a XAO object from a file. @@ -65,7 +65,7 @@ namespace XAO * @return true if the XAO object was read successful, false otherwise. */ static const bool readFromFile(const std::string& fileName, Xao* xaoObject) - throw (XAO_Exception); + ; /** * Reads a XAO object from an XML string. @@ -74,7 +74,7 @@ namespace XAO * @return true if the XAO object was read successful, false otherwise. */ static const bool setXML(const std::string& xml, Xao* xaoObject) - throw (XAO_Exception); + ; }; } diff --git a/src/XAO/XAO_XaoUtils.cxx b/src/XAO/XAO_XaoUtils.cxx index ed832be14..1106b32b8 100644 --- a/src/XAO/XAO_XaoUtils.cxx +++ b/src/XAO/XAO_XaoUtils.cxx @@ -35,7 +35,6 @@ const std::string XaoUtils::intToString(const int& value) } const int XaoUtils::stringToInt(const std::string& value) -throw(XAO_Exception) { int res; std::istringstream convert(value); @@ -52,7 +51,6 @@ const std::string XaoUtils::doubleToString(const double& value) } const double XaoUtils::stringToDouble(const std::string& value) -throw(XAO_Exception) { double res; std::istringstream convert(value); @@ -69,7 +67,6 @@ const std::string XaoUtils::booleanToString(const bool& value) } const bool XaoUtils::stringToBoolean(const std::string& value) -throw(XAO_Exception) { if (value == "true" || value == "1") return true; @@ -80,7 +77,6 @@ throw(XAO_Exception) } const std::string XaoUtils::dimensionToString(const XAO::Dimension& dimension) -throw(XAO_Exception) { if (dimension == XAO::VERTEX) return "vertex"; @@ -97,7 +93,6 @@ throw(XAO_Exception) } const XAO::Dimension XaoUtils::stringToDimension(const std::string& dimension) -throw(XAO_Exception) { if (dimension == "vertex") return XAO::VERTEX; @@ -114,7 +109,6 @@ throw(XAO_Exception) } const std::string XaoUtils::fieldTypeToString(const XAO::Type& type) -throw(XAO_Exception) { if (type ==XAO:: BOOLEAN) return "boolean"; @@ -129,7 +123,6 @@ throw(XAO_Exception) } const XAO::Type XaoUtils::stringToFieldType(const std::string& type) -throw(XAO_Exception) { if (type == "boolean") return XAO::BOOLEAN; @@ -144,7 +137,6 @@ throw(XAO_Exception) } const std::string XaoUtils::shapeFormatToString(const XAO::Format& format) -throw(XAO_Exception) { if (format == XAO::BREP) return "BREP"; @@ -155,7 +147,6 @@ throw(XAO_Exception) } const XAO::Format XaoUtils::stringToShapeFormat(const std::string& format) -throw(XAO_Exception) { if (format == "BREP") return XAO::BREP; diff --git a/src/XAO/XAO_XaoUtils.hxx b/src/XAO/XAO_XaoUtils.hxx index add0a2569..ec2d71ab7 100644 --- a/src/XAO/XAO_XaoUtils.hxx +++ b/src/XAO/XAO_XaoUtils.hxx @@ -86,7 +86,7 @@ namespace XAO * \return the integer value. * \throw XAO_Exception if value cannot be converted to string. */ - static const int stringToInt(const std::string& value) throw(XAO_Exception); + static const int stringToInt(const std::string& value); /** * Converts a double into a string. @@ -100,7 +100,7 @@ namespace XAO * \return the double value. * \throw XAO_Exception if value cannot be converted to string. */ - static const double stringToDouble(const std::string& value) throw(XAO_Exception); + static const double stringToDouble(const std::string& value); /** * Converts a boolean into a string. @@ -115,7 +115,7 @@ namespace XAO * \throw XAO_Exception if value cannot be converted to boolean. * \note accepted values are "true", "1", "false", "0". */ - static const bool stringToBoolean(const std::string& value) throw(XAO_Exception); + static const bool stringToBoolean(const std::string& value); /** * Converts a Dimension to string. @@ -123,7 +123,7 @@ namespace XAO * \return the dimension as a string. * \throw XAO_Exception */ - static const std::string dimensionToString(const XAO::Dimension& dimension) throw(XAO_Exception); + static const std::string dimensionToString(const XAO::Dimension& dimension); /** * Converts a string into a Dimension. @@ -131,7 +131,7 @@ namespace XAO * \return the converted Dimension. * \throw XAO_Exception if dimension cannot be converted. */ - static const XAO::Dimension stringToDimension(const std::string& dimension) throw(XAO_Exception); + static const XAO::Dimension stringToDimension(const std::string& dimension); /** * Converts a Type to string. @@ -139,7 +139,7 @@ namespace XAO * \return the Type as a string. * \throw XAO_Exception */ - static const std::string fieldTypeToString(const XAO::Type& type) throw(XAO_Exception); + static const std::string fieldTypeToString(const XAO::Type& type); /** * Converts a string into a Type. @@ -147,7 +147,7 @@ namespace XAO * \return the converted Type. * \throw XAO_Exception if type cannot be converted. */ - static const XAO::Type stringToFieldType(const std::string& type) throw(XAO_Exception); + static const XAO::Type stringToFieldType(const std::string& type); /** * Converts a Format to string. @@ -155,7 +155,7 @@ namespace XAO * \return the Format as a string. * \throw XAO_Exception */ - static const std::string shapeFormatToString(const XAO::Format& format) throw(XAO_Exception); + static const std::string shapeFormatToString(const XAO::Format& format); /** * Converts a string into a Format. @@ -163,7 +163,7 @@ namespace XAO * \return the converted Format. * \throw XAO_Exception if format cannot be converted. */ - static const XAO::Format stringToShapeFormat(const std::string& format) throw(XAO_Exception); + static const XAO::Format stringToShapeFormat(const std::string& format); }; /**