Simple class containing metadata info for a part. More...
Public Member Functions | |
PartInfo () | |
Constructs an empty object. More... | |
PartInfo (int partId, const Str &partName) | |
Constructs a new object with the given part id and part name. More... | |
PartInfo (const PartInfo &other) | |
Constructs a new PartInfo that is a copy of other. More... | |
PartInfo & | operator= (const PartInfo &rhs) |
Assigns rhs to this part info and returns a reference to this part info. More... | |
bool | operator== (const PartInfo &rhs) const |
Returns true if the object is equal to rhs. More... | |
bool | operator!= (const PartInfo &rhs) const |
Returns true if the object is not equal to rhs. More... | |
int | id () const |
Returns the part id. More... | |
Str | name () const |
Returns the part name. More... | |
bool | isBoundaryCondition () const |
Returns true if the part is used to locate boundary conditions. More... | |
void | setBoundaryCondition (bool on) |
Sets the flag that indicates if the part is used to locate boundary conditions. More... | |
int | parentId () const |
Returns the parent part id. More... | |
void | setParentId (int parentId) |
Sets the parent Part info. More... | |
Str | partDataValue (const Str &name) const |
Returns the value of the given part data attribute. More... | |
std::vector< Str > | partDataNames () const |
Returns the names of all the part data attributes for this part. More... | |
void | setPartData (const Str &name, const Str &value) |
Sets the value of the given part data attribute. Inserts the part data attribute if not already present. More... | |
Simple class containing metadata info for a part.
A result info contains:
Default part id is -1 which indicates an invalid id.
Metadata for a model is accessed from the data source directory.
Example on getting the name of a specific part using the metadata directory.
cee::ug::PartInfo::PartInfo | ( | ) |
Constructs an empty object.
Default id is -1 (invalid).
cee::ug::PartInfo::PartInfo | ( | int | partId, |
const Str & | partName | ||
) |
Constructs a new object with the given part id and part name.
cee::ug::PartInfo::PartInfo | ( | const PartInfo & | other | ) |
Constructs a new PartInfo that is a copy of other.
int cee::ug::PartInfo::id | ( | ) | const |
Returns the part id.
Returns -1 if this object is invalid.
bool cee::ug::PartInfo::isBoundaryCondition | ( | ) | const |
Returns true if the part is used to locate boundary conditions.
Str cee::ug::PartInfo::name | ( | ) | const |
Returns the part name.
bool cee::ug::PartInfo::operator!= | ( | const PartInfo & | rhs | ) | const |
Returns true if the object is not equal to rhs.
Assigns rhs to this part info and returns a reference to this part info.
bool cee::ug::PartInfo::operator== | ( | const PartInfo & | rhs | ) | const |
Returns true if the object is equal to rhs.
int cee::ug::PartInfo::parentId | ( | ) | const |
Returns the parent part id.
Returns -1 if this object is invalid or has not been set
std::vector< Str > cee::ug::PartInfo::partDataNames | ( | ) | const |
Returns the names of all the part data attributes for this part.
Part data is additional key/value pairs provided by the file reader, and is only used for information purposes.
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.
void cee::ug::PartInfo::setBoundaryCondition | ( | bool | on | ) |
Sets the flag that indicates if the part is used to locate boundary conditions.
void cee::ug::PartInfo::setParentId | ( | int | parentId | ) |
Sets the parent Part info.