OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    Interface_Category Class Reference

    This class manages categories A category is defined by a name and a number, and can be seen as a way of rough classification, i.e. less precise than a cdl type. Hence, it is possible to dispatch every entity in about a dozen of categories, twenty is a reasonable maximum. More...

    #include <Interface_Category.hxx>

    Public Member Functions

     Interface_Category ()
     Creates a Category, with no protocol yet.
     Interface_Category (const occ::handle< Interface_Protocol > &theProtocol)
     Creates a Category with a given protocol.
     Interface_Category (const occ::handle< Interface_GTool > &theGTool)
     Creates a Category with a given GTool.
    void SetProtocol (const occ::handle< Interface_Protocol > &theProtocol)
     Sets/Changes Protocol.
    int CatNum (const occ::handle< Standard_Transient > &theEnt, const Interface_ShareTool &theShares)
     Determines the Category Number for an entity in its context, by using general service CategoryNumber.
    void ClearNums ()
     Clears the recorded list of category numbers for a Model.
    void Compute (const occ::handle< Interface_InterfaceModel > &theModel, const Interface_ShareTool &theShares)
     Computes the Category Number for each entity and records it, in an array (ent.number -> category number) Hence, it can be queried by the method Num. The Model itself is not recorded, this method is intended to be used in a wider context (which detains also a Graph, etc).
    int Num (const int theNumEnt) const
     Returns the category number recorded for an entity number Returns 0 if out of range.

    Static Public Member Functions

    static int AddCategory (const char *const theName)
     Records a new Category defined by its names, produces a number New if not yet recorded.
    static int NbCategories ()
     Returns the count of recorded categories.
    static const char * Name (const int theNum)
     Returns the name of a category, according to its number.
    static int Number (const char *const theName)
     Returns the number of a category, according to its name.
    static void Init ()
     Default initialisation (protected against several calls : passes only once).

    Detailed Description

    This class manages categories A category is defined by a name and a number, and can be seen as a way of rough classification, i.e. less precise than a cdl type. Hence, it is possible to dispatch every entity in about a dozen of categories, twenty is a reasonable maximum.

    Basically, the system provides the following categories : Shape (Geometry, BRep, CSG, Features, etc...) Drawing (Drawing, Views, Annotations, Pictures, Sketches ...) Structure (Component & Part, Groups & Patterns ...) Description (Meta-Data : Relations, Properties, Product ...) Auxiliary (those which do not enter in the above list) and some dedicated categories FEA, Kinematics, Piping, etc... plus Professional for other dedicated non-classed categories

    In addition, this class provides a way to compute then quickly query category numbers for an entire model. Values are just recorded as a list of numbers, control must then be done in a wider context (which must provide a Graph)

    Constructor & Destructor Documentation

    ◆ Interface_Category() [1/3]

    Interface_Category::Interface_Category ( )
    inline

    Creates a Category, with no protocol yet.

    ◆ Interface_Category() [2/3]

    Interface_Category::Interface_Category ( const occ::handle< Interface_Protocol > & theProtocol)
    inline

    Creates a Category with a given protocol.

    ◆ Interface_Category() [3/3]

    Interface_Category::Interface_Category ( const occ::handle< Interface_GTool > & theGTool)
    inline

    Creates a Category with a given GTool.

    Member Function Documentation

    ◆ AddCategory()

    int Interface_Category::AddCategory ( const char *const theName)
    static

    Records a new Category defined by its names, produces a number New if not yet recorded.

    ◆ CatNum()

    int Interface_Category::CatNum ( const occ::handle< Standard_Transient > & theEnt,
    const Interface_ShareTool & theShares )

    Determines the Category Number for an entity in its context, by using general service CategoryNumber.

    ◆ ClearNums()

    void Interface_Category::ClearNums ( )
    inline

    Clears the recorded list of category numbers for a Model.

    ◆ Compute()

    void Interface_Category::Compute ( const occ::handle< Interface_InterfaceModel > & theModel,
    const Interface_ShareTool & theShares )

    Computes the Category Number for each entity and records it, in an array (ent.number -> category number) Hence, it can be queried by the method Num. The Model itself is not recorded, this method is intended to be used in a wider context (which detains also a Graph, etc).

    ◆ Init()

    void Interface_Category::Init ( )
    static

    Default initialisation (protected against several calls : passes only once).

    ◆ Name()

    const char * Interface_Category::Name ( const int theNum)
    static

    Returns the name of a category, according to its number.

    ◆ NbCategories()

    int Interface_Category::NbCategories ( )
    static

    Returns the count of recorded categories.

    ◆ Num()

    int Interface_Category::Num ( const int theNumEnt) const

    Returns the category number recorded for an entity number Returns 0 if out of range.

    ◆ Number()

    int Interface_Category::Number ( const char *const theName)
    static

    Returns the number of a category, according to its name.

    ◆ SetProtocol()

    void Interface_Category::SetProtocol ( const occ::handle< Interface_Protocol > & theProtocol)
    inline

    Sets/Changes Protocol.


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