Hide menu
Loading...
Searching...
No Matches

Base class for part, instance and assembly. More...

#include <cadex/ModelData/ModelElement.hxx>

Inheritance diagram for cadex::ModelData::ModelElement:
cadex::BaseObject cadex::ModelData::Assembly cadex::ModelData::Instance cadex::ModelData::Part

Public Member Functions

void SetName (const UTF16String &theName)
 Sets a name.
 
UTF16String Name () const
 Returns a name.
 
void SetUuid (const Uuid &theUuid)
 Sets an object uuid.
 
cadex::Uuid Uuid () const
 Returns an object uuid.
 
void Accept (ModelElementVisitor &theVisitor) const
 Accepts an element visitor.
 
- Public Member Functions inherited from cadex::BaseObject
size_t Id () const
 Return unique identifier of public object.
 
internal::BaseObjectImpl * Impl () const
 
bool IsNull () const
 
 operator bool () const
 
template<typename T >
bool IsOfType () const
 
template<typename T >
T * Impl () const
 Reserved for internal use.
 

Static Public Member Functions

static bool CompareType (const BaseObject &theObject)
 Returns true if theObject is a model element.
 

Protected Member Functions

 ModelElement (const ImplType &theImpl)
 
- Protected Member Functions inherited from cadex::BaseObject
 BaseObject (const ImplType &theImpl)
 

Additional Inherited Members

- Public Types inherited from cadex::BaseObject
typedef std::shared_ptr< internal::BaseObjectImpl > ImplType
 

Detailed Description

Base class for part, instance and assembly.

Member Function Documentation

◆ Accept()

void cadex::ModelData::ModelElement::Accept ( ModelElementVisitor & theVisitor) const

Accepts an element visitor.

The order of visiting depends on the type of this object:

  • for a part invokes a visitor for the part (ModelData::ModelElementVisitor::operator());
  • for an instance first enters the instance by calling ModelData::ModelElementVisitor::VisitEnter()). If it returns true then visits the referred element. Then leaves the instance calling ModelData::ModelElementVisitor::VisitLeave().
  • for an assembly first enters the assembly by calling ModelData::ModelElementVisitor::VisitEnter()). If it returns true then visits all the assembly children. Then leaves the assembly calling ModelData::ModelElementVisitor::VisitLeave().

◆ Name()

◆ SetName()

void cadex::ModelData::ModelElement::SetName ( const UTF16String & theName)

Sets a name.

Accepts a string as a unicode string.

See also
Name().

◆ SetUuid()

void cadex::ModelData::ModelElement::SetUuid ( const Uuid & theUuid)

Sets an object uuid.

Must not be called on IsNull() object. Otherwise behavior is undefined.

See also
Uuid().
Examples
MTKConverter/Program.cs.

◆ Uuid()

Uuid cadex::ModelData::ModelElement::Uuid ( ) const

Returns an object uuid.

Returns nullable uuid if the object has no uuid (by default).

See also
SetUuid().
Examples
MTKConverter/Program.cs, and MTKConverter/main.cxx.