Open CASCADE Technology
7.3.0
|
This class allows to create IGES Entities in a literal form : their definition is free, but they are not recognized as instances of specific classes. More...
#include <IGESData_FreeFormatEntity.hxx>
Public Member Functions | |
IGESData_FreeFormatEntity () | |
Creates a completely empty FreeFormatEntity. More... | |
void | SetTypeNumber (const Standard_Integer typenum) |
Sets Type Number to a new Value, and Form Number to Zero. More... | |
void | SetFormNumber (const Standard_Integer formnum) |
Sets Form Number to a new Value (to called after SetTypeNumber) More... | |
Standard_Integer | NbParams () const |
Gives count of recorded parameters. More... | |
Standard_Boolean | ParamData (const Standard_Integer num, Interface_ParamType &ptype, Handle< IGESData_IGESEntity > &ent, 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. More... | |
Interface_ParamType | ParamType (const Standard_Integer num) const |
Returns the ParamType of a Param, given its rank Error if num is not between 1 and NbParams. More... | |
Standard_Boolean | IsParamEntity (const Standard_Integer num) const |
Returns True if a Parameter is recorded as an entity Error if num is not between 1 and NbParams. More... | |
Handle< IGESData_IGESEntity > | ParamEntity (const Standard_Integer num) const |
Returns Entity corresponding to a Param, given its rank Error if out of range or if Param num does not designate an Entity. More... | |
Standard_Boolean | IsNegativePointer (const Standard_Integer num) const |
Returns True if <num> is noted as for a "Negative Pointer" (see AddEntity for details). Senseful only if IsParamEntity answers True for <num>, else returns False. More... | |
Handle< TCollection_HAsciiString > | ParamValue (const Standard_Integer num) const |
Returns litteral value of a Parameter, given its rank Error if num is out of range, or if Parameter is not literal. More... | |
Handle< TColStd_HSequenceOfInteger > | NegativePointers () const |
Returns the complete list of Ramks of Parameters which have been noted as Negative Pointers Warning : It is returned as a Null Handle if none was noted. More... | |
void | AddLiteral (const Interface_ParamType ptype, const Handle< TCollection_HAsciiString > &val) |
Adds a literal Parameter to the list (as such) More... | |
void | AddLiteral (const Interface_ParamType ptype, const Standard_CString val) |
Adds a literal Parameter to the list (builds an HAsciiString) More... | |
void | AddEntity (const Interface_ParamType ptype, const Handle< IGESData_IGESEntity > &ent, const Standard_Boolean negative=Standard_False) |
Adds a Parameter which references an Entity. If the Entity is Null, the added parameter will define a "Null Pointer" (0) If <negative> is given True, this will command Sending to File (see IGESWriter) to produce a "Negative Pointer" (Default is False) More... | |
void | AddEntities (const Handle< IGESData_HArray1OfIGESEntity > &ents) |
Adds a set of Entities, given as a HArray1OfIGESEntity Causes creation of : an Integer Parameter which gives count of Entities, then the list of Entities of the Array Error if an Entity is not an IGESEntity All these Entities will be interpreted as "Positive Pointers" by IGESWriter. More... | |
void | AddNegativePointers (const Handle< TColStd_HSequenceOfInteger > &list) |
Adds a list of Ranks of Parameters to be noted as Negative Pointers (this will be taken into account for Parameters which are Entities) More... | |
void | ClearNegativePointers () |
Clears all informations about Negative Pointers, hence every Entity kind Parameter will be send normally, as Positive. More... | |
virtual void | WriteOwnParams (IGESData_IGESWriter &IW) const override |
WriteOwnParams is redefined for FreeFormatEntity to take into account the supplementary information "Negative Pointer". More... | |
Public Member Functions inherited from IGESData_UndefinedEntity | |
IGESData_UndefinedEntity () | |
creates an unknown entity More... | |
Handle< Interface_UndefinedContent > | UndefinedContent () const |
Returns own data as an UndefinedContent. More... | |
Handle< Interface_UndefinedContent > | ChangeableContent () |
Returns own data as an UndefinedContent, in order to touch it. More... | |
void | SetNewContent (const Handle< Interface_UndefinedContent > &cont) |
Redefines a completely new UndefinedContent Used by a Copy which begins by ShallowCopy, for instance. More... | |
Standard_Boolean | IsOKDirPart () const |
says if DirPart is OK or not (if not, it is erroneous) Note that if it is not, Def* methods can return Error status More... | |
Standard_Integer | DirStatus () const |
returns Directory Error Status (used for Copy) More... | |
void | SetOKDirPart () |
Erases the Directory Error Status Warning : Be sure that data are consistent to call this method ... More... | |
virtual IGESData_DefType | DefLineFont () const override |
returns Error status if necessary, else calls original method More... | |
virtual IGESData_DefList | DefLevel () const override |
returns Error status if necessary, else calls original method More... | |
virtual IGESData_DefList | DefView () const override |
returns Error status if necessary, else calls original method More... | |
virtual IGESData_DefType | DefColor () const override |
returns Error status if necessary, else calls original method More... | |
virtual Standard_Boolean | HasSubScriptNumber () const override |
returns Error status if necessary, else calls original method (that is, if SubScript field is not blank or positive integer) More... | |
virtual Standard_Boolean | ReadDir (const Handle< IGESData_IGESReaderData > &IR, IGESData_DirPart &DP, Handle< Interface_Check > &ach) |
Computes the Directory Error Status, to be called before standard ReadDir from IGESReaderTool Returns True if OK (hence, Directory can be loaded), Else returns False and the DirPart <DP> is modified (hence, Directory Error Status is non null; and standard Read will work with an acceptable DirectoryPart) More... | |
virtual void | ReadOwnParams (const Handle< IGESData_IGESReaderData > &IR, IGESData_ParamReader &PR) |
reads own parameters from file; PR gives access to them, IR detains parameter types and values Here, reads all parameters, integers are considered as entity reference unless they cannot be; no list interpretation No property or associativity list is managed More... | |
Public Member Functions inherited from IGESData_IGESEntity | |
IGESData_IGESType | IGESType () const |
gives IGES typing info (includes "Type" and "Form" data) More... | |
Standard_Integer | TypeNumber () const |
gives IGES Type Number (often coupled with Form Number) More... | |
Standard_Integer | FormNumber () const |
Returns the form number for that type of an IGES entity. The default form number is 0. More... | |
Handle< IGESData_IGESEntity > | DirFieldEntity (const Standard_Integer fieldnum) const |
Returns the Entity which has been recorded for a given Field Number, i.e. without any cast. Maps with : 3 : Structure 4 : LineFont 5 : LevelList 6 : View 7 : Transf(ormation Matrix) 8 : LabelDisplay 13 : Color. Other values give a null handle It can then be of any kind, while specific items have a Type. More... | |
Standard_Boolean | HasStructure () const |
returns True if an IGESEntity is defined with a Structure (it is normally reserved for certain classes, such as Macros) More... | |
Handle< IGESData_IGESEntity > | Structure () const |
Returns Structure (used by some types of IGES Entities only) Returns a Null Handle if Structure is not defined. More... | |
Standard_Integer | RankLineFont () const |
Returns LineFont definition as an Integer (if defined as Rank) If LineFont is defined as an Entity, returns a negative value. More... | |
Handle< IGESData_LineFontEntity > | LineFont () const |
Returns LineFont as an Entity (if defined as Reference) Returns a Null Handle if DefLineFont is not "DefReference". More... | |
Standard_Integer | Level () const |
Returns the level the entity belongs to. Returns -1 if the entity belongs to more than one level. More... | |
Handle< IGESData_LevelListEntity > | LevelList () const |
Returns LevelList if Level is defined as a list. Returns a null handle if DefLevel is not DefSeveral. More... | |
Handle< IGESData_ViewKindEntity > | View () const |
Returns the view of this IGES entity. This view can be a single view or a list of views. Warning A null handle is returned if the view is not defined. More... | |
Handle< IGESData_ViewKindEntity > | SingleView () const |
Returns the view as a single view if it was defined as such and not as a list of views. Warning A null handle is returned if DefView does not have the value DefOne. More... | |
Handle< IGESData_ViewKindEntity > | ViewList () const |
Returns the view of this IGES entity as a list. Warning A null handle is returned if the definition status does not have the value DefSeveral. More... | |
Standard_Boolean | HasTransf () const |
Returns True if a Transformation Matrix is defined. More... | |
Handle< IGESData_TransfEntity > | Transf () const |
Returns the Transformation Matrix (under IGES definition) Returns a Null Handle if there is none for a more complete use, see Location & CompoundLocation. More... | |
Standard_Boolean | HasLabelDisplay () const |
Returns True if a LabelDisplay mode is defined for this entity. More... | |
Handle< IGESData_LabelDisplayEntity > | LabelDisplay () const |
Returns the Label Display Associativity Entity if there is one. Returns a null handle if there is none. More... | |
Standard_Integer | BlankStatus () const |
gives Blank Status (0 visible, 1 blanked) More... | |
Standard_Integer | SubordinateStatus () const |
gives Subordinate Switch (0-1-2-3) More... | |
Standard_Integer | UseFlag () const |
gives Entity's Use Flag (0 to 5) More... | |
Standard_Integer | HierarchyStatus () const |
gives Hierarchy status (0-1-2) More... | |
Standard_Integer | LineWeightNumber () const |
Returns the LineWeight Number (0 not defined), see also LineWeight. More... | |
Standard_Real | LineWeight () const |
Returns the true Line Weight, computed from LineWeightNumber and Global Parameter in the Model by call to SetLineWeight. More... | |
Standard_Integer | RankColor () const |
Returns the color definition as an integer value if the color was defined as a rank. Warning A negative value is returned if the color was defined as an entity. More... | |
Handle< IGESData_ColorEntity > | Color () const |
Returns the IGES entity which describes the color of the entity. Returns a null handle if this entity was defined as an integer. More... | |
Standard_Boolean | CResValues (const Standard_CString res1, const Standard_CString res2) const |
returns "reserved" alphanumeric values res1 and res2 res1 and res2 have to be reserved as Character[9 at least] (remark : their content is changed) returned values are ended by null character in 9th returned Boolean is False if res1 and res2 are blank, true else More... | |
Standard_Boolean | HasShortLabel () const |
Returns true if a short label is defined. A short label is a non-blank 8-character string. More... | |
Handle< TCollection_HAsciiString > | ShortLabel () const |
Returns the label value for this IGES entity as a string. Warning If the label is blank, this string is null. More... | |
Standard_Integer | SubScriptNumber () const |
Returns the integer subscript number used to identify this IGES entity. Warning 0 is returned if no subscript number is defined for this IGES entity. More... | |
void | InitDirFieldEntity (const Standard_Integer fieldnum, const Handle< IGESData_IGESEntity > &ent) |
Initializes a directory field as an Entiy of any kind See DirFieldEntity for more details. More... | |
void | InitTransf (const Handle< IGESData_TransfEntity > &ent) |
Initializes Transf, or erases it if <ent> is given Null. More... | |
void | InitView (const Handle< IGESData_ViewKindEntity > &ent) |
Initializes View, or erases it if <ent> is given Null. More... | |
void | InitLineFont (const Handle< IGESData_LineFontEntity > &ent, const Standard_Integer rank=0) |
Initializes LineFont : if <ent> is not Null, it gives LineFont, else <rank> gives or erases (if zero) RankLineFont. More... | |
void | InitLevel (const Handle< IGESData_LevelListEntity > &ent, const Standard_Integer val=0) |
Initializes Level : if <ent> is not Null, it gives LevelList, else <val> gives or erases (if zero) unique Level. More... | |
void | InitColor (const Handle< IGESData_ColorEntity > &ent, const Standard_Integer rank=0) |
Initializes Color data : if <ent> is not Null, it gives Color, else <rank> gives or erases (if zero) RankColor. More... | |
void | InitStatus (const Standard_Integer blank, const Standard_Integer subordinate, const Standard_Integer useflag, const Standard_Integer hierarchy) |
Initializes the Status of Directory Part. More... | |
void | SetLabel (const Handle< TCollection_HAsciiString > &label, const Standard_Integer sub=-1) |
Sets a new Label to an IGES Entity If is given, it sets value of SubScriptNumber else, SubScriptNumber is erased. More... | |
void | InitMisc (const Handle< IGESData_IGESEntity > &str, const Handle< IGESData_LabelDisplayEntity > &lab, const Standard_Integer weightnum) |
Initializes various data (those not yet seen above), or erases them if they are given as Null (Zero for <weightnum>) : <str> for Structure, <lab> for LabelDisplay, and <weightnum> for WeightNumber. More... | |
Standard_Boolean | HasOneParent () const |
Returns True if an entity has one and only one parent, defined by a SingleParentEntity Type Associativity (explicit sharing). Thus, implicit sharing remains defined at model level (see class ToolLocation) More... | |
Handle< IGESData_IGESEntity > | UniqueParent () const |
Returns the Unique Parent (in the sense given by HasOneParent) Error if there is none or several. More... | |
gp_GTrsf | Location () const |
Returns Location given by Transf in Directory Part (see above) It must be considered for local definition : if the Entity is set in a "Parent", that one can add its one Location, but this is not taken in account here : see CompoundLocation for that. If no Transf is defined, returns Identity If Transf is itself compound, gives the final result. More... | |
gp_GTrsf | VectorLocation () const |
Returns Location considered for Vectors, i.e. without its Translation Part. As Location, it gives local definition. More... | |
gp_GTrsf | CompoundLocation () const |
Returns Location by taking in account a Parent which has its own Location : that one will be combined to that of <me> The Parent is considered only if HasOneParent is True, else it is ignored and CompoundLocation = Location. More... | |
Standard_Boolean | HasName () const |
says if a Name is defined, as Short Label or as Name Property (Property is looked first, else ShortLabel is considered) More... | |
Handle< TCollection_HAsciiString > | NameValue () const |
returns Name value as a String (Property Name or ShortLabel) if SubNumber is defined, it is concatenated after ShortLabel as follows label(number). Ignored with a Property Name More... | |
Standard_Boolean | ArePresentAssociativities () const |
Returns True if the Entity is defined with an Associativity list, even empty (that is, file contains its length 0) Else, the file contained NO idencation at all about this list. More... | |
Standard_Integer | NbAssociativities () const |
gives number of recorded associativities (0 no list defined) More... | |
Interface_EntityIterator | Associativities () const |
Returns the Associativity List under the form of an EntityIterator. More... | |
Standard_Integer | NbTypedAssociativities (const Handle< Standard_Type > &atype) const |
gives how many Associativities have a given type More... | |
Handle< IGESData_IGESEntity > | TypedAssociativity (const Handle< Standard_Type > &atype) const |
returns the Associativity of a given Type (if only one exists) Error if none or more than one More... | |
void | Associate (const Handle< IGESData_IGESEntity > &ent) const |
Sets "me" in the Associativity list of another Entity. More... | |
void | Dissociate (const Handle< IGESData_IGESEntity > &ent) const |
Resets "me" from the Associativity list of another Entity. More... | |
Standard_Boolean | ArePresentProperties () const |
Returns True if the Entity is defined with a Property list, even empty (that is, file contains its length 0) Else, the file contained NO idencation at all about this list. More... | |
Standard_Integer | NbProperties () const |
Gives number of recorded properties (0 no list defined) More... | |
Interface_EntityIterator | Properties () const |
Returns Property List under the form of an EntityIterator. More... | |
Standard_Integer | NbTypedProperties (const Handle< Standard_Type > &atype) const |
gives how many Properties have a given type More... | |
Handle< IGESData_IGESEntity > | TypedProperty (const Handle< Standard_Type > &atype, const Standard_Integer anum=0) const |
returns the Property of a given Type Error if none or more than one More... | |
void | AddProperty (const Handle< IGESData_IGESEntity > &ent) |
Adds a Property in the list. More... | |
void | RemoveProperty (const Handle< IGESData_IGESEntity > &ent) |
Removes a Property from the list. More... | |
void | SetLineWeight (const Standard_Real defw, const Standard_Real maxw, const Standard_Integer gradw) |
computes and sets "true" line weight according IGES rules from global data MaxLineWeight (maxv) and LineWeightGrad (gradw), or sets it to defw (Default) if LineWeightNumber is null More... | |
Public Member Functions inherited from Standard_Transient | |
Standard_Transient () | |
Empty constructor. More... | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. More... | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. More... | |
virtual | ~Standard_Transient () |
Destructor must be virtual. More... | |
virtual void | Delete () const |
Memory deallocator for transient classes. More... | |
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
Returns a type descriptor about this object. More... | |
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
Returns a true value if this is an instance of Type. More... | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. More... | |
Standard_Boolean | 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. More... | |
Standard_Boolean | IsKind (const Standard_CString 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. More... | |
Standard_Transient * | This () 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. More... | |
Standard_Integer | GetRefCount () const |
Get the reference counter of this object. More... | |
void | IncrementRefCounter () const |
Increments the reference counter of this object. More... | |
Standard_Integer | DecrementRefCounter () const |
Decrements the reference counter of this object; returns the decremented value. More... | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
typedef void | base_type |
Returns a type descriptor about this object. More... | |
Static Public Member Functions inherited from Standard_Transient | |
static const char * | get_type_name () |
Returns a type descriptor about this object. More... | |
static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
Returns type descriptor of Standard_Transient class. More... | |
Protected Member Functions inherited from IGESData_IGESEntity | |
IGESData_IGESEntity () | |
prepares lists of optionnal data, set values to defaults More... | |
void | InitTypeAndForm (const Standard_Integer typenum, const Standard_Integer formnum) |
Initializes Type and Form Numbers to new values. Reserved for special uses. More... | |
void | LoadAssociativities (const Interface_EntityList &list) |
Loads a complete, already loaded, List of Asociativities (used during Read or Copy Operations) More... | |
void | LoadProperties (const Interface_EntityList &list) |
Loads a complete, already loaded, List of Properties (used during Read or Copy Operations) More... | |
void | ClearProperties () |
Removes all properties in once. More... | |
This class allows to create IGES Entities in a literal form : their definition is free, but they are not recognized as instances of specific classes.
This is a way to define test files without having to create and fill specific classes of Entities, or creating an IGES File ex nihilo, with respect for all format constraints (such a way is very difficult to run and to master).
This class has the same content as an UndefinedEntity, only it gives way to act on its content
IGESData_FreeFormatEntity::IGESData_FreeFormatEntity | ( | ) |
Creates a completely empty FreeFormatEntity.
void IGESData_FreeFormatEntity::AddEntities | ( | const Handle< IGESData_HArray1OfIGESEntity > & | ents | ) |
Adds a set of Entities, given as a HArray1OfIGESEntity Causes creation of : an Integer Parameter which gives count of Entities, then the list of Entities of the Array Error if an Entity is not an IGESEntity All these Entities will be interpreted as "Positive Pointers" by IGESWriter.
void IGESData_FreeFormatEntity::AddEntity | ( | const Interface_ParamType | ptype, |
const Handle< IGESData_IGESEntity > & | ent, | ||
const Standard_Boolean | negative = Standard_False |
||
) |
Adds a Parameter which references an Entity. If the Entity is Null, the added parameter will define a "Null Pointer" (0) If <negative> is given True, this will command Sending to File (see IGESWriter) to produce a "Negative Pointer" (Default is False)
void IGESData_FreeFormatEntity::AddLiteral | ( | const Interface_ParamType | ptype, |
const Handle< TCollection_HAsciiString > & | val | ||
) |
Adds a literal Parameter to the list (as such)
void IGESData_FreeFormatEntity::AddLiteral | ( | const Interface_ParamType | ptype, |
const Standard_CString | val | ||
) |
Adds a literal Parameter to the list (builds an HAsciiString)
void IGESData_FreeFormatEntity::AddNegativePointers | ( | const Handle< TColStd_HSequenceOfInteger > & | list | ) |
Adds a list of Ranks of Parameters to be noted as Negative Pointers (this will be taken into account for Parameters which are Entities)
void IGESData_FreeFormatEntity::ClearNegativePointers | ( | ) |
Clears all informations about Negative Pointers, hence every Entity kind Parameter will be send normally, as Positive.
Standard_Boolean IGESData_FreeFormatEntity::IsNegativePointer | ( | const Standard_Integer | num | ) | const |
Returns True if <num> is noted as for a "Negative Pointer" (see AddEntity for details). Senseful only if IsParamEntity answers True for <num>, else returns False.
Standard_Boolean IGESData_FreeFormatEntity::IsParamEntity | ( | const Standard_Integer | num | ) | const |
Returns True if a Parameter is recorded as an entity Error if num is not between 1 and NbParams.
Standard_Integer IGESData_FreeFormatEntity::NbParams | ( | ) | const |
Gives count of recorded parameters.
Handle< TColStd_HSequenceOfInteger > IGESData_FreeFormatEntity::NegativePointers | ( | ) | const |
Returns the complete list of Ramks of Parameters which have been noted as Negative Pointers Warning : It is returned as a Null Handle if none was noted.
Standard_Boolean IGESData_FreeFormatEntity::ParamData | ( | const Standard_Integer | num, |
Interface_ParamType & | ptype, | ||
Handle< IGESData_IGESEntity > & | ent, | ||
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.
Handle< IGESData_IGESEntity > IGESData_FreeFormatEntity::ParamEntity | ( | const Standard_Integer | num | ) | const |
Returns Entity corresponding to a Param, given its rank Error if out of range or if Param num does not designate an Entity.
Interface_ParamType IGESData_FreeFormatEntity::ParamType | ( | const Standard_Integer | num | ) | const |
Returns the ParamType of a Param, given its rank Error if num is not between 1 and NbParams.
Handle< TCollection_HAsciiString > IGESData_FreeFormatEntity::ParamValue | ( | const Standard_Integer | num | ) | const |
Returns litteral value of a Parameter, given its rank Error if num is out of range, or if Parameter is not literal.
void IGESData_FreeFormatEntity::SetFormNumber | ( | const Standard_Integer | formnum | ) |
Sets Form Number to a new Value (to called after SetTypeNumber)
void IGESData_FreeFormatEntity::SetTypeNumber | ( | const Standard_Integer | typenum | ) |
Sets Type Number to a new Value, and Form Number to Zero.
|
overridevirtual |
WriteOwnParams is redefined for FreeFormatEntity to take into account the supplementary information "Negative Pointer".
Reimplemented from IGESData_UndefinedEntity.