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

access to a list of parameters, with management of read stage (owned parameters, properties, associativities) and current parameter number, read errors (which feed a Check), plus convenient facilities to read parameters, in particular : More...

#include <IGESData_ParamReader.hxx>

Public Member Functions

 IGESData_ParamReader (const occ::handle< Interface_ParamList > &list, const occ::handle< Interface_Check > &ach, const int base=1, const int nbpar=0, const int num=0)
 Prepares a ParamReader, stage "Own", current param = 1 It considers a part of the list, from <base> (excluded) for <nbpar> parameters; <nbpar> = 0 commands to take list length. Default is (1 to skip type)
 
int EntityNumber () const
 Returns the entity number in the file.
 
void Clear ()
 resets state (stage, current param number, check with no fail)
 
int CurrentNumber () const
 returns the current parameter number This notion is involved by the organisation of an IGES list of parameters: it can be ended by two lists (Associativities and Properties), which can be empty, or even absent. Hence, it is necessary to know, at the end of specific reading, how many parameters have been read : the optional lists follow
 
void SetCurrentNumber (const int num)
 sets current parameter number to a new value must be done at end of each step : set on first parameter following last read one; is done by some Read... methods (must be done directly if these method are not used) num greater than NbParams means that following lists are empty If current num is not managed, it remains at 1, which probably will cause error when successive steps of reading are made
 
IGESData_ReadStage Stage () const
 gives current stage (Own-Props-Assocs-End, begins at Own)
 
void NextStage ()
 passes to next stage (must be linked with setting Current)
 
void EndAll ()
 passes directly to the end of reading process
 
int NbParams () const
 returns number of parameters (minus the first one) following method skip the first parameter (1 gives the 2nd)
 
Interface_ParamType ParamType (const int num) const
 returns type of parameter; note that "Ident" or "Sub" cannot be encountered, they correspond to "Integer", see also below
 
const charParamValue (const int num) const
 returns literal value of a parameter, as it was in file
 
bool IsParamDefined (const int num) const
 says if a parameter is defined (not void) See also DefinedElseSkip
 
bool IsParamEntity (const int num) const
 says if a parameter can be regarded as an entity reference (see Prepare from IGESReaderData for more explanation) Note that such a parameter can seen as be a plain Integer too
 
int ParamNumber (const int num) const
 returns entity number corresponding to a parameter if there is otherwise zero (according criterium IsParamEntity)
 
occ::handle< IGESData_IGESEntityParamEntity (const occ::handle< IGESData_IGESReaderData > &IR, const int num)
 directly returns entity referenced by a parameter
 
IGESData_ParamCursor Current () const
 Creates a ParamCursor from the Current Number, to read one parameter, and to advance Current Number after reading.
 
IGESData_ParamCursor CurrentList (const int nb, const int size=1) const
 Creates a ParamCursor from the Current Number, to read a list of "nb" items, and to advance Current Number after reading By default, each item is made of one parameter If size is given, it precises the number of params per item.
 
bool DefinedElseSkip ()
 Allows to simply process a parameter which can be defaulted. Waits on the Current Number a defined parameter or skips it : If the parameter <num> is defined, changes nothing and returns True Hence, the next reading with current cursor will concern <num> If it is void, advances Current Position by one, and returns False The next reading will concern <num+1> (except if <num> = NbParams)
 
bool ReadInteger (const IGESData_ParamCursor &PC, int &val)
 
bool ReadInteger (const IGESData_ParamCursor &PC, const char *const mess, int &val)
 Reads an Integer value designated by PC The method Current designates the current parameter and advances the Current Number by one after reading Note that if a count (not 1) is given, it is ignored If it is not an Integer, fills Check with a Fail (using mess) and returns False.
 
bool ReadBoolean (const IGESData_ParamCursor &PC, const Message_Msg &amsg, bool &val, const bool exact=true)
 
bool ReadBoolean (const IGESData_ParamCursor &PC, const char *const mess, bool &val, const bool exact=true)
 Reads a Boolean value from parameter "num" A Boolean is given as an Integer value 0 (False) or 1 (True) Anyway, an Integer is demanded (else, Check is filled) If exact is given True, those precise values are demanded Else, Correction is done, as False for 0 or <0, True for >0 (with a Warning error message, and return is True) In case of error (not an Integer, or not 0/1 and exact True), Check is filled with a Fail (using mess) and return is False.
 
bool ReadReal (const IGESData_ParamCursor &PC, double &val)
 
bool ReadReal (const IGESData_ParamCursor &PC, const char *const mess, double &val)
 Reads a Real value from parameter "num" An Integer is accepted (Check is filled with a Warning message) and causes return to be True (as normal case) In other cases, Check is filled with a Fail and return is False.
 
bool ReadXY (const IGESData_ParamCursor &PC, Message_Msg &amsg, gp_XY &val)
 
bool ReadXY (const IGESData_ParamCursor &PC, const char *const mess, gp_XY &val)
 Reads a couple of Real values (X,Y) from parameter "num" Integers are accepted (Check is filled with a Warning message) and cause return to be True (as normal case) In other cases, Check is filled with a Fail and return is False.
 
bool ReadXYZ (const IGESData_ParamCursor &PC, Message_Msg &amsg, gp_XYZ &val)
 
bool ReadXYZ (const IGESData_ParamCursor &PC, const char *const mess, gp_XYZ &val)
 Reads a triplet of Real values (X,Y,Z) from parameter "num" Integers are accepted (Check is filled with a Warning message) and cause return to be True (as normal case) In other cases, Check is filled with a Fail and return is False For Message.
 
bool ReadText (const IGESData_ParamCursor &thePC, const Message_Msg &theMsg, occ::handle< TCollection_HAsciiString > &theVal)
 
bool ReadText (const IGESData_ParamCursor &PC, const char *const mess, occ::handle< TCollection_HAsciiString > &val)
 Reads a Text value from parameter "num", as a String from Collection, that is, Hollerith text without leading "nnnH" If it is not a String, fills Check with a Fail (using mess) and returns False.
 
bool ReadEntity (const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_ParamCursor &PC, IGESData_Status &aStatus, occ::handle< IGESData_IGESEntity > &val, const bool canbenul=false)
 
bool ReadEntity (const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_ParamCursor &PC, const char *const mess, occ::handle< IGESData_IGESEntity > &val, const bool canbenul=false)
 Reads an IGES entity from parameter "num" An Entity is known by its reference, which has the form of an odd Integer Value (a number in the Directory) If <canbenul> is given True, a Reference can also be Null : in this case, the result is a Null Handle with no Error If <canbenul> is False, a Null Reference causes an Error If the parameter cannot refer to an entity (or null), fills Check with a Fail (using mess) and returns False.
 
bool ReadEntity (const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_ParamCursor &PC, IGESData_Status &aStatus, const occ::handle< Standard_Type > &type, occ::handle< IGESData_IGESEntity > &val, const bool canbenul=false)
 
template<class T >
bool ReadEntity (const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_ParamCursor &PC, IGESData_Status &aStatus, const occ::handle< Standard_Type > &type, occ::handle< T > &val, const bool canbenul=false)
 Safe variant for arbitrary type of argument.
 
bool ReadEntity (const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_ParamCursor &PC, const char *const mess, const occ::handle< Standard_Type > &type, occ::handle< IGESData_IGESEntity > &val, const bool canbenul=false)
 Works as ReadEntity without Type, but in addition checks the Type of the Entity, which must be "kind of" a given <type> Then, gives the same fail cases as ReadEntity without Type, plus the case "Incorrect Type" (in such a case, returns False and givel <val> = Null)
 
template<class T >
bool ReadEntity (const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_ParamCursor &PC, const char *const mess, const occ::handle< Standard_Type > &type, occ::handle< T > &val, const bool canbenul=false)
 Safe variant for arbitrary type of argument.
 
bool ReadInts (const IGESData_ParamCursor &PC, const Message_Msg &amsg, occ::handle< NCollection_HArray1< int > > &val, const int index=1)
 
bool ReadInts (const IGESData_ParamCursor &PC, const char *const mess, occ::handle< NCollection_HArray1< int > > &val, const int index=1)
 Reads a list of Integer values, defined by PC (with a count of parameters). PC can start from Current Number and command it to advance after reading (use method CurrentList to do this) The list is given as a HArray1, numered from "index" If all params are not Integer, Check is filled (using mess) and return value is False.
 
bool ReadReals (const IGESData_ParamCursor &PC, Message_Msg &amsg, occ::handle< NCollection_HArray1< double > > &val, const int index=1)
 
bool ReadReals (const IGESData_ParamCursor &PC, const char *const mess, occ::handle< NCollection_HArray1< double > > &val, const int index=1)
 Reads a list of Real values defined by PC Same conditions as for ReadInts, for PC and index An Integer parameter is accepted, if at least one parameter is Integer, Check is filled with a "Warning" message If all params are neither Real nor Integer, Check is filled (using mess) and return value is False.
 
bool ReadTexts (const IGESData_ParamCursor &PC, const Message_Msg &amsg, occ::handle< NCollection_HArray1< occ::handle< TCollection_HAsciiString > > > &val, const int index=1)
 
bool ReadTexts (const IGESData_ParamCursor &PC, const char *const mess, occ::handle< NCollection_HArray1< occ::handle< TCollection_HAsciiString > > > &val, const int index=1)
 Reads a list of Hollerith Texts, defined by PC Texts are read as Hollerith texts without leading "nnnH" Same conditions as for ReadInts, for PC and index If all params are not Text, Check is filled (using mess) and return value is False.
 
bool ReadEnts (const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_ParamCursor &PC, const Message_Msg &amsg, occ::handle< NCollection_HArray1< occ::handle< IGESData_IGESEntity > > > &val, const int index=1)
 
bool ReadEnts (const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_ParamCursor &PC, const char *const mess, occ::handle< NCollection_HArray1< occ::handle< IGESData_IGESEntity > > > &val, const int index=1)
 Reads a list of Entities defined by PC Same conditions as for ReadInts, for PC and index The list is given as a HArray1, numered from "index" If all params cannot be read as Entities, Check is filled (using mess) and return value is False Remark : Null references are accepted, they are ignored (negative pointers too : they provoke a Warning message) If the caller wants to check them, a loop on ReadEntity should be used.
 
bool ReadEntList (const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_ParamCursor &PC, Message_Msg &amsg, Interface_EntityList &val, const bool ord=true)
 
bool ReadEntList (const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_ParamCursor &PC, const char *const mess, Interface_EntityList &val, const bool ord=true)
 Reads a list of Entities defined by PC Same conditions as for ReadEnts, for PC The list is given as an EntityList (index has no meaning; the EntityList starts from clear) If "ord" is given True (default), entities will be added to the list in their original order Remark : Negative or Null Pointers are ignored Else ("ord" False), order is not guaranteed (faster mode) If all params cannot be read as Entities, same as above Warning: Give "ord" to False ONLY if order is not significant.
 
bool ReadingReal (const int num, double &val)
 
bool ReadingReal (const int num, const char *const mess, double &val)
 Routine which reads a Real parameter, given its number Same conditions as ReadReal for mess, val, and return value.
 
bool ReadingEntityNumber (const int num, int &val)
 
bool ReadingEntityNumber (const int num, const char *const mess, int &val)
 Routine which reads an Entity Number (which allows to read the Entity in the IGESReaderData by BoundEntity), given its number in the list of Parameters Same conditions as ReadEntity for mess, val, and return value In particular, returns True and val to zero means Null Entity, and val not zero means Entity read by BoundEntity.
 
void SendFail (const Message_Msg &amsg)
 
void SendWarning (const Message_Msg &amsg)
 
void AddFail (const char *const afail, const char *const bfail="")
 
void AddFail (const occ::handle< TCollection_HAsciiString > &af, const occ::handle< TCollection_HAsciiString > &bf)
 feeds the Check with a new fail (as a String or as a CString)
 
void AddWarning (const char *const awarn, const char *const bwarn="")
 
void AddWarning (const occ::handle< TCollection_HAsciiString > &aw, const occ::handle< TCollection_HAsciiString > &bw)
 feeds the Check with a new Warning message
 
void Mend (const char *const pref="")
 
bool HasFailed () const
 says if fails have been recorded into the Check
 
const occ::handle< Interface_Check > & Check () const
 returns the Check Note that any error signaled above is also recorded into it
 
occ::handle< Interface_Check > & CCheck ()
 returns the check in a way which allows to work on it directly (i.e. messages added to the Check are added to ParamReader too)
 
bool IsCheckEmpty () const
 Returns True if the Check is Empty Else, it has to be recorded with the Read Entity.
 

Detailed Description

access to a list of parameters, with management of read stage (owned parameters, properties, associativities) and current parameter number, read errors (which feed a Check), plus convenient facilities to read parameters, in particular :

Constructor & Destructor Documentation

◆ IGESData_ParamReader()

IGESData_ParamReader::IGESData_ParamReader ( const occ::handle< Interface_ParamList > & list,
const occ::handle< Interface_Check > & ach,
const int base = 1,
const int nbpar = 0,
const int num = 0 )

Prepares a ParamReader, stage "Own", current param = 1 It considers a part of the list, from <base> (excluded) for <nbpar> parameters; <nbpar> = 0 commands to take list length. Default is (1 to skip type)

Member Function Documentation

◆ AddFail() [1/2]

void IGESData_ParamReader::AddFail ( const char *const afail,
const char *const bfail = "" )

◆ AddFail() [2/2]

void IGESData_ParamReader::AddFail ( const occ::handle< TCollection_HAsciiString > & af,
const occ::handle< TCollection_HAsciiString > & bf )

feeds the Check with a new fail (as a String or as a CString)

◆ AddWarning() [1/2]

void IGESData_ParamReader::AddWarning ( const char *const awarn,
const char *const bwarn = "" )

◆ AddWarning() [2/2]

void IGESData_ParamReader::AddWarning ( const occ::handle< TCollection_HAsciiString > & aw,
const occ::handle< TCollection_HAsciiString > & bw )

feeds the Check with a new Warning message

◆ CCheck()

occ::handle< Interface_Check > & IGESData_ParamReader::CCheck ( )

returns the check in a way which allows to work on it directly (i.e. messages added to the Check are added to ParamReader too)

◆ Check()

const occ::handle< Interface_Check > & IGESData_ParamReader::Check ( ) const

returns the Check Note that any error signaled above is also recorded into it

◆ Clear()

void IGESData_ParamReader::Clear ( )

resets state (stage, current param number, check with no fail)

◆ Current()

IGESData_ParamCursor IGESData_ParamReader::Current ( ) const

Creates a ParamCursor from the Current Number, to read one parameter, and to advance Current Number after reading.

◆ CurrentList()

IGESData_ParamCursor IGESData_ParamReader::CurrentList ( const int nb,
const int size = 1 ) const

Creates a ParamCursor from the Current Number, to read a list of "nb" items, and to advance Current Number after reading By default, each item is made of one parameter If size is given, it precises the number of params per item.

◆ CurrentNumber()

int IGESData_ParamReader::CurrentNumber ( ) const

returns the current parameter number This notion is involved by the organisation of an IGES list of parameters: it can be ended by two lists (Associativities and Properties), which can be empty, or even absent. Hence, it is necessary to know, at the end of specific reading, how many parameters have been read : the optional lists follow

◆ DefinedElseSkip()

bool IGESData_ParamReader::DefinedElseSkip ( )

Allows to simply process a parameter which can be defaulted. Waits on the Current Number a defined parameter or skips it : If the parameter <num> is defined, changes nothing and returns True Hence, the next reading with current cursor will concern <num> If it is void, advances Current Position by one, and returns False The next reading will concern <num+1> (except if <num> = NbParams)

This allows to process Default values as follows (C++) : if (PR.DefinedElseSkip()) { .. PR.Read... (current parameter); } else { <current parameter> = default value .. nothing else to do with ParamReader } For Message

◆ EndAll()

void IGESData_ParamReader::EndAll ( )

passes directly to the end of reading process

◆ EntityNumber()

int IGESData_ParamReader::EntityNumber ( ) const

Returns the entity number in the file.

◆ HasFailed()

bool IGESData_ParamReader::HasFailed ( ) const

says if fails have been recorded into the Check

◆ IsCheckEmpty()

bool IGESData_ParamReader::IsCheckEmpty ( ) const

Returns True if the Check is Empty Else, it has to be recorded with the Read Entity.

◆ IsParamDefined()

bool IGESData_ParamReader::IsParamDefined ( const int num) const

says if a parameter is defined (not void) See also DefinedElseSkip

◆ IsParamEntity()

bool IGESData_ParamReader::IsParamEntity ( const int num) const

says if a parameter can be regarded as an entity reference (see Prepare from IGESReaderData for more explanation) Note that such a parameter can seen as be a plain Integer too

◆ Mend()

void IGESData_ParamReader::Mend ( const char *const pref = "")

◆ NbParams()

int IGESData_ParamReader::NbParams ( ) const

returns number of parameters (minus the first one) following method skip the first parameter (1 gives the 2nd)

◆ NextStage()

void IGESData_ParamReader::NextStage ( )

passes to next stage (must be linked with setting Current)

◆ ParamEntity()

occ::handle< IGESData_IGESEntity > IGESData_ParamReader::ParamEntity ( const occ::handle< IGESData_IGESReaderData > & IR,
const int num )

directly returns entity referenced by a parameter

◆ ParamNumber()

int IGESData_ParamReader::ParamNumber ( const int num) const

returns entity number corresponding to a parameter if there is otherwise zero (according criterium IsParamEntity)

◆ ParamType()

Interface_ParamType IGESData_ParamReader::ParamType ( const int num) const

returns type of parameter; note that "Ident" or "Sub" cannot be encountered, they correspond to "Integer", see also below

◆ ParamValue()

const char * IGESData_ParamReader::ParamValue ( const int num) const

returns literal value of a parameter, as it was in file

◆ ReadBoolean() [1/2]

bool IGESData_ParamReader::ReadBoolean ( const IGESData_ParamCursor & PC,
const char *const mess,
bool & val,
const bool exact = true )

Reads a Boolean value from parameter "num" A Boolean is given as an Integer value 0 (False) or 1 (True) Anyway, an Integer is demanded (else, Check is filled) If exact is given True, those precise values are demanded Else, Correction is done, as False for 0 or <0, True for >0 (with a Warning error message, and return is True) In case of error (not an Integer, or not 0/1 and exact True), Check is filled with a Fail (using mess) and return is False.

◆ ReadBoolean() [2/2]

bool IGESData_ParamReader::ReadBoolean ( const IGESData_ParamCursor & PC,
const Message_Msg & amsg,
bool & val,
const bool exact = true )

◆ ReadEntity() [1/6]

bool IGESData_ParamReader::ReadEntity ( const occ::handle< IGESData_IGESReaderData > & IR,
const IGESData_ParamCursor & PC,
const char *const mess,
const occ::handle< Standard_Type > & type,
occ::handle< IGESData_IGESEntity > & val,
const bool canbenul = false )

Works as ReadEntity without Type, but in addition checks the Type of the Entity, which must be "kind of" a given <type> Then, gives the same fail cases as ReadEntity without Type, plus the case "Incorrect Type" (in such a case, returns False and givel <val> = Null)

◆ ReadEntity() [2/6]

template<class T >
bool IGESData_ParamReader::ReadEntity ( const occ::handle< IGESData_IGESReaderData > & IR,
const IGESData_ParamCursor & PC,
const char *const mess,
const occ::handle< Standard_Type > & type,
occ::handle< T > & val,
const bool canbenul = false )
inline

Safe variant for arbitrary type of argument.

◆ ReadEntity() [3/6]

bool IGESData_ParamReader::ReadEntity ( const occ::handle< IGESData_IGESReaderData > & IR,
const IGESData_ParamCursor & PC,
const char *const mess,
occ::handle< IGESData_IGESEntity > & val,
const bool canbenul = false )

Reads an IGES entity from parameter "num" An Entity is known by its reference, which has the form of an odd Integer Value (a number in the Directory) If <canbenul> is given True, a Reference can also be Null : in this case, the result is a Null Handle with no Error If <canbenul> is False, a Null Reference causes an Error If the parameter cannot refer to an entity (or null), fills Check with a Fail (using mess) and returns False.

◆ ReadEntity() [4/6]

bool IGESData_ParamReader::ReadEntity ( const occ::handle< IGESData_IGESReaderData > & IR,
const IGESData_ParamCursor & PC,
IGESData_Status & aStatus,
const occ::handle< Standard_Type > & type,
occ::handle< IGESData_IGESEntity > & val,
const bool canbenul = false )

◆ ReadEntity() [5/6]

template<class T >
bool IGESData_ParamReader::ReadEntity ( const occ::handle< IGESData_IGESReaderData > & IR,
const IGESData_ParamCursor & PC,
IGESData_Status & aStatus,
const occ::handle< Standard_Type > & type,
occ::handle< T > & val,
const bool canbenul = false )
inline

Safe variant for arbitrary type of argument.

◆ ReadEntity() [6/6]

bool IGESData_ParamReader::ReadEntity ( const occ::handle< IGESData_IGESReaderData > & IR,
const IGESData_ParamCursor & PC,
IGESData_Status & aStatus,
occ::handle< IGESData_IGESEntity > & val,
const bool canbenul = false )

◆ ReadEntList() [1/2]

bool IGESData_ParamReader::ReadEntList ( const occ::handle< IGESData_IGESReaderData > & IR,
const IGESData_ParamCursor & PC,
const char *const mess,
Interface_EntityList & val,
const bool ord = true )

Reads a list of Entities defined by PC Same conditions as for ReadEnts, for PC The list is given as an EntityList (index has no meaning; the EntityList starts from clear) If "ord" is given True (default), entities will be added to the list in their original order Remark : Negative or Null Pointers are ignored Else ("ord" False), order is not guaranteed (faster mode) If all params cannot be read as Entities, same as above Warning: Give "ord" to False ONLY if order is not significant.

◆ ReadEntList() [2/2]

bool IGESData_ParamReader::ReadEntList ( const occ::handle< IGESData_IGESReaderData > & IR,
const IGESData_ParamCursor & PC,
Message_Msg & amsg,
Interface_EntityList & val,
const bool ord = true )

◆ ReadEnts() [1/2]

bool IGESData_ParamReader::ReadEnts ( const occ::handle< IGESData_IGESReaderData > & IR,
const IGESData_ParamCursor & PC,
const char *const mess,
occ::handle< NCollection_HArray1< occ::handle< IGESData_IGESEntity > > > & val,
const int index = 1 )

Reads a list of Entities defined by PC Same conditions as for ReadInts, for PC and index The list is given as a HArray1, numered from "index" If all params cannot be read as Entities, Check is filled (using mess) and return value is False Remark : Null references are accepted, they are ignored (negative pointers too : they provoke a Warning message) If the caller wants to check them, a loop on ReadEntity should be used.

◆ ReadEnts() [2/2]

bool IGESData_ParamReader::ReadEnts ( const occ::handle< IGESData_IGESReaderData > & IR,
const IGESData_ParamCursor & PC,
const Message_Msg & amsg,
occ::handle< NCollection_HArray1< occ::handle< IGESData_IGESEntity > > > & val,
const int index = 1 )

◆ ReadingEntityNumber() [1/2]

bool IGESData_ParamReader::ReadingEntityNumber ( const int num,
const char *const mess,
int & val )

Routine which reads an Entity Number (which allows to read the Entity in the IGESReaderData by BoundEntity), given its number in the list of Parameters Same conditions as ReadEntity for mess, val, and return value In particular, returns True and val to zero means Null Entity, and val not zero means Entity read by BoundEntity.

◆ ReadingEntityNumber() [2/2]

bool IGESData_ParamReader::ReadingEntityNumber ( const int num,
int & val )

◆ ReadingReal() [1/2]

bool IGESData_ParamReader::ReadingReal ( const int num,
const char *const mess,
double & val )

Routine which reads a Real parameter, given its number Same conditions as ReadReal for mess, val, and return value.

◆ ReadingReal() [2/2]

bool IGESData_ParamReader::ReadingReal ( const int num,
double & val )

◆ ReadInteger() [1/2]

bool IGESData_ParamReader::ReadInteger ( const IGESData_ParamCursor & PC,
const char *const mess,
int & val )

Reads an Integer value designated by PC The method Current designates the current parameter and advances the Current Number by one after reading Note that if a count (not 1) is given, it is ignored If it is not an Integer, fills Check with a Fail (using mess) and returns False.

◆ ReadInteger() [2/2]

bool IGESData_ParamReader::ReadInteger ( const IGESData_ParamCursor & PC,
int & val )

◆ ReadInts() [1/2]

bool IGESData_ParamReader::ReadInts ( const IGESData_ParamCursor & PC,
const char *const mess,
occ::handle< NCollection_HArray1< int > > & val,
const int index = 1 )

Reads a list of Integer values, defined by PC (with a count of parameters). PC can start from Current Number and command it to advance after reading (use method CurrentList to do this) The list is given as a HArray1, numered from "index" If all params are not Integer, Check is filled (using mess) and return value is False.

◆ ReadInts() [2/2]

bool IGESData_ParamReader::ReadInts ( const IGESData_ParamCursor & PC,
const Message_Msg & amsg,
occ::handle< NCollection_HArray1< int > > & val,
const int index = 1 )

◆ ReadReal() [1/2]

bool IGESData_ParamReader::ReadReal ( const IGESData_ParamCursor & PC,
const char *const mess,
double & val )

Reads a Real value from parameter "num" An Integer is accepted (Check is filled with a Warning message) and causes return to be True (as normal case) In other cases, Check is filled with a Fail and return is False.

◆ ReadReal() [2/2]

bool IGESData_ParamReader::ReadReal ( const IGESData_ParamCursor & PC,
double & val )

◆ ReadReals() [1/2]

bool IGESData_ParamReader::ReadReals ( const IGESData_ParamCursor & PC,
const char *const mess,
occ::handle< NCollection_HArray1< double > > & val,
const int index = 1 )

Reads a list of Real values defined by PC Same conditions as for ReadInts, for PC and index An Integer parameter is accepted, if at least one parameter is Integer, Check is filled with a "Warning" message If all params are neither Real nor Integer, Check is filled (using mess) and return value is False.

◆ ReadReals() [2/2]

bool IGESData_ParamReader::ReadReals ( const IGESData_ParamCursor & PC,
Message_Msg & amsg,
occ::handle< NCollection_HArray1< double > > & val,
const int index = 1 )

◆ ReadText() [1/2]

bool IGESData_ParamReader::ReadText ( const IGESData_ParamCursor & PC,
const char *const mess,
occ::handle< TCollection_HAsciiString > & val )

Reads a Text value from parameter "num", as a String from Collection, that is, Hollerith text without leading "nnnH" If it is not a String, fills Check with a Fail (using mess) and returns False.

◆ ReadText() [2/2]

bool IGESData_ParamReader::ReadText ( const IGESData_ParamCursor & thePC,
const Message_Msg & theMsg,
occ::handle< TCollection_HAsciiString > & theVal )

◆ ReadTexts() [1/2]

bool IGESData_ParamReader::ReadTexts ( const IGESData_ParamCursor & PC,
const char *const mess,
occ::handle< NCollection_HArray1< occ::handle< TCollection_HAsciiString > > > & val,
const int index = 1 )

Reads a list of Hollerith Texts, defined by PC Texts are read as Hollerith texts without leading "nnnH" Same conditions as for ReadInts, for PC and index If all params are not Text, Check is filled (using mess) and return value is False.

◆ ReadTexts() [2/2]

bool IGESData_ParamReader::ReadTexts ( const IGESData_ParamCursor & PC,
const Message_Msg & amsg,
occ::handle< NCollection_HArray1< occ::handle< TCollection_HAsciiString > > > & val,
const int index = 1 )

◆ ReadXY() [1/2]

bool IGESData_ParamReader::ReadXY ( const IGESData_ParamCursor & PC,
const char *const mess,
gp_XY & val )

Reads a couple of Real values (X,Y) from parameter "num" Integers are accepted (Check is filled with a Warning message) and cause return to be True (as normal case) In other cases, Check is filled with a Fail and return is False.

◆ ReadXY() [2/2]

bool IGESData_ParamReader::ReadXY ( const IGESData_ParamCursor & PC,
Message_Msg & amsg,
gp_XY & val )

◆ ReadXYZ() [1/2]

bool IGESData_ParamReader::ReadXYZ ( const IGESData_ParamCursor & PC,
const char *const mess,
gp_XYZ & val )

Reads a triplet of Real values (X,Y,Z) from parameter "num" Integers are accepted (Check is filled with a Warning message) and cause return to be True (as normal case) In other cases, Check is filled with a Fail and return is False For Message.

◆ ReadXYZ() [2/2]

bool IGESData_ParamReader::ReadXYZ ( const IGESData_ParamCursor & PC,
Message_Msg & amsg,
gp_XYZ & val )

◆ SendFail()

void IGESData_ParamReader::SendFail ( const Message_Msg & amsg)

◆ SendWarning()

void IGESData_ParamReader::SendWarning ( const Message_Msg & amsg)

◆ SetCurrentNumber()

void IGESData_ParamReader::SetCurrentNumber ( const int num)

sets current parameter number to a new value must be done at end of each step : set on first parameter following last read one; is done by some Read... methods (must be done directly if these method are not used) num greater than NbParams means that following lists are empty If current num is not managed, it remains at 1, which probably will cause error when successive steps of reading are made

◆ Stage()

IGESData_ReadStage IGESData_ParamReader::Stage ( ) const

gives current stage (Own-Props-Assocs-End, begins at Own)


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