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

Specific FileReaderData for Step Contains literal description of entities (for each one : type as a string, ident, parameter list) provides references evaluation, plus access to literal data and specific access methods (Boolean, XY, XYZ) More...

#include <StepData_StepReaderData.hxx>

Inheritance diagram for StepData_StepReaderData:
Inheritance graph
[legend]

Public Member Functions

 StepData_StepReaderData (const int nbheader, const int nbtotal, const int nbpar, const Resource_FormatType theSourceCodePage=Resource_FormatType_UTF8)
 creates StepReaderData correctly dimensioned (necessary at creation time, because it contains arrays) nbheader is nb of records for Header, nbtotal for Header+Data and nbpar gives the total count of parameters
 
void SetRecord (const int num, const char *const ident, const char *const type, const int nbpar)
 Fills the fields of a record.
 
void AddStepParam (const int num, const char *const aval, const Interface_ParamType atype, const int nument=0)
 Fills the fields of a parameter of a record. This is a variant of AddParam, Adapted to STEP (optimized for specific values)
 
const TCollection_AsciiStringRecordType (const int num) const
 Returns Record Type.
 
const charCType (const int num) const
 Returns Record Type as a CString was C++ : return const.
 
int RecordIdent (const int num) const
 Returns record identifier (Positive number) If returned ident is not positive : Sub-List or Scope mark.
 
int SubListNumber (const int num, const int nump, const bool aslast) const
 Returns SubList numero designated by a parameter (nump) in a record (num), or zero if the parameter does not exist or is not a SubList address. Zero too If aslast is True and nump is not for the last parameter.
 
bool IsComplex (const int num) const
 Returns True if <num> corresponds to a Complex Type Entity (as can be defined by ANDOR Express clause)
 
void ComplexType (const int num, NCollection_Sequence< TCollection_AsciiString > &types) const
 Returns the List of Types which correspond to a Complex Type Entity. If not Complex, there is just one Type in it For a SubList or a Scope mark, <types> remains empty.
 
int NextForComplex (const int num) const
 Returns the Next "Component" for a Complex Type Entity, of which <num> is already a Component (the first one or a next one) Returns 0 for a Simple Type or for the last Component.
 
bool NamedForComplex (const char *const name, const int num0, int &num, occ::handle< Interface_Check > &ach) const
 Determines the first component which brings a given name, for a Complex Type Entity <num0> is the very first record of this entity <num> is given the last NextNamedForComplex, starts at zero it is returned as the newly found number Hence, in the normal case, NextNamedForComplex starts by num0 if <num> is zero, else by NextForComplex(num) If the alphabetic order is not respected, it restarts from num0 and loops on NextForComplex until finding <name> In case of "non-alphabetic order", <ach> is filled with a Warning for this name In case of "not-found at all", <ach> is filled with a Fail, and <num> is returned as zero.
 
bool NamedForComplex (const char *const theName, const char *const theShortName, const int num0, int &num, occ::handle< Interface_Check > &ach) const
 Determines the first component which brings a given name, or short name for a Complex Type Entity <num0> is the very first record of this entity <num> is given the last NextNamedForComplex, starts at zero it is returned as the newly found number Hence, in the normal case, NextNamedForComplex starts by num0 if <num> is zero, else by NextForComplex(num) If the alphabetic order is not respected, it restarts from num0 and loops on NextForComplex until finding <name> In case of "non-alphabetic order", <ach> is filled with a Warning for this name In case of "not-found at all", <ach> is filled with a Fail, and <num> is returned as zero.
 
bool CheckNbParams (const int num, const int nbreq, occ::handle< Interface_Check > &ach, const char *const mess="") const
 Checks Count of Parameters of record <num> to equate <nbreq> If this Check is successful, returns True Else, fills <ach> with an Error Message then returns False <mess> is included in the Error message if given non empty.
 
bool ReadSubList (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, int &numsub, const bool optional=false, const int lenmin=0, const int lenmax=0) const
 reads parameter <nump> of record <num> as a sub-list (may be typed, see ReadTypedParameter in this case) Returns True if OK. Else (not a LIST), returns false and feeds Check with appropriate check If <optional> is True and Param is not defined, returns True with <ach> not filled and <numsub> returned as 0 Works with SubListNumber with <aslast> false (no specific case for last parameter)
 
int ReadSub (const int numsub, const char *const mess, occ::handle< Interface_Check > &ach, const occ::handle< StepData_PDescr > &descr, occ::handle< Standard_Transient > &val) const
 reads the content of a sub-list into a transient : SelectNamed, or HArray1 of Integer,Real,String,Transient ... recursive call if list of list ... If a sub-list has mixed types, an HArray1OfTransient is produced, it may contain SelectMember Intended to be called by ReadField The returned status is : negative if failed, 0 if empty. Else the kind to be recorded in the field
 
bool ReadMember (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, occ::handle< StepData_SelectMember > &val) const
 Reads parameter <nump> of record <num> into a SelectMember, self-sufficient (no Description needed) If <val> is already created, it will be filled, as possible And if reading does not match its own description, the result will be False If <val> is not it not yet created, it will be (SelectNamed) useful if a field is defined as a SelectMember, directly (SELECT with no Entity as member) But SelectType also manages SelectMember (for SELECT with some members as Entity, some other not)
 
template<class T >
bool ReadMember (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, occ::handle< T > &val) const
 Safe variant for arbitrary type of argument.
 
bool ReadField (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, const occ::handle< StepData_PDescr > &descr, StepData_Field &fild) const
 reads parameter <nump> of record <num> into a Field, controlled by a Parameter Descriptor (PDescr), which controls its allowed type(s) and value <ach> is filled if the read parameter does not match its description (but the field is read anyway) If the description is not defined, no control is done Returns True when done
 
bool ReadList (const int num, occ::handle< Interface_Check > &ach, const occ::handle< StepData_ESDescr > &descr, StepData_FieldList &list) const
 reads a list of fields controlled by an ESDescr
 
bool ReadAny (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, const occ::handle< StepData_PDescr > &descr, occ::handle< Standard_Transient > &val) const
 Reads parameter <nump> of record <num> into a Transient Value according to the type of the parameter : Named for Integer,Boolean,Logical,Enum,Real : SelectNamed Immediate Integer,Boolean,Logical,Enum,Real : SelectInt/Real Text : HAsciiString Ident : the referenced Entity Sub-List not processed, see ReadSub This value is controlled by a Parameter Descriptor (PDescr), which controls its allowed type and value <ach> is filled if the read parameter does not match its description (the select is nevertheless created if possible)
 
bool ReadXY (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, double &X, double &Y) const
 reads parameter <nump> of record <num> as a sub-list of two Reals X,Y. Returns True if OK. Else, returns false and feeds Check with appropriate Fails (parameter not a sub-list, not two Reals in the sub-list) composed with "mess" which gives the name of the parameter
 
bool ReadXYZ (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, double &X, double &Y, double &Z) const
 reads parameter <nump> of record <num> as a sub-list of three Reals X,Y,Z. Return value and Check managed as by ReadXY (demands a sub-list of three Reals)
 
bool ReadReal (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, double &val) const
 reads parameter <nump> of record <num> as a single Real value. Return value and Check managed as by ReadXY (demands a Real)
 
bool ReadEntity (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, const occ::handle< Standard_Type > &atype, occ::handle< Standard_Transient > &ent) const
 Reads parameter <nump> of record <num> as a single Entity. Return value and Check managed as by ReadReal (demands a reference to an Entity). In Addition, demands read Entity to be Kind of a required Type <atype>. Remark that returned status is False and <ent> is Null if parameter is not an Entity, <ent> remains Not Null is parameter is an Entity but is not Kind of required type.
 
template<class T >
bool ReadEntity (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, const occ::handle< Standard_Type > &atype, occ::handle< T > &ent) const
 Safe variant for arbitrary type of argument.
 
bool ReadEntity (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, StepData_SelectType &sel) const
 Same as above, but a SelectType checks Type Matching, and records the read Entity (see method Value from SelectType)
 
bool ReadInteger (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, int &val) const
 reads parameter <nump> of record <num> as a single Integer. Return value & Check managed as by ReadXY (demands an Integer)
 
bool ReadBoolean (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, bool &flag) const
 reads parameter <nump> of record <num> as a Boolean Return value and Check managed as by ReadReal (demands a Boolean enum, i.e. text ".T." for True or ".F." for False)
 
bool ReadLogical (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, StepData_Logical &flag) const
 reads parameter <nump> of record <num> as a Logical Return value and Check managed as by ReadBoolean (demands a Logical enum, i.e. text ".T.", ".F.", or ".U.")
 
bool ReadString (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, occ::handle< TCollection_HAsciiString > &val) const
 reads parameter <nump> of record <num> as a String (text between quotes, quotes are removed by the Read operation) Return value and Check managed as by ReadXY (demands a String)
 
bool ReadEnumParam (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, const char *&text) const
 
void FailEnumValue (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach) const
 Fills a check with a fail message if enumeration value does match parameter definition Just a help to centralize message definitions.
 
bool ReadEnum (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, const StepData_EnumTool &enumtool, int &val) const
 Reads parameter <nump> of record <num> as an Enumeration (text between dots) and converts it to an integer value, by an EnumTool. Returns True if OK, false if : this parameter is not enumeration, or is not recognized by the EnumTool (with fail)
 
bool ReadTypedParam (const int num, const int nump, const bool mustbetyped, const char *const mess, occ::handle< Interface_Check > &ach, int &numr, int &numrp, TCollection_AsciiString &typ) const
 Resolves a parameter which can be enclosed in a type def., as TYPE(val). The parameter must then be read normally according its type. Parameter to be resolved is <nump> of record <num> <mustbetyped> True demands a typed parameter <mustbetyped> False accepts a non-typed parameter as option mess and ach as usual <numr>,<numrp> are the resolved record and parameter numbers = num,nump if no type, else numrp=1 <typ> returns the recorded type, or empty string Remark : a non-typed list is considered as "non-typed".
 
bool CheckDerived (const int num, const int nump, const char *const mess, occ::handle< Interface_Check > &ach, const bool errstat=false) const
 Checks if parameter <nump> of record <num> is given as Derived If this Check is successful (i.e. Param = "*"), returns True Else, fills <ach> with a Message which contains <mess> and returns False. According to <errstat>, this message is Warning if errstat is False (Default), Fail if errstat is True.
 
int NbEntities () const override
 Returns total count of Entities (including Header)
 
int FindNextRecord (const int num) const override
 determines the first suitable record following a given one that is, skips SCOPE,ENDSCOPE and SUBLIST records Note : skips Header records, which are accessed separately
 
void SetEntityNumbers (const bool withmap=true)
 determines reference numbers in EntityNumber fields called by Prepare from StepReaderTool to prepare later using by a StepModel. This method is attached to StepReaderData because it needs a massive amount of data accesses to work
 
int FindNextHeaderRecord (const int num) const
 determine first suitable record of Header works as FindNextRecord, but treats only Header records
 
void PrepareHeader ()
 Works as SetEntityNumbers but for Header : more simple because there are no Reference, only Sub-Lists.
 
const occ::handle< Interface_CheckGlobalCheck () const
 Returns the Global Check. It can record Fail messages about Undefined References (detected by SetEntityNumbers)
 
- Public Member Functions inherited from Interface_FileReaderData
virtual int NbRecords () const
 Returns the count of registered records That is, value given for Initialization (can be redefined)
 
void InitParams (const int num)
 attaches an empty ParamList to a Record
 
void AddParam (const int num, const char *const aval, const Interface_ParamType atype, const int nument=0)
 Adds a parameter to record no "num" and fills its fields (EntityNumber is optional) Warning : <aval> is assumed to be memory-managed elsewhere : it is NOT copied. This gives a best speed : strings remain stored in pages of characters.
 
void AddParam (const int num, const TCollection_AsciiString &aval, const Interface_ParamType atype, const int nument=0)
 Same as above, but gets a AsciiString from TCollection Remark that the content of the AsciiString is locally copied (because its content is most often lost after using)
 
void AddParam (const int num, const Interface_FileParameter &FP)
 Same as above, but gets a complete FileParameter Warning : Content of <FP> is NOT copied : its original address and space in memory are assumed to be managed elsewhere (see ParamSet)
 
void SetParam (const int num, const int nump, const Interface_FileParameter &FP)
 Sets a new value for a parameter of a record, given by : num : record number; nump : parameter number in the record.
 
int NbParams (const int num) const
 Returns count of parameters attached to record "num" If <num> = 0, returns the total recorded count of parameters.
 
occ::handle< Interface_ParamListParams (const int num) const
 Returns the complete ParamList of a record (read only) num = 0 to return the whole param list for the file.
 
const Interface_FileParameterParam (const int num, const int nump) const
 Returns parameter "nump" of record "num", as a complete FileParameter.
 
Interface_FileParameterChangeParam (const int num, const int nump)
 Same as above, but in order to be modified on place.
 
Interface_ParamType ParamType (const int num, const int nump) const
 Returns type of parameter "nump" of record "num" Returns literal value of parameter "nump" of record "num" was C++ : return const &.
 
const charParamCValue (const int num, const int nump) const
 Same as above, but as a CString was C++ : return const.
 
bool IsParamDefined (const int num, const int nump) const
 Returns True if parameter "nump" of record "num" is defined (it is not if its type is ParamVoid)
 
int ParamNumber (const int num, const int nump) const
 Returns record number of an entity referenced by a parameter of type Ident; 0 if no EntityNumber has been determined Note that it is used to reference Entities but also Sublists (sublists are not objects, but internal descriptions)
 
const occ::handle< Standard_Transient > & ParamEntity (const int num, const int nump) const
 Returns the StepEntity referenced by a parameter Error if none.
 
int ParamFirstRank (const int num) const
 Returns the absolute rank of the beginning of a record (its list is from ParamFirstRank+1 to ParamFirstRank+NbParams)
 
const occ::handle< Standard_Transient > & BoundEntity (const int num) const
 Returns the entity bound to a record, set by SetEntities.
 
void BindEntity (const int num, const occ::handle< Standard_Transient > &ent)
 Binds an entity to a record.
 
void SetErrorLoad (const bool val)
 Sets the status "Error Load" on, to overside check fails <val> True : declares unloaded <val> False : declares loaded If not called before loading (see FileReaderTool), check fails give the status IsErrorLoad says if SetErrorLoad has been called by user ResetErrorLoad resets it (called by FileReaderTool) This allows to specify that the currently loaded entity remains unloaded (because of syntactic fail)
 
bool IsErrorLoad () const
 Returns True if the status "Error Load" has been set (to True or False)
 
bool ResetErrorLoad ()
 Returns the former value of status "Error Load" then resets it Used to read the status then ensure it is reset.
 
void Destroy ()
 Destructor (waiting for memory management)
 
 ~Interface_FileReaderData () override
 
- 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 Interface_FileReaderData
static double Fastof (const char *const str)
 Same spec.s as standard <atof> but 5 times faster.
 
- 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.
 
- Protected Member Functions inherited from Interface_FileReaderData
 Interface_FileReaderData (const int nbr, const int npar)
 Initializes arrays of Entities and of ParamLists attached to registered records <nbr> must be the maximum number of records to get (no way to extend it at run-time) : count entities and sub-entities ... <npar> is the total count of parameters (if it is not exact, it will be extended as necessary)
 
Interface_FileParameterChangeParameter (const int numpar)
 Returns a parameter given its absolute rank in the file in order to be consulted or modified in specilaized actions.
 
void ParamPosition (const int numpar, int &num, int &nump) const
 For a given absolute rank of parameter, determines the record to which its belongs, and the parameter number for it.
 

Detailed Description

Specific FileReaderData for Step Contains literal description of entities (for each one : type as a string, ident, parameter list) provides references evaluation, plus access to literal data and specific access methods (Boolean, XY, XYZ)

Constructor & Destructor Documentation

◆ StepData_StepReaderData()

StepData_StepReaderData::StepData_StepReaderData ( const int nbheader,
const int nbtotal,
const int nbpar,
const Resource_FormatType theSourceCodePage = Resource_FormatType_UTF8 )

creates StepReaderData correctly dimensioned (necessary at creation time, because it contains arrays) nbheader is nb of records for Header, nbtotal for Header+Data and nbpar gives the total count of parameters

Member Function Documentation

◆ AddStepParam()

void StepData_StepReaderData::AddStepParam ( const int num,
const char *const aval,
const Interface_ParamType atype,
const int nument = 0 )

Fills the fields of a parameter of a record. This is a variant of AddParam, Adapted to STEP (optimized for specific values)

◆ CheckDerived()

bool StepData_StepReaderData::CheckDerived ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
const bool errstat = false ) const

Checks if parameter <nump> of record <num> is given as Derived If this Check is successful (i.e. Param = "*"), returns True Else, fills <ach> with a Message which contains <mess> and returns False. According to <errstat>, this message is Warning if errstat is False (Default), Fail if errstat is True.

◆ CheckNbParams()

bool StepData_StepReaderData::CheckNbParams ( const int num,
const int nbreq,
occ::handle< Interface_Check > & ach,
const char *const mess = "" ) const

Checks Count of Parameters of record <num> to equate <nbreq> If this Check is successful, returns True Else, fills <ach> with an Error Message then returns False <mess> is included in the Error message if given non empty.

◆ ComplexType()

void StepData_StepReaderData::ComplexType ( const int num,
NCollection_Sequence< TCollection_AsciiString > & types ) const

Returns the List of Types which correspond to a Complex Type Entity. If not Complex, there is just one Type in it For a SubList or a Scope mark, <types> remains empty.

◆ CType()

const char * StepData_StepReaderData::CType ( const int num) const

Returns Record Type as a CString was C++ : return const.

◆ FailEnumValue()

void StepData_StepReaderData::FailEnumValue ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach ) const

Fills a check with a fail message if enumeration value does match parameter definition Just a help to centralize message definitions.

◆ FindNextHeaderRecord()

int StepData_StepReaderData::FindNextHeaderRecord ( const int num) const

determine first suitable record of Header works as FindNextRecord, but treats only Header records

◆ FindNextRecord()

int StepData_StepReaderData::FindNextRecord ( const int num) const
overridevirtual

determines the first suitable record following a given one that is, skips SCOPE,ENDSCOPE and SUBLIST records Note : skips Header records, which are accessed separately

Implements Interface_FileReaderData.

◆ GlobalCheck()

const occ::handle< Interface_Check > StepData_StepReaderData::GlobalCheck ( ) const

Returns the Global Check. It can record Fail messages about Undefined References (detected by SetEntityNumbers)

◆ IsComplex()

bool StepData_StepReaderData::IsComplex ( const int num) const

Returns True if <num> corresponds to a Complex Type Entity (as can be defined by ANDOR Express clause)

◆ NamedForComplex() [1/2]

bool StepData_StepReaderData::NamedForComplex ( const char *const name,
const int num0,
int & num,
occ::handle< Interface_Check > & ach ) const

Determines the first component which brings a given name, for a Complex Type Entity <num0> is the very first record of this entity <num> is given the last NextNamedForComplex, starts at zero it is returned as the newly found number Hence, in the normal case, NextNamedForComplex starts by num0 if <num> is zero, else by NextForComplex(num) If the alphabetic order is not respected, it restarts from num0 and loops on NextForComplex until finding <name> In case of "non-alphabetic order", <ach> is filled with a Warning for this name In case of "not-found at all", <ach> is filled with a Fail, and <num> is returned as zero.

Returns True if alphabetic order, False else

◆ NamedForComplex() [2/2]

bool StepData_StepReaderData::NamedForComplex ( const char *const theName,
const char *const theShortName,
const int num0,
int & num,
occ::handle< Interface_Check > & ach ) const

Determines the first component which brings a given name, or short name for a Complex Type Entity <num0> is the very first record of this entity <num> is given the last NextNamedForComplex, starts at zero it is returned as the newly found number Hence, in the normal case, NextNamedForComplex starts by num0 if <num> is zero, else by NextForComplex(num) If the alphabetic order is not respected, it restarts from num0 and loops on NextForComplex until finding <name> In case of "non-alphabetic order", <ach> is filled with a Warning for this name In case of "not-found at all", <ach> is filled with a Fail, and <num> is returned as zero.

Returns True if alphabetic order, False else

◆ NbEntities()

int StepData_StepReaderData::NbEntities ( ) const
overridevirtual

Returns total count of Entities (including Header)

Reimplemented from Interface_FileReaderData.

◆ NextForComplex()

int StepData_StepReaderData::NextForComplex ( const int num) const

Returns the Next "Component" for a Complex Type Entity, of which <num> is already a Component (the first one or a next one) Returns 0 for a Simple Type or for the last Component.

◆ PrepareHeader()

void StepData_StepReaderData::PrepareHeader ( )

Works as SetEntityNumbers but for Header : more simple because there are no Reference, only Sub-Lists.

◆ ReadAny()

bool StepData_StepReaderData::ReadAny ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
const occ::handle< StepData_PDescr > & descr,
occ::handle< Standard_Transient > & val ) const

Reads parameter <nump> of record <num> into a Transient Value according to the type of the parameter : Named for Integer,Boolean,Logical,Enum,Real : SelectNamed Immediate Integer,Boolean,Logical,Enum,Real : SelectInt/Real Text : HAsciiString Ident : the referenced Entity Sub-List not processed, see ReadSub This value is controlled by a Parameter Descriptor (PDescr), which controls its allowed type and value <ach> is filled if the read parameter does not match its description (the select is nevertheless created if possible)

Warning : val is in out, hence it is possible to predefine a specific SelectMember then to fill it. If <val> is Null or if the result is not a SelectMember, val itself is returned a new ref For a Select with a Name, <val> must then be a SelectNamed

◆ ReadBoolean()

bool StepData_StepReaderData::ReadBoolean ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
bool & flag ) const

reads parameter <nump> of record <num> as a Boolean Return value and Check managed as by ReadReal (demands a Boolean enum, i.e. text ".T." for True or ".F." for False)

◆ ReadEntity() [1/3]

bool StepData_StepReaderData::ReadEntity ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
const occ::handle< Standard_Type > & atype,
occ::handle< Standard_Transient > & ent ) const

Reads parameter <nump> of record <num> as a single Entity. Return value and Check managed as by ReadReal (demands a reference to an Entity). In Addition, demands read Entity to be Kind of a required Type <atype>. Remark that returned status is False and <ent> is Null if parameter is not an Entity, <ent> remains Not Null is parameter is an Entity but is not Kind of required type.

◆ ReadEntity() [2/3]

template<class T >
bool StepData_StepReaderData::ReadEntity ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
const occ::handle< Standard_Type > & atype,
occ::handle< T > & ent ) const
inline

Safe variant for arbitrary type of argument.

◆ ReadEntity() [3/3]

bool StepData_StepReaderData::ReadEntity ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
StepData_SelectType & sel ) const

Same as above, but a SelectType checks Type Matching, and records the read Entity (see method Value from SelectType)

◆ ReadEnum()

bool StepData_StepReaderData::ReadEnum ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
const StepData_EnumTool & enumtool,
int & val ) const

Reads parameter <nump> of record <num> as an Enumeration (text between dots) and converts it to an integer value, by an EnumTool. Returns True if OK, false if : this parameter is not enumeration, or is not recognized by the EnumTool (with fail)

◆ ReadEnumParam()

bool StepData_StepReaderData::ReadEnumParam ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
const char *& text ) const

◆ ReadField()

bool StepData_StepReaderData::ReadField ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
const occ::handle< StepData_PDescr > & descr,
StepData_Field & fild ) const

reads parameter <nump> of record <num> into a Field, controlled by a Parameter Descriptor (PDescr), which controls its allowed type(s) and value <ach> is filled if the read parameter does not match its description (but the field is read anyway) If the description is not defined, no control is done Returns True when done

◆ ReadInteger()

bool StepData_StepReaderData::ReadInteger ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
int & val ) const

reads parameter <nump> of record <num> as a single Integer. Return value & Check managed as by ReadXY (demands an Integer)

◆ ReadList()

bool StepData_StepReaderData::ReadList ( const int num,
occ::handle< Interface_Check > & ach,
const occ::handle< StepData_ESDescr > & descr,
StepData_FieldList & list ) const

reads a list of fields controlled by an ESDescr

◆ ReadLogical()

bool StepData_StepReaderData::ReadLogical ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
StepData_Logical & flag ) const

reads parameter <nump> of record <num> as a Logical Return value and Check managed as by ReadBoolean (demands a Logical enum, i.e. text ".T.", ".F.", or ".U.")

◆ ReadMember() [1/2]

bool StepData_StepReaderData::ReadMember ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
occ::handle< StepData_SelectMember > & val ) const

Reads parameter <nump> of record <num> into a SelectMember, self-sufficient (no Description needed) If <val> is already created, it will be filled, as possible And if reading does not match its own description, the result will be False If <val> is not it not yet created, it will be (SelectNamed) useful if a field is defined as a SelectMember, directly (SELECT with no Entity as member) But SelectType also manages SelectMember (for SELECT with some members as Entity, some other not)

◆ ReadMember() [2/2]

template<class T >
bool StepData_StepReaderData::ReadMember ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
occ::handle< T > & val ) const
inline

Safe variant for arbitrary type of argument.

◆ ReadReal()

bool StepData_StepReaderData::ReadReal ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
double & val ) const

reads parameter <nump> of record <num> as a single Real value. Return value and Check managed as by ReadXY (demands a Real)

◆ ReadString()

bool StepData_StepReaderData::ReadString ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
occ::handle< TCollection_HAsciiString > & val ) const

reads parameter <nump> of record <num> as a String (text between quotes, quotes are removed by the Read operation) Return value and Check managed as by ReadXY (demands a String)

◆ ReadSub()

int StepData_StepReaderData::ReadSub ( const int numsub,
const char *const mess,
occ::handle< Interface_Check > & ach,
const occ::handle< StepData_PDescr > & descr,
occ::handle< Standard_Transient > & val ) const

reads the content of a sub-list into a transient : SelectNamed, or HArray1 of Integer,Real,String,Transient ... recursive call if list of list ... If a sub-list has mixed types, an HArray1OfTransient is produced, it may contain SelectMember Intended to be called by ReadField The returned status is : negative if failed, 0 if empty. Else the kind to be recorded in the field

◆ ReadSubList()

bool StepData_StepReaderData::ReadSubList ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
int & numsub,
const bool optional = false,
const int lenmin = 0,
const int lenmax = 0 ) const

reads parameter <nump> of record <num> as a sub-list (may be typed, see ReadTypedParameter in this case) Returns True if OK. Else (not a LIST), returns false and feeds Check with appropriate check If <optional> is True and Param is not defined, returns True with <ach> not filled and <numsub> returned as 0 Works with SubListNumber with <aslast> false (no specific case for last parameter)

◆ ReadTypedParam()

bool StepData_StepReaderData::ReadTypedParam ( const int num,
const int nump,
const bool mustbetyped,
const char *const mess,
occ::handle< Interface_Check > & ach,
int & numr,
int & numrp,
TCollection_AsciiString & typ ) const

Resolves a parameter which can be enclosed in a type def., as TYPE(val). The parameter must then be read normally according its type. Parameter to be resolved is <nump> of record <num> <mustbetyped> True demands a typed parameter <mustbetyped> False accepts a non-typed parameter as option mess and ach as usual <numr>,<numrp> are the resolved record and parameter numbers = num,nump if no type, else numrp=1 <typ> returns the recorded type, or empty string Remark : a non-typed list is considered as "non-typed".

◆ ReadXY()

bool StepData_StepReaderData::ReadXY ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
double & X,
double & Y ) const

reads parameter <nump> of record <num> as a sub-list of two Reals X,Y. Returns True if OK. Else, returns false and feeds Check with appropriate Fails (parameter not a sub-list, not two Reals in the sub-list) composed with "mess" which gives the name of the parameter

◆ ReadXYZ()

bool StepData_StepReaderData::ReadXYZ ( const int num,
const int nump,
const char *const mess,
occ::handle< Interface_Check > & ach,
double & X,
double & Y,
double & Z ) const

reads parameter <nump> of record <num> as a sub-list of three Reals X,Y,Z. Return value and Check managed as by ReadXY (demands a sub-list of three Reals)

◆ RecordIdent()

int StepData_StepReaderData::RecordIdent ( const int num) const

Returns record identifier (Positive number) If returned ident is not positive : Sub-List or Scope mark.

◆ RecordType()

const TCollection_AsciiString & StepData_StepReaderData::RecordType ( const int num) const

Returns Record Type.

◆ SetEntityNumbers()

void StepData_StepReaderData::SetEntityNumbers ( const bool withmap = true)

determines reference numbers in EntityNumber fields called by Prepare from StepReaderTool to prepare later using by a StepModel. This method is attached to StepReaderData because it needs a massive amount of data accesses to work

If <withmap> is given False, the basic exploration algorithm is activated, otherwise a map is used as far as it is possible this option can be used only to test this algorithm

◆ SetRecord()

void StepData_StepReaderData::SetRecord ( const int num,
const char *const ident,
const char *const type,
const int nbpar )

Fills the fields of a record.

◆ SubListNumber()

int StepData_StepReaderData::SubListNumber ( const int num,
const int nump,
const bool aslast ) const

Returns SubList numero designated by a parameter (nump) in a record (num), or zero if the parameter does not exist or is not a SubList address. Zero too If aslast is True and nump is not for the last parameter.


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