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
    TDF_Tool Class Reference

    This class provides general services for a data framework. More...

    #include <TDF_Tool.hxx>

    Static Public Member Functions

    static int NbLabels (const TDF_Label &aLabel)
     Returns the number of labels of the tree, including <aLabel>. aLabel is also included in this figure. This information is useful in setting the size of an array.
    static int NbAttributes (const TDF_Label &aLabel)
     Returns the total number of attributes attached to the labels dependent on the label aLabel. The attributes of aLabel are also included in this figure. This information is useful in setting the size of an array.
    static int NbAttributes (const TDF_Label &aLabel, const TDF_IDFilter &aFilter)
     Returns the number of attributes of the tree, selected by a<Filter>, including those of <aLabel>.
    static bool IsSelfContained (const TDF_Label &aLabel)
     Returns true if <aLabel> and its descendants reference only attributes or labels attached to themselves.
    static bool IsSelfContained (const TDF_Label &aLabel, const TDF_IDFilter &aFilter)
     Returns true if <aLabel> and its descendants reference only attributes or labels attached to themselves and kept by <aFilter>.
    static void OutReferers (const TDF_Label &theLabel, NCollection_Map< occ::handle< TDF_Attribute > > &theAtts)
     Returns in <theAtts> the attributes having out references.
    static void OutReferers (const TDF_Label &aLabel, const TDF_IDFilter &aFilterForReferers, const TDF_IDFilter &aFilterForReferences, NCollection_Map< occ::handle< TDF_Attribute > > &atts)
     Returns in <atts> the attributes having out references and kept by <aFilterForReferers>. It considers only the references kept by <aFilterForReferences>. Caution: <atts> is not cleared before use!
    static void OutReferences (const TDF_Label &aLabel, NCollection_Map< occ::handle< TDF_Attribute > > &atts)
     Returns in <atts> the referenced attributes. Caution: <atts> is not cleared before use!
    static void OutReferences (const TDF_Label &aLabel, const TDF_IDFilter &aFilterForReferers, const TDF_IDFilter &aFilterForReferences, NCollection_Map< occ::handle< TDF_Attribute > > &atts)
     Returns in <atts> the referenced attributes and kept by <aFilterForReferences>. It considers only the referrers kept by <aFilterForReferers>. Caution: <atts> is not cleared before use!
    static void RelocateLabel (const TDF_Label &aSourceLabel, const TDF_Label &fromRoot, const TDF_Label &toRoot, TDF_Label &aTargetLabel, const bool create=false)
     Returns the label having the same sub-entry as <aLabel> but located as descendant as <toRoot> instead of <fromRoot>.
    static void Entry (const TDF_Label &aLabel, TCollection_AsciiString &anEntry)
     Returns the entry for the label aLabel in the form of the ASCII character string anEntry containing the tag list for aLabel.
    static void TagList (const TDF_Label &aLabel, NCollection_List< int > &aTagList)
     Returns the entry of <aLabel> as list of integers in <aTagList>.
    static void TagList (const TCollection_AsciiString &anEntry, NCollection_List< int > &aTagList)
     Returns the entry expressed by <anEntry> as list of integers in <aTagList>.
    static void Label (const occ::handle< TDF_Data > &aDF, const TCollection_AsciiString &anEntry, TDF_Label &aLabel, const bool create=false)
     Returns the label expressed by <anEntry>; creates the label if it does not exist and if <create> is true.
    static void Label (const occ::handle< TDF_Data > &aDF, const char *const anEntry, TDF_Label &aLabel, const bool create=false)
     Returns the label expressed by <anEntry>; creates the label if it does not exist and if <create> is true.
    static void Label (const occ::handle< TDF_Data > &aDF, const NCollection_List< int > &aTagList, TDF_Label &aLabel, const bool create=false)
     Returns the label expressed by <anEntry>; creates the label if it does not exist and if <create> is true.
    static void CountLabels (NCollection_List< TDF_Label > &aLabelList, NCollection_DataMap< TDF_Label, int > &aLabelMap)
     Adds the labels of <aLabelList> to <aLabelMap> if they are unbound, or increases their reference counters. At the end of the process, <aLabelList> contains only the ADDED labels.
    static void DeductLabels (NCollection_List< TDF_Label > &aLabelList, NCollection_DataMap< TDF_Label, int > &aLabelMap)
     Decreases the reference counters of the labels of <aLabelList> to <aLabelMap>, and removes labels with null counter. At the end of the process, <aLabelList> contains only the SUPPRESSED labels.
    static void DeepDump (Standard_OStream &anOS, const occ::handle< TDF_Data > &aDF)
     Dumps <aDF> and its labels and their attributes.
    static void ExtendedDeepDump (Standard_OStream &anOS, const occ::handle< TDF_Data > &aDF, const TDF_IDFilter &aFilter)
     Dumps <aDF> and its labels and their attributes, if their IDs are kept by <aFilter>. Dumps also the attributes content.
    static void DeepDump (Standard_OStream &anOS, const TDF_Label &aLabel)
     Dumps <aLabel>, its children and their attributes.
    static void ExtendedDeepDump (Standard_OStream &anOS, const TDF_Label &aLabel, const TDF_IDFilter &aFilter)
     Dumps <aLabel>, its children and their attributes, if their IDs are kept by <aFilter>. Dumps also the attributes content.

    Detailed Description

    This class provides general services for a data framework.

    Member Function Documentation

    ◆ CountLabels()

    void TDF_Tool::CountLabels ( NCollection_List< TDF_Label > & aLabelList,
    NCollection_DataMap< TDF_Label, int > & aLabelMap )
    static

    Adds the labels of <aLabelList> to <aLabelMap> if they are unbound, or increases their reference counters. At the end of the process, <aLabelList> contains only the ADDED labels.

    ◆ DeductLabels()

    void TDF_Tool::DeductLabels ( NCollection_List< TDF_Label > & aLabelList,
    NCollection_DataMap< TDF_Label, int > & aLabelMap )
    static

    Decreases the reference counters of the labels of <aLabelList> to <aLabelMap>, and removes labels with null counter. At the end of the process, <aLabelList> contains only the SUPPRESSED labels.

    ◆ DeepDump() [1/2]

    void TDF_Tool::DeepDump ( Standard_OStream & anOS,
    const occ::handle< TDF_Data > & aDF )
    static

    Dumps <aDF> and its labels and their attributes.

    ◆ DeepDump() [2/2]

    void TDF_Tool::DeepDump ( Standard_OStream & anOS,
    const TDF_Label & aLabel )
    static

    Dumps <aLabel>, its children and their attributes.

    ◆ Entry()

    void TDF_Tool::Entry ( const TDF_Label & aLabel,
    TCollection_AsciiString & anEntry )
    static

    Returns the entry for the label aLabel in the form of the ASCII character string anEntry containing the tag list for aLabel.

    ◆ ExtendedDeepDump() [1/2]

    void TDF_Tool::ExtendedDeepDump ( Standard_OStream & anOS,
    const occ::handle< TDF_Data > & aDF,
    const TDF_IDFilter & aFilter )
    static

    Dumps <aDF> and its labels and their attributes, if their IDs are kept by <aFilter>. Dumps also the attributes content.

    ◆ ExtendedDeepDump() [2/2]

    void TDF_Tool::ExtendedDeepDump ( Standard_OStream & anOS,
    const TDF_Label & aLabel,
    const TDF_IDFilter & aFilter )
    static

    Dumps <aLabel>, its children and their attributes, if their IDs are kept by <aFilter>. Dumps also the attributes content.

    ◆ IsSelfContained() [1/2]

    bool TDF_Tool::IsSelfContained ( const TDF_Label & aLabel)
    static

    Returns true if <aLabel> and its descendants reference only attributes or labels attached to themselves.

    ◆ IsSelfContained() [2/2]

    bool TDF_Tool::IsSelfContained ( const TDF_Label & aLabel,
    const TDF_IDFilter & aFilter )
    static

    Returns true if <aLabel> and its descendants reference only attributes or labels attached to themselves and kept by <aFilter>.

    ◆ Label() [1/3]

    void TDF_Tool::Label ( const occ::handle< TDF_Data > & aDF,
    const char *const anEntry,
    TDF_Label & aLabel,
    const bool create = false )
    static

    Returns the label expressed by <anEntry>; creates the label if it does not exist and if <create> is true.

    ◆ Label() [2/3]

    void TDF_Tool::Label ( const occ::handle< TDF_Data > & aDF,
    const NCollection_List< int > & aTagList,
    TDF_Label & aLabel,
    const bool create = false )
    static

    Returns the label expressed by <anEntry>; creates the label if it does not exist and if <create> is true.

    ◆ Label() [3/3]

    void TDF_Tool::Label ( const occ::handle< TDF_Data > & aDF,
    const TCollection_AsciiString & anEntry,
    TDF_Label & aLabel,
    const bool create = false )
    static

    Returns the label expressed by <anEntry>; creates the label if it does not exist and if <create> is true.

    ◆ NbAttributes() [1/2]

    int TDF_Tool::NbAttributes ( const TDF_Label & aLabel)
    static

    Returns the total number of attributes attached to the labels dependent on the label aLabel. The attributes of aLabel are also included in this figure. This information is useful in setting the size of an array.

    ◆ NbAttributes() [2/2]

    int TDF_Tool::NbAttributes ( const TDF_Label & aLabel,
    const TDF_IDFilter & aFilter )
    static

    Returns the number of attributes of the tree, selected by a<Filter>, including those of <aLabel>.

    ◆ NbLabels()

    int TDF_Tool::NbLabels ( const TDF_Label & aLabel)
    static

    Returns the number of labels of the tree, including <aLabel>. aLabel is also included in this figure. This information is useful in setting the size of an array.

    ◆ OutReferences() [1/2]

    void TDF_Tool::OutReferences ( const TDF_Label & aLabel,
    const TDF_IDFilter & aFilterForReferers,
    const TDF_IDFilter & aFilterForReferences,
    NCollection_Map< occ::handle< TDF_Attribute > > & atts )
    static

    Returns in <atts> the referenced attributes and kept by <aFilterForReferences>. It considers only the referrers kept by <aFilterForReferers>. Caution: <atts> is not cleared before use!

    ◆ OutReferences() [2/2]

    void TDF_Tool::OutReferences ( const TDF_Label & aLabel,
    NCollection_Map< occ::handle< TDF_Attribute > > & atts )
    static

    Returns in <atts> the referenced attributes. Caution: <atts> is not cleared before use!

    ◆ OutReferers() [1/2]

    void TDF_Tool::OutReferers ( const TDF_Label & aLabel,
    const TDF_IDFilter & aFilterForReferers,
    const TDF_IDFilter & aFilterForReferences,
    NCollection_Map< occ::handle< TDF_Attribute > > & atts )
    static

    Returns in <atts> the attributes having out references and kept by <aFilterForReferers>. It considers only the references kept by <aFilterForReferences>. Caution: <atts> is not cleared before use!

    ◆ OutReferers() [2/2]

    void TDF_Tool::OutReferers ( const TDF_Label & theLabel,
    NCollection_Map< occ::handle< TDF_Attribute > > & theAtts )
    static

    Returns in <theAtts> the attributes having out references.

    Caution: <theAtts> is not cleared before use!

    ◆ RelocateLabel()

    void TDF_Tool::RelocateLabel ( const TDF_Label & aSourceLabel,
    const TDF_Label & fromRoot,
    const TDF_Label & toRoot,
    TDF_Label & aTargetLabel,
    const bool create = false )
    static

    Returns the label having the same sub-entry as <aLabel> but located as descendant as <toRoot> instead of <fromRoot>.

    Example :

    aLabel = 0:3:24:7:2:7 fromRoot = 0:3:24 toRoot = 0:5 returned label = 0:5:7:2:7

    ◆ TagList() [1/2]

    void TDF_Tool::TagList ( const TCollection_AsciiString & anEntry,
    NCollection_List< int > & aTagList )
    static

    Returns the entry expressed by <anEntry> as list of integers in <aTagList>.

    ◆ TagList() [2/2]

    void TDF_Tool::TagList ( const TDF_Label & aLabel,
    NCollection_List< int > & aTagList )
    static

    Returns the entry of <aLabel> as list of integers in <aTagList>.


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