}
//=================================================================================================
-GeomAlgoAPI_Exception::~GeomAlgoAPI_Exception() throw()
+GeomAlgoAPI_Exception::~GeomAlgoAPI_Exception() noexcept
{
}
//=================================================================================================
-const char* GeomAlgoAPI_Exception::what() const throw()
+const char* GeomAlgoAPI_Exception::what() const noexcept
{
return myMessageError.c_str();
-}
\ No newline at end of file
+}
/// \param theMessageError Error message to be displayed
GEOMALGOAPI_EXPORT GeomAlgoAPI_Exception(std::string theMessageError);
/// Destroyer
- GEOMALGOAPI_EXPORT ~GeomAlgoAPI_Exception() throw();
+ GEOMALGOAPI_EXPORT ~GeomAlgoAPI_Exception() noexcept;
/// Allows to collet the error
- GEOMALGOAPI_EXPORT const char* what() const throw();
+ GEOMALGOAPI_EXPORT const char* what() const noexcept;
private:
std::string myMessageError; /// Error message to be displayed.
};
-#endif
\ No newline at end of file
+#endif
#include <math.h>
-static GeomShapePtr runAlgo(GeomAlgoAPI_MakeShape& theAlgo) throw (GeomAlgoAPI_Exception)
+static GeomShapePtr runAlgo(GeomAlgoAPI_MakeShape& theAlgo)
{
if (!theAlgo.check())
throw GeomAlgoAPI_Exception(theAlgo.getError());
}
static GeomShapePtr runAlgoAndCheckShape(GeomAlgoAPI_MakeShape& theAlgo, const std::string& theMsg)
-throw (GeomAlgoAPI_Exception)
+
{
if (!theAlgo.check())
throw GeomAlgoAPI_Exception(theAlgo.getError());
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeBox(
const double theDx, const double theDy,
- const double theDz) throw (GeomAlgoAPI_Exception)
+ const double theDz)
{
static const std::string aMsg("Box builder with dimensions");
GeomAlgoAPI_Box aBoxAlgo(theDx,theDy,theDz);
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeBox(
std::shared_ptr<GeomAPI_Pnt> theFirstPoint,
- std::shared_ptr<GeomAPI_Pnt> theSecondPoint) throw (GeomAlgoAPI_Exception)
+ std::shared_ptr<GeomAPI_Pnt> theSecondPoint)
{
static const std::string aMsg("Box builder with two points");
GeomAlgoAPI_Box aBoxAlgo(theFirstPoint, theSecondPoint);
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeCylinder(
std::shared_ptr<GeomAPI_Pnt> theBasePoint, std::shared_ptr<GeomAPI_Edge> theEdge,
- double theRadius, double theHeight) throw (GeomAlgoAPI_Exception)
+ double theRadius, double theHeight)
{
// Check if the base point is OK
if (!theBasePoint) {
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeCylinder(
std::shared_ptr<GeomAPI_Pnt> theBasePoint, std::shared_ptr<GeomAPI_Edge> theEdge,
- double theRadius, double theHeight, double theAngle) throw (GeomAlgoAPI_Exception)
+ double theRadius, double theHeight, double theAngle)
{
// Check if the base point is OK
if (!theBasePoint) {
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeCylinder(
- double theRadius, double theHeight) throw (GeomAlgoAPI_Exception)
+ double theRadius, double theHeight)
{
std::shared_ptr<GeomAPI_Pnt> aBasePoint =
std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(0.,0.,0.));
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeCylinder(
- double theRadius, double theHeight, double theAngle) throw (GeomAlgoAPI_Exception)
+ double theRadius, double theHeight, double theAngle)
{
std::shared_ptr<GeomAPI_Pnt> aBasePoint =
std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(0.,0.,0.));
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeSphere(
- std::shared_ptr<GeomAPI_Pnt> theCenterPoint, double theRadius) throw (GeomAlgoAPI_Exception)
+ std::shared_ptr<GeomAPI_Pnt> theCenterPoint, double theRadius)
{
static const std::string aMsg("Sphere builder");
GeomAlgoAPI_Sphere aSphereAlgo(theCenterPoint, theRadius);
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeSphere(double theRadius)
- throw (GeomAlgoAPI_Exception)
+
{
std::shared_ptr<GeomAPI_Pnt> aCenterPoint =
std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(0.,0.,0.));
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeTorus(
std::shared_ptr<GeomAPI_Pnt> theBasePoint,
std::shared_ptr<GeomAPI_Edge> theEdge,double theRadius, double theRingRadius)
- throw (GeomAlgoAPI_Exception)
+
{
// Check if the base point is OK
if (!theBasePoint) {
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeTorus(double theRadius,
- double theRingRadius) throw (GeomAlgoAPI_Exception)
+ double theRingRadius)
{
std::shared_ptr<GeomAPI_Pnt> aBasePoint =
std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(0.,0.,0.));
std::shared_ptr<GeomAPI_Pnt> theBasePoint,
std::shared_ptr<GeomAPI_Edge> theEdge,
double theBaseRadius, double theTopRadius,
- double theHeight) throw (GeomAlgoAPI_Exception)
+ double theHeight)
{
// Check if the base point is OK
if (!theBasePoint) {
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeCone(
double theBaseRadius, double theTopRadius,
- double theHeight) throw (GeomAlgoAPI_Exception)
+ double theHeight)
{
std::shared_ptr<GeomAPI_Pnt> aBasePoint =
std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(0.,0.,0.));
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeTranslation(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Ax1> theAxis,
- const double theDistance) throw (GeomAlgoAPI_Exception)
+ const double theDistance)
{
GeomAlgoAPI_Translation aTranslationAlgo(theSourceShape, theAxis, theDistance);
return runAlgo(aTranslationAlgo);
std::shared_ptr<GeomAPI_Shape> theSourceShape,
const double theDx,
const double theDy,
- const double theDz) throw (GeomAlgoAPI_Exception)
+ const double theDz)
{
GeomAlgoAPI_Translation aTranslationAlgo(theSourceShape, theDx, theDy, theDz);
return runAlgo(aTranslationAlgo);
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeTranslation(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Pnt> theStartPoint,
- std::shared_ptr<GeomAPI_Pnt> theEndPoint) throw (GeomAlgoAPI_Exception)
+ std::shared_ptr<GeomAPI_Pnt> theEndPoint)
{
GeomAlgoAPI_Translation aTranslationAlgo(theSourceShape, theStartPoint, theEndPoint);
return runAlgo(aTranslationAlgo);
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeRotation(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Ax1> theAxis,
- const double theAngle) throw (GeomAlgoAPI_Exception)
+ const double theAngle)
{
GeomAlgoAPI_Rotation aRotationAlgo(theSourceShape, theAxis, theAngle);
return runAlgo(aRotationAlgo);
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
std::shared_ptr<GeomAPI_Pnt> theStartPoint,
- std::shared_ptr<GeomAPI_Pnt> theEndPoint) throw (GeomAlgoAPI_Exception)
+ std::shared_ptr<GeomAPI_Pnt> theEndPoint)
{
GeomAlgoAPI_Rotation aRotationAlgo(theSourceShape, theCenterPoint, theStartPoint, theEndPoint);
return runAlgo(aRotationAlgo);
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeSymmetry(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
- std::shared_ptr<GeomAPI_Pnt> thePoint) throw (GeomAlgoAPI_Exception)
+ std::shared_ptr<GeomAPI_Pnt> thePoint)
{
GeomAlgoAPI_Symmetry aSymmetryAlgo(theSourceShape, thePoint);
return runAlgo(aSymmetryAlgo);
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeSymmetry(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
- std::shared_ptr<GeomAPI_Ax1> theAxis) throw (GeomAlgoAPI_Exception)
+ std::shared_ptr<GeomAPI_Ax1> theAxis)
{
GeomAlgoAPI_Symmetry aSymmetryAlgo(theSourceShape, theAxis);
return runAlgo(aSymmetryAlgo);
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeSymmetry(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
- std::shared_ptr<GeomAPI_Ax2> thePlane) throw (GeomAlgoAPI_Exception)
+ std::shared_ptr<GeomAPI_Ax2> thePlane)
{
GeomAlgoAPI_Symmetry aSymmetryAlgo(theSourceShape, thePlane);
return runAlgo(aSymmetryAlgo);
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeScale(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
- const double theScaleFactor) throw (GeomAlgoAPI_Exception)
+ const double theScaleFactor)
{
GeomAlgoAPI_Scale aScaleAlgo(theSourceShape, theCenterPoint, theScaleFactor);
return runAlgo(aScaleAlgo);
std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
const double theScaleFactorX,
const double theScaleFactorY,
- const double theScaleFactorZ) throw (GeomAlgoAPI_Exception)
+ const double theScaleFactorZ)
{
GeomAlgoAPI_Scale aScaleAlgo(theSourceShape, theCenterPoint,
theScaleFactorX, theScaleFactorY, theScaleFactorZ);
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Ax1> theAxis,
const double theStep,
- const int theNumber) throw (GeomAlgoAPI_Exception)
+ const int theNumber)
{
if (!theAxis) {
std::string aError = "Multitranslation builder ";
const int theFirstNumber,
std::shared_ptr<GeomAPI_Ax1> theSecondAxis,
const double theSecondStep,
- const int theSecondNumber) throw (GeomAlgoAPI_Exception)
+ const int theSecondNumber)
{
if (!theFirstAxis) {
std::string aError = "Multitranslation builder ";
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeMultiRotation(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Ax1> theAxis,
- const int theNumber) throw (GeomAlgoAPI_Exception)
+ const int theNumber)
{
if (!theAxis) {
std::string aError = "Multirotation builder ";
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Ax1> theAxis,
const double theStep,
- const int theNumber) throw (GeomAlgoAPI_Exception)
+ const int theNumber)
{
if (!theAxis) {
std::string aError = "Multirotation builder ";
const double theRMin1, const double theRMax1,
const double theRMin2, const double theRMax2,
const double theZ,
- const double theStartPhi, const double theDeltaPhi) throw (GeomAlgoAPI_Exception)
+ const double theStartPhi, const double theDeltaPhi)
{
GeomAlgoAPI_ConeSegment aConeSegmentAlgo(theRMin1, theRMax1, theRMin2, theRMax2,
theZ, theStartPhi, theDeltaPhi);
/// \param theDz The dimension on Z
/// \return a shape
static std::shared_ptr<GeomAPI_Shape> makeBox(const double theDx, const double theDy,
- const double theDz) throw (GeomAlgoAPI_Exception);
+ const double theDz) ;
/// Creates a box using the two points that defined a diagonal.
/// \param theFirstPoint One extermity of the diagonal
/// \param theSecondPoint The other extremity of the diagonal
/// \return a shape
static std::shared_ptr<GeomAPI_Shape> makeBox(std::shared_ptr<GeomAPI_Pnt> theFirstPoint,
- std::shared_ptr<GeomAPI_Pnt> theSecondPoint) throw (GeomAlgoAPI_Exception);
+ std::shared_ptr<GeomAPI_Pnt> theSecondPoint) ;
/// Creates a cylinder using a center, an axis, a radius and a height.
/// \param theBasePoint The center of the lower base of the cylinder
/// \param theRadius The radius of the cylinder
/// \param theHeight The heigth of the cylinder
static std::shared_ptr<GeomAPI_Shape> makeCylinder(std::shared_ptr<GeomAPI_Pnt> theBasePoint,
- std::shared_ptr<GeomAPI_Edge> theEdge, double theRadius, double theHeight)
- throw (GeomAlgoAPI_Exception);
+ std::shared_ptr<GeomAPI_Edge> theEdge, double theRadius, double theHeight);
/// Creates a portion of cylinder using a center, an axis, a radius, a height and an angle.
/// \param theBasePoint The center of the lower base of the cylinder
/// \param theAngle The angle defining the portion
static std::shared_ptr<GeomAPI_Shape> makeCylinder(std::shared_ptr<GeomAPI_Pnt> theBasePoint,
std::shared_ptr<GeomAPI_Edge> theEdge, double theRadius, double theHeight,
- double theAngle) throw (GeomAlgoAPI_Exception);
+ double theAngle);
/// Creates a cylinder using the origin, the OZ axis, a radius and a height.
/// \param theRadius The radius of the cylinder
/// \param theHeight The heigth of the cylinder
- static std::shared_ptr<GeomAPI_Shape> makeCylinder(double theRadius, double theHeight)
- throw (GeomAlgoAPI_Exception);
+ static std::shared_ptr<GeomAPI_Shape> makeCylinder(double theRadius, double theHeight);
/// Creates a portion of cylinder using the origin, the OZ axis, a radius, a height and an angle.
/// \param theRadius The radius of the cylinder
/// \param theHeight The heigth of the cylinder
/// \param theAngle The angle defining the portion
static std::shared_ptr<GeomAPI_Shape> makeCylinder(double theRadius, double theHeight,
- double theAngle) throw (GeomAlgoAPI_Exception);
+ double theAngle) ;
/// Creates a sphere using a center and a radius.
/// \param theCenterPoint The center of the sphere
/// \param theRadius The radius of the sphere
static std::shared_ptr<GeomAPI_Shape> makeSphere(std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
- double theRadius) throw (GeomAlgoAPI_Exception);
+ double theRadius) ;
/// Creates a sphere using the origin and a radius.
/// \param theRadius The radius of the sphere
- static std::shared_ptr<GeomAPI_Shape> makeSphere(double theRadius)
- throw (GeomAlgoAPI_Exception);
+ static std::shared_ptr<GeomAPI_Shape> makeSphere(double theRadius);
/// Creates a torus using a base point, an axis, a radius and a ring radius.
/// \param theBasePoint The center of the torus
/// \param theRadius The radius of the torus
/// \param theRingRadius The ring radius of the torus
static std::shared_ptr<GeomAPI_Shape> makeTorus(std::shared_ptr<GeomAPI_Pnt> theBasePoint,
- std::shared_ptr<GeomAPI_Edge> theEdge, double theRadius, double theRingRadius)
- throw (GeomAlgoAPI_Exception);
+ std::shared_ptr<GeomAPI_Edge> theEdge, double theRadius, double theRingRadius);
/// Creates a torus using a radius and a ring radius.
/// \param theRadius The radius of the torus
/// \param theRingRadius The ring radius of the torus
- static std::shared_ptr<GeomAPI_Shape> makeTorus(double theRadius, double theRingRadius)
- throw (GeomAlgoAPI_Exception);
+ static std::shared_ptr<GeomAPI_Shape> makeTorus(double theRadius, double theRingRadius);
/// Creates a cone using a base point, an axis, a base radius, a top radius and a height.
/// \param theBasePoint The center of the lower base of the cone
/// \param theHeight The height of the cone
static std::shared_ptr<GeomAPI_Shape> makeCone(std::shared_ptr<GeomAPI_Pnt> theBasePoint,
std::shared_ptr<GeomAPI_Edge> theEdge, double theBaseRadius,
- double theTopRadius, double theHeight) throw (GeomAlgoAPI_Exception);
+ double theTopRadius, double theHeight) ;
/// Creates a cone using a base radius, a top radius and a height.
/// \param theBaseRadius The base radius of the cone
/// \param theTopRadius The top radius of the cone
/// \param theHeight The height of the cone
static std::shared_ptr<GeomAPI_Shape> makeCone(double theBaseRadius, double theTopRadius,
- double theHeight) throw (GeomAlgoAPI_Exception);
+ double theHeight) ;
/// Performs a translation from an axis and a distance.
/// \param theSourceShape Shape to be moved
static std::shared_ptr<GeomAPI_Shape> makeTranslation(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Ax1> theAxis,
- const double theDistance) throw (GeomAlgoAPI_Exception);
+ const double theDistance);
/// Performs a translation from dimensions.
/// \param theSourceShape Shape to be moved
std::shared_ptr<GeomAPI_Shape> theSourceShape,
const double theDx,
const double theDy,
- const double theDz) throw (GeomAlgoAPI_Exception);
+ const double theDz) ;
/// Performs a translation from two points.
/// \param theSourceShape Shape to be moved
static std::shared_ptr<GeomAPI_Shape> makeTranslation(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Pnt> theStartPoint,
- std::shared_ptr<GeomAPI_Pnt> theEndPoint) throw (GeomAlgoAPI_Exception);
+ std::shared_ptr<GeomAPI_Pnt> theEndPoint) ;
/// Performs a rotation from an axis and an angle.
/// \param theSourceShape Shape to be rotated
static std::shared_ptr<GeomAPI_Shape> makeRotation(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Ax1> theAxis,
- const double theAngle) throw (GeomAlgoAPI_Exception);
+ const double theAngle) ;
/// Performs a rotation from three points.
/// \param theSourceShape Shape to be rotated
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
std::shared_ptr<GeomAPI_Pnt> theStartPoint,
- std::shared_ptr<GeomAPI_Pnt> theEndPoint) throw (GeomAlgoAPI_Exception);
+ std::shared_ptr<GeomAPI_Pnt> theEndPoint) ;
/// Performs a symmetry by a point.
/// \param theSourceShape Shape be symmetrized
/// \param thePoint Point of symmetry
static std::shared_ptr<GeomAPI_Shape> makeSymmetry(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
- std::shared_ptr<GeomAPI_Pnt> thePoint) throw (GeomAlgoAPI_Exception);
+ std::shared_ptr<GeomAPI_Pnt> thePoint) ;
/// Performs a symmetry by an axis.
/// \param theSourceShape Shape be symmetrized
/// \param theAxis Axis of symmetry
static std::shared_ptr<GeomAPI_Shape> makeSymmetry(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
- std::shared_ptr<GeomAPI_Ax1> theAxis) throw (GeomAlgoAPI_Exception);
+ std::shared_ptr<GeomAPI_Ax1> theAxis) ;
/// Performs a symmetry by a plane.
/// \param theSourceShape Shape be symmetrized
/// \param thePlane Plane of symmetry
static std::shared_ptr<GeomAPI_Shape> makeSymmetry(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
- std::shared_ptr<GeomAPI_Ax2> thePlane) throw (GeomAlgoAPI_Exception);
+ std::shared_ptr<GeomAPI_Ax2> thePlane) ;
/// Performs a scale by a scale factor.
/// \param theSourceShape Shape be scaled
static std::shared_ptr<GeomAPI_Shape> makeScale(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
- const double theScaleFactor) throw (GeomAlgoAPI_Exception);
+ const double theScaleFactor) ;
/// Performs a scale by dimensions.
/// \param theSourceShape Shape be scaled
std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
const double theScaleFactorX,
const double theScaleFactorY,
- const double theScaleFactorZ) throw (GeomAlgoAPI_Exception);
+ const double theScaleFactorZ) ;
/// Performs a multi translation along one axis, at a distance and a number of times
/// \param theSourceShape Shape to be moved
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Ax1> theAxis,
const double theStep,
- const int theNumber) throw (GeomAlgoAPI_Exception);
+ const int theNumber) ;
/// Performs a multi translation along two axis : a different distance on each axis
/// and a different number of times for each axis
const int theFirstNumber,
std::shared_ptr<GeomAPI_Ax1> theSecondAxis,
const double theSecondStep,
- const int theSecondNumber) throw (GeomAlgoAPI_Exception);
+ const int theSecondNumber) ;
/// Performs a multi rotation along one axis and a number of times
/// \param[in] theSourceShape Shape to be rotated
static std::shared_ptr<GeomAPI_Shape> makeMultiRotation(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Ax1> theAxis,
- const int theNumber) throw (GeomAlgoAPI_Exception);
+ const int theNumber);
/// Performs a multi rotation along one axis, at a step and a number of times
/// \param theSourceShape Shape to be moved
std::shared_ptr<GeomAPI_Shape> theSourceShape,
std::shared_ptr<GeomAPI_Ax1> theAxis,
const double theStep,
- const int theNumber) throw (GeomAlgoAPI_Exception);
+ const int theNumber) ;
/// Creates a cone segment using standard GDML parameters.
/// \param theRMin1 Inner radius at base of cone
const double theRMax2,
const double theZ,
const double theStartPhi,
- const double theDeltaPhi) throw (GeomAlgoAPI_Exception);
+ const double theDeltaPhi) ;
};
}
#endif
}
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((int)elements.size());
}
void BooleanStep::setComponent(const int& component, const std::vector<bool>& components)
-throw (XAO_Exception)
+
{
checkComponentIndex(component);
checkNbElements((int)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 yCoord the Y coordinate.
* @param zCoord the Z coordinate.
*/
- void getVertexXYZ(const int& vertexIndex, double& xCoord, double& yCoord, double& zCoord)
- throw (XAO_Exception);
+ void getVertexXYZ(const int& vertexIndex, double& xCoord, double& yCoord, double& zCoord);
/**
* 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);
+ TopoDS_Shape getSubShape(const TopoDS_Shape& mainShape, const TopAbs_ShapeEnum& shapeType, const int& shapeIndex);
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);
+ const int findElement(const XAO::Dimension& dim, const int& id);
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((int)values.size());
}
void DoubleStep::setElement(const int& element, const std::vector<double>& elements)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkNbComponents((int)elements.size());
}
void DoubleStep::setComponent(const int& component, const std::vector<double>& components)
-throw (XAO_Exception)
+
{
checkElementIndex(component);
checkNbElements((int)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((int)values.size());
}
void IntegerStep::setElement(const int& element, const std::vector<int>& elements)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkNbComponents((int)elements.size());
}
void IntegerStep::setComponent(const int& component, const std::vector<int>& components)
-throw (XAO_Exception)
+
{
checkElementIndex(component);
checkNbElements((int)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((int)values.size());
}
void StringStep::setElement(const int& element, const std::vector<std::string>& elements)
-throw (XAO_Exception)
+
{
checkElementIndex(element);
checkNbComponents((int)elements.size());
}
void StringStep::setComponent(const int& component, const std::vector<std::string>& components)
-throw (XAO_Exception)
+
{
checkElementIndex(component);
checkNbElements((int)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.
* \return the created field.
*/
Field* addField(const XAO::Type& type, const XAO::Dimension& dim, const int& nbComponents,
- const std::string& name = std::string(""))
- throw (XAO_Exception);
+ const std::string& name = std::string(""));
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);
* @param shapeFileName if not empty save the shape in an this external file.
* @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);
+ static const bool saveToFile(Xao* xaoObject, const std::string& fileName, const std::string& shapeFileName);
/**
* Saves the XAO object to a XML string.
* @param xaoObject the object to export.
* @return the XML string.
*/
- static const std::string saveToXml(Xao* xaoObject)
- throw (XAO_Exception);
+ static const std::string saveToXml(Xao* xaoObject);
/**
* Reads a XAO object from a file.
* @param xaoObject the XAO object.
* @return true if the XAO object was read successful, false otherwise.
*/
- static const bool readFromFile(const std::string& fileName, Xao* xaoObject)
- throw (XAO_Exception);
+ static const bool readFromFile(const std::string& fileName, Xao* xaoObject);
/**
* Reads a XAO object from an XML string.
* @param xaoObject the XAO object.
* @return true if the XAO object was read successful, false otherwise.
*/
- static const bool setXML(const std::string& xml, Xao* xaoObject)
- throw (XAO_Exception);
+ static const bool setXML(const std::string& xml, Xao* xaoObject);
};
}
}
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);
};
/**