CAD Exchanger SDK
cadex::ModelData_PMIGraphicalElement Class Reference

Defines an elementary PMI graphical element. More...

Inheritance diagram for cadex::ModelData_PMIGraphicalElement:
cadex::ModelData_BaseObject

Classes

class  ComponentIterator
 Iterator over added components. More...
 

Public Types

typedef cadex::internal::ModelData_PMIGraphicalElementImpl ImplType
 
- Public Types inherited from cadex::ModelData_BaseObject
typedef int IdType
 Defines a type identifier.
 

Public Member Functions

 ModelData_PMIGraphicalElement ()
 Constructor. More...
 
 ModelData_PMIGraphicalElement (initialized)
 Constructor. More...
 
 ModelData_PMIGraphicalElement (ImplType *theImpl)
 Constructor (reserved for internal use).
 
void SetPlane (const ModelData_PMIPlane &thePlane)
 
ModelData_PMIPlane Plane () const
 
void AddComponent (const ModelData_PMIGraphicalElementComponent &theComponent)
 Adds a component.
 
bool IsEmpty () const
 Returns true if no graphical element components were added. More...
 
size_t NumberOfComponents () const
 Returns number of added components. More...
 
void Accept (ModelData_PMIGraphicalElementComponentVisitor &theVisitor) const
 Accepts the visitor. More...
 
- Public Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject ()
 Constructor. More...
 
IdType TypeId () const
 Returns an object type id. More...
 
template<typename T >
bool IsOfType () const
 Returns true if the object has a type T. More...
 
void SetName (const Base_UTF16String &theName)
 Sets an object name. More...
 
Base_UTF16String Name () const
 Returns an object name. More...
 
void Nullify ()
 Resets reference to implementation object. More...
 
bool IsNull () const
 Returns true if the object is nullified. More...
 
 operator bool () const
 Casts the object to the bool type. More...
 
internal::ModelData_BaseObjectImpl * Impl () const
 Return a handle to backend (reserved for internal use).
 

Static Public Member Functions

static IdType GetTypeId ()
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject (const internal::ModelData_BaseObjectImpl *theImpl)
 Constructor (reserved for internal use).
 
 ModelData_BaseObject (const internal::ModelData_BaseObjectImpl *theImpl, const Base_UTF16String &theName)
 Constructor (reserved for internal use).
 
template<typename T >
T * GetOrCreateImpl ()
 Reserved for internal use.
 

Detailed Description

Defines an elementary PMI graphical element.

An element is complete elementary PMI entity such as dimension or tolerance measurement.

An element stores a presentation of PMI element or annotation in graphical form. The information to be presented can be stored in different ways: outlines, text or triangulation. Therefore different components (ModelData_PMIGraphicalElementComponent subclasses) were introduced to enable complete description of element's graphical presentation.

An element contains components, plane, property table and its type.

See also
ModelData_PMITable, ModelData_PMIGraphicalElementComponent

Constructor & Destructor Documentation

◆ ModelData_PMIGraphicalElement() [1/2]

cadex::ModelData_PMIGraphicalElement::ModelData_PMIGraphicalElement ( )

Constructor.

Creates not initialized object, for which IsNull() returns true.

◆ ModelData_PMIGraphicalElement() [2/2]

cadex::ModelData_PMIGraphicalElement::ModelData_PMIGraphicalElement ( initialized  )
explicit

Constructor.

Creates initialized object, for which IsNull() returns false.

Member Function Documentation

◆ Accept()

void cadex::ModelData_PMIGraphicalElement::Accept ( ModelData_PMIGraphicalElementComponentVisitor theVisitor) const

Accepts the visitor.

The order of visiting will match the order of adding components with AddComponent().

◆ IsEmpty()

bool cadex::ModelData_PMIGraphicalElement::IsEmpty ( ) const

Returns true if no graphical element components were added.

Returns true if IsNull().

See also
AddComponent(), NumberOfComponents()

◆ NumberOfComponents()

size_t cadex::ModelData_PMIGraphicalElement::NumberOfComponents ( ) const

Returns number of added components.

Returns 0 if IsNull().

See also
AddComponent()