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)
 Accepts a string as a unicode string.
 
cadex.UTF16String Name ()
 Returns empty string if the model element has no name (by default).
 
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)
 The order of visiting depends on the type of this object:
 
- 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

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(). Accepts an element visitor.

◆ CompareType()

static bool cadex.ModelData.ModelElement.CompareType ( cadex.BaseObject theObject)
inlinestatic

Returns true if theObject is a model element.

◆ Dispose()

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

Reimplemented from cadex.BaseObject.

◆ Name()

◆ PMI()

cadex.PMI.Data cadex.ModelData.ModelElement.PMI ( )
inline

Returns the object PMI.

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

◆ SetName()

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

Accepts a string as a unicode string.

See also
Name(). Sets a name.

◆ SetPMI()

void cadex.ModelData.ModelElement.SetPMI ( cadex.PMI.Data thePMI)
inline

Sets the object PMI.

◆ SetUuid()

void cadex.ModelData.ModelElement.SetUuid ( System.Guid theUuid)
inline

Sets an object uuid.

Examples
MTKConverter/Program.cs.

◆ Uuid()

System.Guid cadex.ModelData.ModelElement.Uuid ( )
inline

Returns an object uuid.

Examples
MTKConverter/Program.cs, and MTKConverter/main.cxx.