OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    IGESData_FreeFormatEntity Class Reference

    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>

    Inheritance diagram for IGESData_FreeFormatEntity:

    Public Member Functions

     IGESData_FreeFormatEntity ()
     Creates a completely empty FreeFormatEntity.
    void SetTypeNumber (const int typenum)
     Sets Type Number to a new Value, and Form Number to Zero.
    void SetFormNumber (const int formnum)
     Sets Form Number to a new Value (to called after SetTypeNumber).
    int NbParams () const
     Gives count of recorded parameters.
    bool ParamData (const int numnum, Interface_ParamType &ptype, occ::handle< IGESData_IGESEntity > &ent, occ::handle< TCollection_HAsciiString > &valval) 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.
    Interface_ParamType ParamType (const int numnum) const
     Returns the ParamType of a Param, given its rank Error if num is not between 1 and NbParams.
    bool IsParamEntity (const int numnum) const
     Returns True if a Parameter is recorded as an entity Error if num is not between 1 and NbParams.
    occ::handle< IGESData_IGESEntityParamEntity (const int numnum) const
     Returns Entity corresponding to a Param, given its rank Error if out of range or if Param num does not designate an Entity.
    bool IsNegativePointer (const int numnum) 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.
    occ::handle< TCollection_HAsciiStringParamValue (const int numnum) const
     Returns literal value of a Parameter, given its rank Error if num is out of range, or if Parameter is not literal.
    occ::handle< NCollection_HSequence< int > > 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.
    void AddLiteral (const Interface_ParamType ptype, const occ::handle< TCollection_HAsciiString > &valval)
     Adds a literal Parameter to the list (as such).
    void AddLiteral (const Interface_ParamType ptype, const char *const valval)
     Adds a literal Parameter to the list (builds an HAsciiString).
    void AddEntity (const Interface_ParamType ptype, const occ::handle< IGESData_IGESEntity > &ent, const bool negative=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 AddEntities (const occ::handle< NCollection_HArray1< occ::handle< IGESData_IGESEntity > > > &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 AddNegativePointers (const occ::handle< NCollection_HSequence< int > > &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 ClearNegativePointers ()
     Clears all information about Negative Pointers, hence every Entity kind Parameter will be sent normally, as Positive.
    void WriteOwnParams (IGESData_IGESWriter &IW) const override
     WriteOwnParams is redefined for FreeFormatEntity to take into account the supplementary information "Negative Pointer".
    Public Member Functions inherited from IGESData_UndefinedEntity
     IGESData_UndefinedEntity ()
     creates an unknown entity
    occ::handle< Interface_UndefinedContentUndefinedContent () const
     Returns own data as an UndefinedContent.
    occ::handle< Interface_UndefinedContentChangeableContent ()
     Returns own data as an UndefinedContent, in order to touch it.
    void SetNewContent (const occ::handle< Interface_UndefinedContent > &cont)
     Redefines a completely new UndefinedContent Used by a Copy which begins by ShallowCopy, for instance.
    bool 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
    int DirStatus () const
     returns Directory Error Status (used for Copy)
    void SetOKDirPart ()
     Erases the Directory Error Status Warning : Be sure that data are consistent to call this method ...
    IGESData_DefType DefLineFont () const override
     returns Error status if necessary, else calls original method
    IGESData_DefList DefLevel () const override
     returns Error status if necessary, else calls original method
    IGESData_DefList DefView () const override
     returns Error status if necessary, else calls original method
    IGESData_DefType DefColor () const override
     returns Error status if necessary, else calls original method
    bool HasSubScriptNumber () const override
     returns Error status if necessary, else calls original method (that is, if SubScript field is not blank or positive integer)
    virtual bool ReadDir (const occ::handle< IGESData_IGESReaderData > &IR, IGESData_DirPart &DP, occ::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).
    virtual void ReadOwnParams (const occ::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
    Public Member Functions inherited from IGESData_IGESEntity
    IGESData_IGESType IGESType () const
     gives IGES typing info (includes "Type" and "Form" data)
    int TypeNumber () const
     gives IGES Type Number (often coupled with Form Number)
    int FormNumber () const
     Returns the form number for that type of an IGES entity. The default form number is 0.
    occ::handle< IGESData_IGESEntityDirFieldEntity (const int 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.
    bool HasStructure () const
     returns True if an IGESEntity is defined with a Structure (it is normally reserved for certain classes, such as Macros)
    occ::handle< IGESData_IGESEntityStructure () const
     Returns Structure (used by some types of IGES Entities only) Returns a Null Handle if Structure is not defined.
    int RankLineFont () const
     Returns LineFont definition as an Integer (if defined as Rank) If LineFont is defined as an Entity, returns a negative value.
    occ::handle< IGESData_LineFontEntityLineFont () const
     Returns LineFont as an Entity (if defined as Reference) Returns a Null Handle if DefLineFont is not "DefReference".
    int Level () const
     Returns the level the entity belongs to. Returns -1 if the entity belongs to more than one level.
    occ::handle< IGESData_LevelListEntityLevelList () const
     Returns LevelList if Level is defined as a list. Returns a null handle if DefLevel is not DefSeveral.
    occ::handle< IGESData_ViewKindEntityView () 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.
    occ::handle< IGESData_ViewKindEntitySingleView () 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.
    occ::handle< IGESData_ViewKindEntityViewList () 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.
    bool HasTransf () const
     Returns True if a Transformation Matrix is defined.
    occ::handle< IGESData_TransfEntityTransf () const
     Returns the Transformation Matrix (under IGES definition) Returns a Null Handle if there is none for a more complete use, see Location & CompoundLocation.
    bool HasLabelDisplay () const
     Returns True if a LabelDisplay mode is defined for this entity.
    occ::handle< IGESData_LabelDisplayEntityLabelDisplay () const
     Returns the Label Display Associativity Entity if there is one. Returns a null handle if there is none.
    int BlankStatus () const
     gives Blank Status (0 visible, 1 blanked)
    int SubordinateStatus () const
     gives Subordinate Switch (0-1-2-3)
    int UseFlag () const
     gives Entity's Use Flag (0 to 5)
    int HierarchyStatus () const
     gives Hierarchy status (0-1-2)
    int LineWeightNumber () const
     Returns the LineWeight Number (0 not defined), see also LineWeight.
    double LineWeight () const
     Returns the true Line Weight, computed from LineWeightNumber and Global Parameter in the Model by call to SetLineWeight.
    int 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.
    occ::handle< IGESData_ColorEntityColor () const
     Returns the IGES entity which describes the color of the entity. Returns a null handle if this entity was defined as an integer.
    bool CResValues (char *res1, char *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
    bool HasShortLabel () const
     Returns true if a short label is defined. A short label is a non-blank 8-character string.
    occ::handle< TCollection_HAsciiStringShortLabel () const
     Returns the label value for this IGES entity as a string. Warning If the label is blank, this string is null.
    int 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.
    void InitDirFieldEntity (const int fieldnum, const occ::handle< IGESData_IGESEntity > &ent)
     Initializes a directory field as an Entity of any kind See DirFieldEntity for more details.
    void InitTransf (const occ::handle< IGESData_TransfEntity > &ent)
     Initializes Transf, or erases it if <ent> is given Null.
    void InitView (const occ::handle< IGESData_ViewKindEntity > &ent)
     Initializes View, or erases it if <ent> is given Null.
    void InitLineFont (const occ::handle< IGESData_LineFontEntity > &ent, const int rank=0)
     Initializes LineFont : if <ent> is not Null, it gives LineFont, else <rank> gives or erases (if zero) RankLineFont.
    void InitLevel (const occ::handle< IGESData_LevelListEntity > &ent, const int valval=0)
     Initializes Level : if <ent> is not Null, it gives LevelList, else <val> gives or erases (if zero) unique Level.
    void InitColor (const occ::handle< IGESData_ColorEntity > &ent, const int rank=0)
     Initializes Color data : if <ent> is not Null, it gives Color, else <rank> gives or erases (if zero) RankColor.
    void InitStatus (const int blank, const int subordinate, const int useflag, const int hierarchy)
     Initializes the Status of Directory Part.
    void SetLabel (const occ::handle< TCollection_HAsciiString > &labellabel, const int sub=-1)
     Sets a new Label to an IGES Entity If is given, it sets value of SubScriptNumber else, SubScriptNumber is erased.
    void InitMisc (const occ::handle< IGESData_IGESEntity > &str, const occ::handle< IGESData_LabelDisplayEntity > &lab, const int 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.
    bool 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).
    occ::handle< IGESData_IGESEntityUniqueParent () const
     Returns the Unique Parent (in the sense given by HasOneParent) Error if there is none or several.
    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.
    gp_GTrsf VectorLocation () const
     Returns Location considered for Vectors, i.e. without its Translation Part. As Location, it gives local definition.
    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.
    bool HasName () const
     says if a Name is defined, as Short Label or as Name Property (Property is looked first, else ShortLabel is considered)
    occ::handle< TCollection_HAsciiStringNameValue () 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
    bool 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.
    int NbAssociativities () const
     gives number of recorded associativities (0 no list defined)
    Interface_EntityIterator Associativities () const
     Returns the Associativity List under the form of an EntityIterator.
    int NbTypedAssociativities (const occ::handle< Standard_Type > &atype) const
     gives how many Associativities have a given type
    occ::handle< IGESData_IGESEntityTypedAssociativity (const occ::handle< Standard_Type > &atype) const
     returns the Associativity of a given Type (if only one exists) Error if none or more than one
    void Associate (const occ::handle< IGESData_IGESEntity > &ent) const
     Sets "me" in the Associativity list of another Entity.
    void Dissociate (const occ::handle< IGESData_IGESEntity > &ent) const
     Resets "me" from the Associativity list of another Entity.
    bool 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.
    int NbProperties () const
     Gives number of recorded properties (0 no list defined).
    Interface_EntityIterator Properties () const
     Returns Property List under the form of an EntityIterator.
    int NbTypedProperties (const occ::handle< Standard_Type > &atype) const
     gives how many Properties have a given type
    occ::handle< IGESData_IGESEntityTypedProperty (const occ::handle< Standard_Type > &atype, const int anum=0) const
     returns the Property of a given Type Error if none or more than one
    void AddProperty (const occ::handle< IGESData_IGESEntity > &ent)
     Adds a Property in the list.
    void RemoveProperty (const occ::handle< IGESData_IGESEntity > &ent)
     Removes a Property from the list.
    void SetLineWeight (const double defw, const double maxw, const int 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
    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

    typedef void base_type
     Returns a type descriptor about this object.
    static constexpr const char * get_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 IGESData_IGESEntity
     IGESData_IGESEntity ()
     prepares lists of optional data, set values to defaults
    void InitTypeAndForm (const int typenum, const int formnum)
     Initializes Type and Form Numbers to new values. Reserved for special uses.
    void LoadAssociativities (const Interface_EntityList &list)
     Loads a complete, already loaded, List of Asociativities (used during Read or Copy Operations).
    void LoadProperties (const Interface_EntityList &list)
     Loads a complete, already loaded, List of Properties (used during Read or Copy Operations).
    void ClearProperties ()
     Removes all properties in once.

    Detailed Description

    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

    Constructor & Destructor Documentation

    ◆ IGESData_FreeFormatEntity()

    IGESData_FreeFormatEntity::IGESData_FreeFormatEntity ( )

    Creates a completely empty FreeFormatEntity.

    Member Function Documentation

    ◆ AddEntities()

    void IGESData_FreeFormatEntity::AddEntities ( const occ::handle< NCollection_HArray1< occ::handle< IGESData_IGESEntity > > > & 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.

    ◆ AddEntity()

    void IGESData_FreeFormatEntity::AddEntity ( const Interface_ParamType ptype,
    const occ::handle< IGESData_IGESEntity > & ent,
    const bool negative = 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).

    ◆ AddLiteral() [1/2]

    void IGESData_FreeFormatEntity::AddLiteral ( const Interface_ParamType ptype,
    const char *const val )

    Adds a literal Parameter to the list (builds an HAsciiString).

    ◆ AddLiteral() [2/2]

    void IGESData_FreeFormatEntity::AddLiteral ( const Interface_ParamType ptype,
    const occ::handle< TCollection_HAsciiString > & val )

    Adds a literal Parameter to the list (as such).

    ◆ AddNegativePointers()

    void IGESData_FreeFormatEntity::AddNegativePointers ( const occ::handle< NCollection_HSequence< int > > & 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).

    ◆ ClearNegativePointers()

    void IGESData_FreeFormatEntity::ClearNegativePointers ( )

    Clears all information about Negative Pointers, hence every Entity kind Parameter will be sent normally, as Positive.

    ◆ IsNegativePointer()

    bool IGESData_FreeFormatEntity::IsNegativePointer ( const int 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.

    ◆ IsParamEntity()

    bool IGESData_FreeFormatEntity::IsParamEntity ( const int num) const

    Returns True if a Parameter is recorded as an entity Error if num is not between 1 and NbParams.

    ◆ NbParams()

    int IGESData_FreeFormatEntity::NbParams ( ) const

    Gives count of recorded parameters.

    ◆ NegativePointers()

    occ::handle< NCollection_HSequence< int > > 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.

    ◆ ParamData()

    bool IGESData_FreeFormatEntity::ParamData ( const int num,
    Interface_ParamType & ptype,
    occ::handle< IGESData_IGESEntity > & ent,
    occ::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.

    ◆ ParamEntity()

    occ::handle< IGESData_IGESEntity > IGESData_FreeFormatEntity::ParamEntity ( const int 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.

    ◆ ParamType()

    Interface_ParamType IGESData_FreeFormatEntity::ParamType ( const int num) const

    Returns the ParamType of a Param, given its rank Error if num is not between 1 and NbParams.

    ◆ ParamValue()

    occ::handle< TCollection_HAsciiString > IGESData_FreeFormatEntity::ParamValue ( const int num) const

    Returns literal value of a Parameter, given its rank Error if num is out of range, or if Parameter is not literal.

    ◆ SetFormNumber()

    void IGESData_FreeFormatEntity::SetFormNumber ( const int formnum)

    Sets Form Number to a new Value (to called after SetTypeNumber).

    ◆ SetTypeNumber()

    void IGESData_FreeFormatEntity::SetTypeNumber ( const int typenum)

    Sets Type Number to a new Value, and Form Number to Zero.

    ◆ WriteOwnParams()

    void IGESData_FreeFormatEntity::WriteOwnParams ( IGESData_IGESWriter & IW) const
    overridevirtual

    WriteOwnParams is redefined for FreeFormatEntity to take into account the supplementary information "Negative Pointer".

    Reimplemented from IGESData_UndefinedEntity.


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