Open CASCADE Technology 6.6.0
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

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

#include <StepData_PDescr.hxx>

Inheritance diagram for StepData_PDescr:
Inheritance graph
[legend]

Public Member Functions

 StepData_PDescr ()
void SetName (const Standard_CString name)
Standard_CString Name () const
void SetSelect ()
 Declares this PDescr to be a Select, hence to have members
<me> itself can be the first member

void AddMember (const Handle< StepData_PDescr > &member)
 Adds a member to a SELECT description

void SetMemberName (const Standard_CString 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 Standard_CString enumdef)
 Adds an enum value as a string

void SetType (const Handle< Standard_Type > &atype)
 Sets <me> for an Entity which must match a Type (early-bound)

void SetDescr (const Standard_CString dscnam)
 Sets <me> for a Described Entity, whose Description must match
the type name <dscnam>

void AddArity (const Standard_Integer 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 Standard_Integer arity=1)
 Directly sets the arity count
0 : simple field
1 : LIST or ARRAY etc
2 : LIST OF LIST

void SetFrom (const Handle< StepData_PDescr > &other)
 Sets <me> as <other> but duplicated
Hence, some definition may be changed

void SetOptional (const Standard_Boolean opt=Standard_True)
 Sets/Unsets <me> to accept undefined values

void SetDerived (const Standard_Boolean der=Standard_True)
 Sets/Unsets <me> to be for a derived field

void SetField (const Standard_CString name, const Standard_Integer rank)
 Sets <me> to describe a field of an entity
With a name and a rank

Standard_Boolean IsSelect () const
 Tells if <me> is for a SELECT

Handle_StepData_PDescr Member (const Standard_CString 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

Standard_Boolean IsInteger () const
 Tells if <me> is for an Integer

Standard_Boolean IsReal () const
 Tells if <me> is for a Real value

Standard_Boolean IsString () const
 Tells if <me> is for a String value

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

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

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

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

Standard_Integer EnumValue (const Standard_CString 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

Standard_CString EnumText (const Standard_Integer val) const
 Returns the text which corresponds to a numeric value,
between 0 and EnumMax. It is limited by dots

Standard_Boolean IsEntity () const
 Tells if <me> is for an Entity, either Described or CDL Type

Standard_Boolean IsType (const 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)

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

Standard_Boolean IsDescr (const 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)

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

Standard_Integer Arity () const
 Returns the arity of <me>

Handle_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] ...

Standard_Boolean IsOptional () const
 Tells if <me> is Optional

Standard_Boolean IsDerived () const
 Tells if <me> is Derived

Standard_Boolean IsField () const
 Tells if <me> is a Field. Else it is a Type

Standard_CString FieldName () const
Standard_Integer FieldRank () const
virtual void Check (const StepData_Field &afild, Handle< Interface_Check > &ach) const
 Semantic Check of a Field : does it complies with the given
description ?


Constructor & Destructor Documentation

StepData_PDescr::StepData_PDescr ( )

Member Function Documentation

void StepData_PDescr::AddArity ( const Standard_Integer  arity = 1)
void StepData_PDescr::AddEnumDef ( const Standard_CString  enumdef)
void StepData_PDescr::AddMember ( const Handle< StepData_PDescr > &  member)
Standard_Integer StepData_PDescr::Arity ( ) const
virtual void StepData_PDescr::Check ( const StepData_Field afild,
Handle< Interface_Check > &  ach 
) const [virtual]
Standard_CString StepData_PDescr::DescrName ( ) const
Standard_Integer StepData_PDescr::EnumMax ( ) const
Standard_CString StepData_PDescr::EnumText ( const Standard_Integer  val) const
Standard_Integer StepData_PDescr::EnumValue ( const Standard_CString  name) const
Standard_CString StepData_PDescr::FieldName ( ) const
Standard_Integer StepData_PDescr::FieldRank ( ) const
Standard_Boolean StepData_PDescr::IsBoolean ( ) const
Standard_Boolean StepData_PDescr::IsDerived ( ) const
Standard_Boolean StepData_PDescr::IsDescr ( const Handle< StepData_EDescr > &  descr) const
Standard_Boolean StepData_PDescr::IsEntity ( ) const
Standard_Boolean StepData_PDescr::IsEnum ( ) const
Standard_Boolean StepData_PDescr::IsField ( ) const
Standard_Boolean StepData_PDescr::IsInteger ( ) const
Standard_Boolean StepData_PDescr::IsLogical ( ) const
Standard_Boolean StepData_PDescr::IsOptional ( ) const
Standard_Boolean StepData_PDescr::IsReal ( ) const
Standard_Boolean StepData_PDescr::IsSelect ( ) const
Standard_Boolean StepData_PDescr::IsString ( ) const
Standard_Boolean StepData_PDescr::IsType ( const Handle< Standard_Type > &  atype) const
Handle_StepData_PDescr StepData_PDescr::Member ( const Standard_CString  name) const
Standard_CString StepData_PDescr::Name ( ) const
void StepData_PDescr::SetArity ( const Standard_Integer  arity = 1)
void StepData_PDescr::SetBoolean ( )
void StepData_PDescr::SetDerived ( const Standard_Boolean  der = Standard_True)
void StepData_PDescr::SetDescr ( const Standard_CString  dscnam)
void StepData_PDescr::SetEnum ( )
void StepData_PDescr::SetField ( const Standard_CString  name,
const Standard_Integer  rank 
)
void StepData_PDescr::SetFrom ( const Handle< StepData_PDescr > &  other)
void StepData_PDescr::SetInteger ( )
void StepData_PDescr::SetLogical ( )
void StepData_PDescr::SetMemberName ( const Standard_CString  memname)
void StepData_PDescr::SetName ( const Standard_CString  name)
void StepData_PDescr::SetOptional ( const Standard_Boolean  opt = Standard_True)
void StepData_PDescr::SetReal ( )
void StepData_PDescr::SetSelect ( )
void StepData_PDescr::SetString ( )
void StepData_PDescr::SetType ( const Handle< Standard_Type > &  atype)
Handle_StepData_PDescr StepData_PDescr::Simple ( ) const
Handle_Standard_Type StepData_PDescr::Type ( ) const

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines