Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
Interface_UndefinedContent Class Reference

Defines resources for an "Undefined Entity" : such an Entity is used to describe an Entity which complies with the Norm, but of an Unknown Type : hence it is kept under a literal form (avoiding to loose data). UndefinedContent offers a way to store a list of Parameters, as literals or references to other Entities. More...

#include <Interface_UndefinedContent.hxx>

Inheritance diagram for Interface_UndefinedContent:
Inheritance graph
[legend]

Public Member Functions

 Interface_UndefinedContent ()
 Defines an empty UndefinedContent.
 
int NbParams () const
 Gives count of recorded parameters.
 
int NbLiterals () const
 Gives count of Literal Parameters.
 
bool ParamData (const int num, Interface_ParamType &ptype, occ::handle< Standard_Transient > &ent, occ::handle< TCollection_HAsciiString > &val) const
 Returns data of a Parameter : its type, and the entity if it designates en entity ("ent") or its literal value else ("str") Returned value (Boolean) : True if it is an Entity, False else.
 
Interface_ParamType ParamType (const int num) const
 Returns the ParamType of a Param, given its rank Error if num is not between 1 and NbParams.
 
bool IsParamEntity (const int num) const
 Returns True if a Parameter is recorded as an entity Error if num is not between 1 and NbParams.
 
occ::handle< Standard_TransientParamEntity (const int num) const
 Returns Entity corresponding to a Param, given its rank.
 
occ::handle< TCollection_HAsciiStringParamValue (const int num) const
 Returns literal value of a Parameter, given its rank.
 
void Reservate (const int nb, const int nblit)
 Manages reservation for parameters (internal use) (nb : total count of parameters, nblit : count of literals)
 
void AddLiteral (const Interface_ParamType ptype, const occ::handle< TCollection_HAsciiString > &val)
 Adds a literal Parameter to the list.
 
void AddEntity (const Interface_ParamType ptype, const occ::handle< Standard_Transient > &ent)
 Adds a Parameter which references an Entity.
 
void RemoveParam (const int num)
 Removes a Parameter given its rank.
 
void SetLiteral (const int num, const Interface_ParamType ptype, const occ::handle< TCollection_HAsciiString > &val)
 Sets a new value for the Parameter <num>, to a literal value (if it referenced formerly an Entity, this Entity is removed)
 
void SetEntity (const int num, const Interface_ParamType ptype, const occ::handle< Standard_Transient > &ent)
 Sets a new value for the Parameter <num>, to reference an Entity. To simply change the Entity, see the variant below.
 
void SetEntity (const int num, const occ::handle< Standard_Transient > &ent)
 Changes the Entity referenced by the Parameter <num> (with same ParamType)
 
Interface_EntityList EntityList () const
 Returns globally the list of param entities. Note that it can be used as shared entity list for the UndefinedEntity.
 
void GetFromAnother (const occ::handle< Interface_UndefinedContent > &other, Interface_CopyTool &TC)
 Copies contents of undefined entities; deigned to be called by GetFromAnother method from Undefined entity of each Interface (the basic operation is the same regardless the norm)
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
bool IsKind (const char *const theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Detailed Description

Defines resources for an "Undefined Entity" : such an Entity is used to describe an Entity which complies with the Norm, but of an Unknown Type : hence it is kept under a literal form (avoiding to loose data). UndefinedContent offers a way to store a list of Parameters, as literals or references to other Entities.

Each Interface must provide one "UndefinedEntity", which must have same basic description as all its types of entities : the best way would be double inheritance : on the Entity Root of the Norm and on an general "UndefinedEntity"

While it is not possible to do so, the UndefinedEntity of each Interface can define its own UndefinedEntity by INCLUDING (in a field) this UndefinedContent

Hence, for that UndefinedEntity, define a Constructor which creates this UndefinedContent, plus access methods to it (or to its data, calling methods defined here).

Finally, the Protocols of each norm have to Create and Recognize Unknown Entities of this norm

Constructor & Destructor Documentation

◆ Interface_UndefinedContent()

Interface_UndefinedContent::Interface_UndefinedContent ( )

Defines an empty UndefinedContent.

Member Function Documentation

◆ AddEntity()

void Interface_UndefinedContent::AddEntity ( const Interface_ParamType ptype,
const occ::handle< Standard_Transient > & ent )

Adds a Parameter which references an Entity.

◆ AddLiteral()

void Interface_UndefinedContent::AddLiteral ( const Interface_ParamType ptype,
const occ::handle< TCollection_HAsciiString > & val )

Adds a literal Parameter to the list.

◆ EntityList()

Interface_EntityList Interface_UndefinedContent::EntityList ( ) const

Returns globally the list of param entities. Note that it can be used as shared entity list for the UndefinedEntity.

◆ GetFromAnother()

void Interface_UndefinedContent::GetFromAnother ( const occ::handle< Interface_UndefinedContent > & other,
Interface_CopyTool & TC )

Copies contents of undefined entities; deigned to be called by GetFromAnother method from Undefined entity of each Interface (the basic operation is the same regardless the norm)

◆ IsParamEntity()

bool Interface_UndefinedContent::IsParamEntity ( const int num) const

Returns True if a Parameter is recorded as an entity Error if num is not between 1 and NbParams.

◆ NbLiterals()

int Interface_UndefinedContent::NbLiterals ( ) const

Gives count of Literal Parameters.

◆ NbParams()

int Interface_UndefinedContent::NbParams ( ) const

Gives count of recorded parameters.

◆ ParamData()

bool Interface_UndefinedContent::ParamData ( const int num,
Interface_ParamType & ptype,
occ::handle< Standard_Transient > & ent,
occ::handle< TCollection_HAsciiString > & val ) const

Returns data of a Parameter : its type, and the entity if it designates en entity ("ent") or its literal value else ("str") Returned value (Boolean) : True if it is an Entity, False else.

◆ ParamEntity()

occ::handle< Standard_Transient > Interface_UndefinedContent::ParamEntity ( const int num) const

Returns Entity corresponding to a Param, given its rank.

◆ ParamType()

Interface_ParamType Interface_UndefinedContent::ParamType ( const int num) const

Returns the ParamType of a Param, given its rank Error if num is not between 1 and NbParams.

◆ ParamValue()

occ::handle< TCollection_HAsciiString > Interface_UndefinedContent::ParamValue ( const int num) const

Returns literal value of a Parameter, given its rank.

◆ RemoveParam()

void Interface_UndefinedContent::RemoveParam ( const int num)

Removes a Parameter given its rank.

◆ Reservate()

void Interface_UndefinedContent::Reservate ( const int nb,
const int nblit )

Manages reservation for parameters (internal use) (nb : total count of parameters, nblit : count of literals)

◆ SetEntity() [1/2]

void Interface_UndefinedContent::SetEntity ( const int num,
const Interface_ParamType ptype,
const occ::handle< Standard_Transient > & ent )

Sets a new value for the Parameter <num>, to reference an Entity. To simply change the Entity, see the variant below.

◆ SetEntity() [2/2]

void Interface_UndefinedContent::SetEntity ( const int num,
const occ::handle< Standard_Transient > & ent )

Changes the Entity referenced by the Parameter <num> (with same ParamType)

◆ SetLiteral()

void Interface_UndefinedContent::SetLiteral ( const int num,
const Interface_ParamType ptype,
const occ::handle< TCollection_HAsciiString > & val )

Sets a new value for the Parameter <num>, to a literal value (if it referenced formerly an Entity, this Entity is removed)


The documentation for this class was generated from the following file: