cee::ug::PartInfo
-
class PartInfo
Simple class containing metadata info for a part.
A result info contains:
Part id
Part name
Default part id is -1 which indicates an invalid id.
Metadata for a model is accessed from the data source directory.
Example
Example on getting the name of a specific part using the metadata directory.
int geometryIndex = 0; int partId = 1; PartInfo partInfo = source->directory()->findPartInfo(geometryIndex, partId); sdt::wstring partName = partInfo.name();
See also
Public Functions
-
PartInfo()
Constructs an empty object.
Default id is -1 (invalid).
-
PartInfo(int partId, const Str &partName)
Constructs a new object with the given part id and part name.
-
PartInfo &operator=(const PartInfo &rhs)
Assigns rhs to this part info and returns a reference to this part info.
-
int id() const
Returns the part id.
Returns -1 if this object is invalid.
-
bool isBoundaryCondition() const
Returns true if the part is used to locate boundary conditions.
-
void setBoundaryCondition(bool on)
Sets the flag that indicates if the part is used to locate boundary conditions.
-
int parentId() const
Returns the parent part id.
Returns -1 if this object is invalid or has not been set
-
void setParentId(int parentId)
Sets the parent Part info.
-
Str partDataValue(const Str &name) const
Returns the value of the given part data attribute.
Part data is additional key/value pairs provided by the file reader, and is only used for information purposes.