Hide menu
Loading...
Searching...
No Matches
cadex.ModelData.ModelElement Class Reference

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

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

Public Member Functions

 ModelElement (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void SetName (cadex.UTF16String theName)
 Sets a name.
 
cadex.UTF16String Name ()
 Returns a name.
 
void SetUuid (System.Guid theUuid)
 Sets an object uuid.
 
System.Guid Uuid ()
 Returns an object uuid.
 
void SetPMI (cadex.PMI.Data thePMI)
 Sets the object PMI.
 
cadex.PMI.Data PMI ()
 Returns the object PMI.
 
void Accept (cadex.ModelData.ModelElementVisitor theVisitor)
 Accepts an element visitor.
 
- Public Member Functions inherited from cadex.BaseObject
 BaseObject (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 
bool IsNull ()
 
ulong Id ()
 Return unique identifier of public object.
 
bool IsEqual (cadex.BaseObject theObj)
 
override int GetHashCode ()
 
override bool Equals (System.Object o)
 

Static Public Member Functions

static bool CompareType (cadex.BaseObject theObject)
 Returns true if theObject is a model element.
 
static cadex.ModelData.ModelElement Cast (cadex.BaseObject theBase)
 

Protected Member Functions

override void Dispose (bool disposing)
 

Detailed Description

Base class for part, instance and assembly.

Examples
exploring/bom/Program.cs, exploring/bom/main.cxx, exploring/pmi/Program.cs, and exploring/pmi/main.cxx.

Member Function Documentation

◆ Accept()

void cadex.ModelData.ModelElement.Accept ( cadex.ModelData.ModelElementVisitor theVisitor)
inline

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().

◆ Dispose()

override void cadex.ModelData.ModelElement.Dispose ( bool disposing)
inlineprotectedvirtual

Reimplemented from cadex.BaseObject.

◆ Name()

◆ SetName()

void cadex.ModelData.ModelElement.SetName ( cadex.UTF16String theName)
inline

Sets a name.

Accepts a string as a unicode string.

See also
Name().