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;
// purpose :
//============================================================================
GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations()
- throw ( SALOME::SALOME_Exception )
{
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "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" );
// purpose :
//============================================================================
GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations()
- throw ( SALOME::SALOME_Exception )
+
{
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "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" );
// purpose :
//============================================================================
GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations()
- throw ( SALOME::SALOME_Exception )
+
{
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "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" );
// purpose :
//============================================================================
GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations()
- throw ( SALOME::SALOME_Exception )
+
{
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "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" );
// purpose :
//============================================================================
GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations()
- throw ( SALOME::SALOME_Exception )
+
{
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "GEOM_Gen_i::IHealingOperations" );
// purpose :
//============================================================================
GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations()
- throw ( SALOME::SALOME_Exception )
+
{
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "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" );
// purpose :
//============================================================================
GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations()
- throw ( SALOME::SALOME_Exception )
+
{
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "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" );
// 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" );
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);
//-----------------------------------------------------------------------//
//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,
//============================================================================
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();
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);
}
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.");
}
BooleanStep* BooleanField::getStep(const int& index)
-throw (XAO_Exception)
{
checkStepIndex(index);
return (BooleanStep*)m_steps[index];
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.
* @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);
};
}
}
std::vector<bool> BooleanStep::getElement(const int& element)
-throw (XAO_Exception)
{
checkElementIndex(element);
}
std::vector<bool> BooleanStep::getComponent(const int& component)
-throw (XAO_Exception)
{
checkComponentIndex(component);
}
const bool BooleanStep::getValue(const int& element, const int& component)
-throw (XAO_Exception)
{
checkElementIndex(element);
checkComponentIndex(component);
}
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<bool>& values)
-throw (XAO_Exception)
{
checkNbValues((int)values.size());
}
void BooleanStep::setElement(const int& element, const std::vector<bool>& elements)
-throw (XAO_Exception)
{
checkElementIndex(element);
checkNbComponents(elements.size());
}
void BooleanStep::setComponent(const int& component, const std::vector<bool>& components)
-throw (XAO_Exception)
{
checkComponentIndex(component);
checkNbElements(components.size());
}
void BooleanStep::setValue(const int& element, const int& component, const bool& value)
-throw (XAO_Exception)
{
checkElementIndex(element);
checkComponentIndex(component);
}
void BooleanStep::setStringValue(const int& element, const int& component, const std::string& value)
-throw (XAO_Exception)
{
setValue(element, component, XaoUtils::stringToBoolean(value));
}
* @param element the index of the element to get.
* @return a vector containing all the values for the given element.
*/
- std::vector<bool> getElement(const int& element) throw (XAO_Exception);
+ std::vector<bool> 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<bool> getComponent(const int& component) throw (XAO_Exception);
+ std::vector<bool> getComponent(const int& component);
/**
* Gets a value for an element and a component.
* @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<bool>& values) throw (XAO_Exception);
+ void setValues(const std::vector<bool>& 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<bool>& elements) throw (XAO_Exception);
+ void setElement(const int& element, const std::vector<bool>& 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<bool>& components) throw (XAO_Exception);
+ void setComponent(const int& component, const std::vector<bool>& components);
/**
* Sets the value for an element and a component.
* @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<bool> > m_values;
}
void BrepGeometry::writeShapeFile(const std::string& fileName)
-throw (XAO_Exception)
{
bool res = BRepTools::Write(m_shape, fileName.c_str());
if (!res)
}
void BrepGeometry::readShapeFile(const std::string& fileName)
-throw (XAO_Exception)
{
BRep_Builder builder;
bool res = BRepTools::Read(m_shape, fileName.c_str(), builder);
}
TopoDS_Shape BrepGeometry::getSubShape(const TopoDS_Shape& mainShape, const TopAbs_ShapeEnum& shapeType, const int& shapeIndex)
-throw (XAO_Exception)
{
TopTools_MapOfShape mapShape;
TopTools_ListOfShape listShape;
}
void BrepGeometry::getVertexXYZ(const int& vertexIndex, double& xCoord, double& yCoord, double& zCoord)
-throw (XAO_Exception)
{
xCoord = 0.;
yCoord = 0.;
// -----------------------------
const int BrepGeometry::findElement(const XAO::Dimension& dim, const int& id)
-throw (XAO_Exception)
{
if (dim == XAO::VERTEX)
return findVertex(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);
}
* 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 %{
* @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.
* @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<int> 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;
}
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.");
}
DoubleStep* DoubleField::getStep(const int& index)
-throw (XAO_Exception)
+
{
checkStepIndex(index);
return (DoubleStep*)m_steps[index];
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.
* @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) ;
};
}
}
std::vector<double> DoubleStep::getElement(const int& element)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
}
std::vector<double> DoubleStep::getComponent(const int& component)
-throw (XAO_Exception)
+
{
checkComponentIndex(component);
}
const double DoubleStep::getValue(const int& element, const int& component)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkComponentIndex(component);
}
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<double>& values)
-throw (XAO_Exception)
+
{
checkNbValues(values.size());
}
void DoubleStep::setElement(const int& element, const std::vector<double>& elements)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkNbComponents(elements.size());
}
void DoubleStep::setComponent(const int& component, const std::vector<double>& components)
-throw (XAO_Exception)
+
{
checkElementIndex(component);
checkNbElements(components.size());
}
void DoubleStep::setValue(const int& element, const int& component, const double& value)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkComponentIndex(component);
}
void DoubleStep::setStringValue(const int& element, const int& component, const std::string& value)
-throw (XAO_Exception)
+
{
setValue(element, component, XaoUtils::stringToDouble(value));
}
* @param element the index of the element.
* @return a vector containing all the values for the given element.
*/
- std::vector<double> getElement(const int& element) throw (XAO_Exception);
+ std::vector<double> 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<double> getComponent(const int& component) throw (XAO_Exception);
+ std::vector<double> getComponent(const int& component) ;
/**
* Gets the value for an element and a component.
* @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<double>& values) throw (XAO_Exception);
+ void setValues(const std::vector<double>& 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<double>& elements) throw (XAO_Exception);
+ void setElement(const int& element, const std::vector<double>& 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<double>& components) throw (XAO_Exception);
+ void setComponent(const int& component, const std::vector<double>& components) ;
/**
* Sets the value for an element and a component.
* @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<double> > m_values;
{
}
- 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;
}
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);
}
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<std::string>& names)
-throw (XAO_Exception)
{
for (unsigned int i = 0; i < names.size(); ++i)
{
}
void Field::checkComponent(const int& component)
-throw (XAO_Exception)
{
if (component < m_nbComponents && component >= 0)
return;
}
void Field::checkStepIndex(const int& step)
-throw (XAO_Exception)
{
if (step < (int)m_steps.size() && step >= 0)
return;
*/
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.
* @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<std::string>& names) throw (XAO_Exception);
+ void setComponentsNames(const std::vector<std::string>& 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.
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. */
}
void GeometricElementList::checkElementIndex(const int& index) const
-throw (XAO_Exception)
{
if (m_count >= 0 && index < m_count)
return;
}
void GeometricElementList::setElement(const int& index, const std::string& name, const std::string& reference)
-throw (XAO_Exception)
{
checkElementIndex(index);
m_elements[index].setName(name);
}
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)
{
* \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.
* \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.
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;
}
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);
}
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();
}
const std::string Geometry::getElementReference(const XAO::Dimension& dim, const int& index)
-throw (XAO_Exception)
{
if (dim == XAO::VERTEX)
return getVertexReference(index);
}
const int Geometry::getElementIndexByReference(const XAO::Dimension& dim, const std::string& reference)
-throw (XAO_Exception)
{
if (dim == XAO::VERTEX)
return getVertexIndexByReference(reference);
}
GeometricElementList::iterator Geometry::begin(const XAO::Dimension& dim)
-throw (XAO_Exception)
{
if (dim == XAO::VERTEX)
return m_vertices.begin();
}
GeometricElementList::iterator Geometry::end(const XAO::Dimension& dim)
-throw (XAO_Exception)
{
if (dim == XAO::VERTEX)
return m_vertices.end();
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);
* @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.
* @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();
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);
-
- 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); }
-
- 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); }
-
- 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 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);
-
- 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 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 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) { 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) { 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) { 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) { 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) ;
+ 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) ;
+ 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.
void setReadOnly() { m_readOnly = true; }
protected:
- void checkReadOnly() throw (XAO_Exception);
+ void checkReadOnly() ;
protected:
std::string m_name;
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.");
}
void Group::checkIndex(const int& element)
-throw (XAO_Exception)
{
if (element < (int)m_elements.size() && element >= 0)
return;
* @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.
* @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. */
}
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.");
}
IntegerStep* IntegerField::getStep(const int& index)
-throw (XAO_Exception)
+
{
checkStepIndex(index);
return (IntegerStep*)m_steps[index];
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.
* @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) ;
};
}
}
std::vector<int> IntegerStep::getElement(const int& element)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
}
std::vector<int> IntegerStep::getComponent(const int& component)
-throw (XAO_Exception)
+
{
checkComponentIndex(component);
}
const int IntegerStep::getValue(const int& element, const int& component)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkComponentIndex(component);
}
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<int>& values)
-throw (XAO_Exception)
+
{
checkNbValues(values.size());
}
void IntegerStep::setElement(const int& element, const std::vector<int>& elements)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkNbComponents(elements.size());
}
void IntegerStep::setComponent(const int& component, const std::vector<int>& components)
-throw (XAO_Exception)
+
{
checkElementIndex(component);
checkNbElements(components.size());
}
void IntegerStep::setValue(const int& element, const int& component, const int& value)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkComponentIndex(component);
}
void IntegerStep::setStringValue(const int& element, const int& component, const std::string& value)
-throw (XAO_Exception)
+
{
setValue(element, component, XaoUtils::stringToInt(value));
}
* @param element the index of the element.
* @return a vector containing all the values for the given element.
*/
- std::vector<int> getElement(const int& element) throw (XAO_Exception);
+ std::vector<int> 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<int> getComponent(const int& component) throw (XAO_Exception);
+ std::vector<int> getComponent(const int& component) ;
/**
* Gets the value for an element and a component.
* @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<int>& values) throw (XAO_Exception);
+ void setValues(const std::vector<int>& 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<int>& elements) throw (XAO_Exception);
+ void setElement(const int& element, const std::vector<int>& 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<int>& components) throw (XAO_Exception);
+ void setComponent(const int& component, const std::vector<int>& components) ;
/**
* Sets the value for an element and a component.
* @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<int> > m_values;
using namespace XAO;
void Step::checkElementIndex(const int& element)
-throw (XAO_Exception)
{
if (element < m_nbElements && element >= 0)
return;
}
void Step::checkComponentIndex(const int& component)
-throw (XAO_Exception)
{
if (component < m_nbComponents && component >= 0)
return;
}
void Step::checkNbElements(const int& nbElements)
-throw (XAO_Exception)
{
if (nbElements == m_nbElements)
return;
}
void Step::checkNbComponents(const int& nbComponents)
-throw (XAO_Exception)
{
if (nbComponents == m_nbComponents)
return;
}
void Step::checkNbValues(const int& nbValues)
-throw (XAO_Exception)
{
if (nbValues == m_nbElements * m_nbComponents)
return;
* 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. */
}
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.");
}
StringStep* StringField::getStep(const int& index)
-throw (XAO_Exception)
+
{
checkStepIndex(index);
return (StringStep*)m_steps[index];
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.
* @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) ;
};
}
}
std::vector<std::string> StringStep::getElement(const int& element)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
}
std::vector<std::string> StringStep::getComponent(const int& component)
-throw (XAO_Exception)
+
{
checkComponentIndex(component);
}
const std::string StringStep::getValue(const int& element, const int& component)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkComponentIndex(component);
}
const std::string StringStep::getStringValue(const int& element, const int& component)
-throw (XAO_Exception)
+
{
return getValue(element, component);
}
void StringStep::setValues(const std::vector<std::string>& values)
-throw (XAO_Exception)
+
{
checkNbValues(values.size());
}
void StringStep::setElement(const int& element, const std::vector<std::string>& elements)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkNbComponents(elements.size());
}
void StringStep::setComponent(const int& component, const std::vector<std::string>& components)
-throw (XAO_Exception)
+
{
checkElementIndex(component);
checkNbElements(components.size());
}
void StringStep::setValue(const int& element, const int& component, const std::string& value)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkComponentIndex(component);
}
void StringStep::setStringValue(const int& element, const int& component, const std::string& value)
-throw (XAO_Exception)
+
{
setValue(element, component, value);
}
* @param element the index of the element.
* @return a vector containing all the values for the given element.
*/
- std::vector<std::string> getElement(const int& element) throw (XAO_Exception);
+ std::vector<std::string> 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<std::string> getComponent(const int& component) throw (XAO_Exception);
+ std::vector<std::string> getComponent(const int& component) ;
/**
* Gets the value for an element and a component.
* @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<std::string>& values) throw (XAO_Exception);
+ void setValues(const std::vector<std::string>& 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<std::string>& elements) throw (XAO_Exception);
+ void setElement(const int& element, const std::vector<std::string>& 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<std::string>& components) throw (XAO_Exception);
+ void setComponent(const int& component, const std::vector<std::string>& components) ;
/**
* Sets the value for an element and a component.
* @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<std::string> > m_values;
}
Group* Xao::getGroup(const int& index)
-throw (XAO_Exception)
+
{
checkGroupIndex(index);
}
Group* Xao::addGroup(const XAO::Dimension& dim, const std::string& name)
-throw (XAO_Exception)
+
{
checkGeometry();
checkGroupDimension(dim);
}
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);
}
BooleanField* Xao::getBooleanField(const int& index)
-throw (XAO_Exception)
+
{
Field* field = getField(index);
if (field->getType() != XAO::BOOLEAN)
}
DoubleField* Xao::getDoubleField(const int& index)
-throw (XAO_Exception)
+
{
Field* field = getField(index);
if (field->getType() != XAO::DOUBLE)
}
IntegerField* Xao::getIntegerField(const int& index)
-throw (XAO_Exception)
+
{
Field* field = getField(index);
if (field->getType() != XAO::INTEGER)
}
StringField* Xao::getStringField(const int& index)
-throw (XAO_Exception)
+
{
Field* field = getField(index);
if (field->getType() != XAO::STRING)
}
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);
}
IntegerField* Xao::addIntegerField(const XAO::Dimension& dim, const int& nbComponents, const std::string& name)
-throw (XAO_Exception)
+
{
checkGeometry();
int nbElts = m_geometry->countElements(dim);
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);
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);
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);
}
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;
}
void Xao::checkFieldIndex(const int& index) const
-throw(XAO_Exception)
{
if (index >= 0 && index < countFields())
return;
}
void Xao::checkGroupDimension(const XAO::Dimension& dim) const
-throw(XAO_Exception)
{
if (dim == XAO::WHOLE)
throw XAO_Exception(MsgBuilder() << "Invalid dimension for group: " << dim);
* 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.");
* \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.
* \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.
*/
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.
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. */
}
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
}
const std::string XaoExporter::saveToXml(Xao* xaoObject)
-throw (XAO_Exception)
+
{
xmlDocPtr doc = exportXMLDoc(xaoObject, "");
}
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;
}
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);
* @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.
* @return the XML string.
*/
static const std::string saveToXml(Xao* xaoObject)
- throw (XAO_Exception);
+ ;
/**
* Reads a XAO object from a file.
* @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.
* @return true if the XAO object was read successful, false otherwise.
*/
static const bool setXML(const std::string& xml, Xao* xaoObject)
- throw (XAO_Exception);
+ ;
};
}
}
const int XaoUtils::stringToInt(const std::string& value)
-throw(XAO_Exception)
{
int res;
std::istringstream convert(value);
}
const double XaoUtils::stringToDouble(const std::string& value)
-throw(XAO_Exception)
{
double res;
std::istringstream convert(value);
}
const bool XaoUtils::stringToBoolean(const std::string& value)
-throw(XAO_Exception)
{
if (value == "true" || value == "1")
return true;
}
const std::string XaoUtils::dimensionToString(const XAO::Dimension& dimension)
-throw(XAO_Exception)
{
if (dimension == XAO::VERTEX)
return "vertex";
}
const XAO::Dimension XaoUtils::stringToDimension(const std::string& dimension)
-throw(XAO_Exception)
{
if (dimension == "vertex")
return XAO::VERTEX;
}
const std::string XaoUtils::fieldTypeToString(const XAO::Type& type)
-throw(XAO_Exception)
{
if (type ==XAO:: BOOLEAN)
return "boolean";
}
const XAO::Type XaoUtils::stringToFieldType(const std::string& type)
-throw(XAO_Exception)
{
if (type == "boolean")
return XAO::BOOLEAN;
}
const std::string XaoUtils::shapeFormatToString(const XAO::Format& format)
-throw(XAO_Exception)
{
if (format == XAO::BREP)
return "BREP";
}
const XAO::Format XaoUtils::stringToShapeFormat(const std::string& format)
-throw(XAO_Exception)
{
if (format == "BREP")
return XAO::BREP;
* \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.
* \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.
* \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.
* \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.
* \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.
* \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.
* \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.
* \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.
* \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);
};
/**