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

This class is intended to describe the authorized form for a parameter, as a type or a value for a field. More...

#include <StepData_PDescr.hxx>

Inheritance diagram for StepData_PDescr:
Inheritance graph
[legend]

Public Member Functions

 StepData_PDescr ()
 
void SetName (const char *const name)
 
const charName () const
 
void SetSelect ()
 Declares this PDescr to be a Select, hence to have members <me> itself can be the first member.
 
void AddMember (const occ::handle< StepData_PDescr > &member)
 Adds a member to a SELECT description.
 
void SetMemberName (const char *const memname)
 Sets a name for SELECT member. To be used if a member is for an immediate type.
 
void SetInteger ()
 Sets <me> for an Integer value.
 
void SetReal ()
 Sets <me> for a Real value.
 
void SetString ()
 Sets <me> for a String value.
 
void SetBoolean ()
 Sets <me> for a Boolean value (false,true)
 
void SetLogical ()
 Sets <me> for a Logical value (false,true,unknown)
 
void SetEnum ()
 Sets <me> for an Enum value Then, call AddEnumDef ordered from the first one (value 0)
 
void AddEnumDef (const char *const enumdef)
 Adds an enum value as a string.
 
void SetType (const occ::handle< Standard_Type > &atype)
 Sets <me> for an Entity which must match a Type (early-bound)
 
void SetDescr (const char *const dscnam)
 Sets <me> for a Described Entity, whose Description must match the type name <dscnam>
 
void AddArity (const int arity=1)
 Adds an arity count to <me>, by default 1 1 : a simple field passes to a LIST/ARRAY etc or a LIST to a LIST OF LIST 2 : a simple field passes to a LIST OF LIST.
 
void SetArity (const int arity=1)
 Directly sets the arity count 0 : simple field 1 : LIST or ARRAY etc 2 : LIST OF LIST.
 
void SetFrom (const occ::handle< StepData_PDescr > &other)
 Sets <me> as <other> but duplicated Hence, some definition may be changed.
 
void SetOptional (const bool opt=true)
 Sets/Unsets <me> to accept undefined values.
 
void SetDerived (const bool der=true)
 Sets/Unsets <me> to be for a derived field.
 
void SetField (const char *const name, const int rank)
 Sets <me> to describe a field of an entity With a name and a rank.
 
bool IsSelect () const
 Tells if <me> is for a SELECT.
 
occ::handle< StepData_PDescrMember (const char *const name) const
 For a SELECT, returns the member whose name matches <name> To this member, the following question can then be asked Null Handle if <name> not matched or <me> not a SELECT.
 
bool IsInteger () const
 Tells if <me> is for an Integer.
 
bool IsReal () const
 Tells if <me> is for a Real value.
 
bool IsString () const
 Tells if <me> is for a String value.
 
bool IsBoolean () const
 Tells if <me> is for a Boolean value (false,true)
 
bool IsLogical () const
 Tells if <me> is for a Logical value (false,true,unknown)
 
bool IsEnum () const
 Tells if <me> is for an Enum value Then, call AddEnumDef ordered from the first one (value 0) Managed by an EnumTool.
 
int EnumMax () const
 Returns the maximum integer for a suitable value (count - 1)
 
int EnumValue (const char *const name) const
 Returns the numeric value found for an enum text The text must be in capitals and limited by dots A non-suitable text gives a negative value to be returned.
 
const charEnumText (const int val) const
 Returns the text which corresponds to a numeric value, between 0 and EnumMax. It is limited by dots.
 
bool IsEntity () const
 Tells if <me> is for an Entity, either Described or CDL Type.
 
bool IsType (const occ::handle< Standard_Type > &atype) const
 Tells if <me> is for an entity of a given CDL type (early-bnd) (works for <me> + nexts if <me> is a Select)
 
occ::handle< Standard_TypeType () const
 Returns the type to match (IsKind), for a CDL Entity (else, null handle)
 
bool IsDescr (const occ::handle< StepData_EDescr > &descr) const
 Tells if <me> is for a Described entity of a given EDescr (does this EDescr match description name ?). For late-bnd (works for <me> + nexts if <me> is a Select)
 
const charDescrName () const
 Returns the description (type name) to match, for a Described (else, empty string)
 
int Arity () const
 Returns the arity of <me>
 
occ::handle< StepData_PDescrSimple () const
 For a LIST or LIST OF LIST, Returns the PDescr for the simpler PDescr. Else, returns <me> This allows to have different attributes for Optional for instance, on a field, and on the parameter of a LIST : [OPTIONAL] LIST OF [OPTIONAL] ...
 
bool IsOptional () const
 Tells if <me> is Optional.
 
bool IsDerived () const
 Tells if <me> is Derived.
 
bool IsField () const
 Tells if <me> is a Field. Else it is a Type.
 
const charFieldName () const
 
int FieldRank () const
 
virtual void Check (const StepData_Field &afild, occ::handle< Interface_Check > &ach) const
 Semantic Check of a Field : does it complies with the given description ?
 
- 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

This class is intended to describe the authorized form for a parameter, as a type or a value for a field.

A PDescr firstly describes a type, which can be SELECT, i.e. have several members

Constructor & Destructor Documentation

◆ StepData_PDescr()

StepData_PDescr::StepData_PDescr ( )

Member Function Documentation

◆ AddArity()

void StepData_PDescr::AddArity ( const int arity = 1)

Adds an arity count to <me>, by default 1 1 : a simple field passes to a LIST/ARRAY etc or a LIST to a LIST OF LIST 2 : a simple field passes to a LIST OF LIST.

◆ AddEnumDef()

void StepData_PDescr::AddEnumDef ( const char *const enumdef)

Adds an enum value as a string.

◆ AddMember()

void StepData_PDescr::AddMember ( const occ::handle< StepData_PDescr > & member)

Adds a member to a SELECT description.

◆ Arity()

int StepData_PDescr::Arity ( ) const

Returns the arity of <me>

◆ Check()

virtual void StepData_PDescr::Check ( const StepData_Field & afild,
occ::handle< Interface_Check > & ach ) const
virtual

Semantic Check of a Field : does it complies with the given description ?

◆ DescrName()

const char * StepData_PDescr::DescrName ( ) const

Returns the description (type name) to match, for a Described (else, empty string)

◆ EnumMax()

int StepData_PDescr::EnumMax ( ) const

Returns the maximum integer for a suitable value (count - 1)

◆ EnumText()

const char * StepData_PDescr::EnumText ( const int val) const

Returns the text which corresponds to a numeric value, between 0 and EnumMax. It is limited by dots.

◆ EnumValue()

int StepData_PDescr::EnumValue ( const char *const name) const

Returns the numeric value found for an enum text The text must be in capitals and limited by dots A non-suitable text gives a negative value to be returned.

◆ FieldName()

const char * StepData_PDescr::FieldName ( ) const

◆ FieldRank()

int StepData_PDescr::FieldRank ( ) const

◆ IsBoolean()

bool StepData_PDescr::IsBoolean ( ) const

Tells if <me> is for a Boolean value (false,true)

◆ IsDerived()

bool StepData_PDescr::IsDerived ( ) const

Tells if <me> is Derived.

◆ IsDescr()

bool StepData_PDescr::IsDescr ( const occ::handle< StepData_EDescr > & descr) const

Tells if <me> is for a Described entity of a given EDescr (does this EDescr match description name ?). For late-bnd (works for <me> + nexts if <me> is a Select)

◆ IsEntity()

bool StepData_PDescr::IsEntity ( ) const

Tells if <me> is for an Entity, either Described or CDL Type.

◆ IsEnum()

bool StepData_PDescr::IsEnum ( ) const

Tells if <me> is for an Enum value Then, call AddEnumDef ordered from the first one (value 0) Managed by an EnumTool.

◆ IsField()

bool StepData_PDescr::IsField ( ) const

Tells if <me> is a Field. Else it is a Type.

◆ IsInteger()

bool StepData_PDescr::IsInteger ( ) const

Tells if <me> is for an Integer.

◆ IsLogical()

bool StepData_PDescr::IsLogical ( ) const

Tells if <me> is for a Logical value (false,true,unknown)

◆ IsOptional()

bool StepData_PDescr::IsOptional ( ) const

Tells if <me> is Optional.

◆ IsReal()

bool StepData_PDescr::IsReal ( ) const

Tells if <me> is for a Real value.

◆ IsSelect()

bool StepData_PDescr::IsSelect ( ) const

Tells if <me> is for a SELECT.

◆ IsString()

bool StepData_PDescr::IsString ( ) const

Tells if <me> is for a String value.

◆ IsType()

bool StepData_PDescr::IsType ( const occ::handle< Standard_Type > & atype) const

Tells if <me> is for an entity of a given CDL type (early-bnd) (works for <me> + nexts if <me> is a Select)

◆ Member()

occ::handle< StepData_PDescr > StepData_PDescr::Member ( const char *const name) const

For a SELECT, returns the member whose name matches <name> To this member, the following question can then be asked Null Handle if <name> not matched or <me> not a SELECT.

Remark : not to be asked for an entity type Hence, following IsInteger .. Enum* only apply on <me> and require Member While IsType applies on <me> and all Select Members

◆ Name()

const char * StepData_PDescr::Name ( ) const

◆ SetArity()

void StepData_PDescr::SetArity ( const int arity = 1)

Directly sets the arity count 0 : simple field 1 : LIST or ARRAY etc 2 : LIST OF LIST.

◆ SetBoolean()

void StepData_PDescr::SetBoolean ( )

Sets <me> for a Boolean value (false,true)

◆ SetDerived()

void StepData_PDescr::SetDerived ( const bool der = true)

Sets/Unsets <me> to be for a derived field.

◆ SetDescr()

void StepData_PDescr::SetDescr ( const char *const dscnam)

Sets <me> for a Described Entity, whose Description must match the type name <dscnam>

◆ SetEnum()

void StepData_PDescr::SetEnum ( )

Sets <me> for an Enum value Then, call AddEnumDef ordered from the first one (value 0)

◆ SetField()

void StepData_PDescr::SetField ( const char *const name,
const int rank )

Sets <me> to describe a field of an entity With a name and a rank.

◆ SetFrom()

void StepData_PDescr::SetFrom ( const occ::handle< StepData_PDescr > & other)

Sets <me> as <other> but duplicated Hence, some definition may be changed.

◆ SetInteger()

void StepData_PDescr::SetInteger ( )

Sets <me> for an Integer value.

◆ SetLogical()

void StepData_PDescr::SetLogical ( )

Sets <me> for a Logical value (false,true,unknown)

◆ SetMemberName()

void StepData_PDescr::SetMemberName ( const char *const memname)

Sets a name for SELECT member. To be used if a member is for an immediate type.

◆ SetName()

void StepData_PDescr::SetName ( const char *const name)

◆ SetOptional()

void StepData_PDescr::SetOptional ( const bool opt = true)

Sets/Unsets <me> to accept undefined values.

◆ SetReal()

void StepData_PDescr::SetReal ( )

Sets <me> for a Real value.

◆ SetSelect()

void StepData_PDescr::SetSelect ( )

Declares this PDescr to be a Select, hence to have members <me> itself can be the first member.

◆ SetString()

void StepData_PDescr::SetString ( )

Sets <me> for a String value.

◆ SetType()

void StepData_PDescr::SetType ( const occ::handle< Standard_Type > & atype)

Sets <me> for an Entity which must match a Type (early-bound)

◆ Simple()

occ::handle< StepData_PDescr > StepData_PDescr::Simple ( ) const

For a LIST or LIST OF LIST, Returns the PDescr for the simpler PDescr. Else, returns <me> This allows to have different attributes for Optional for instance, on a field, and on the parameter of a LIST : [OPTIONAL] LIST OF [OPTIONAL] ...

◆ Type()

occ::handle< Standard_Type > StepData_PDescr::Type ( ) const

Returns the type to match (IsKind), for a CDL Entity (else, null handle)


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