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

    This class describes all the facilities to manipulate and compute units contained in a string expression. More...

    #include <Units_UnitSentence.hxx>

    Inheritance diagram for Units_UnitSentence:

    Public Member Functions

     Units_UnitSentence (const char *const astring)
     Creates and returns a UnitSentence. The string <astring> describes in natural language the unit or the composed unit to be analysed.
     Units_UnitSentence (const char *const astring, const occ::handle< NCollection_HSequence< occ::handle< Units_Quantity > > > &aquantitiessequence)
     Creates and returns a UnitSentence. The string <astring> describes in natural language the unit to be analysed. The sequence of physical quantities <asequenceofquantities> describes the available dictionary of units you want to use.
    void Analyse ()
     Analyzes the sequence of tokens created by the constructor to find the true significance of each token.
    void SetUnits (const occ::handle< NCollection_HSequence< occ::handle< Units_Quantity > > > &aquantitiessequence)
     For each token which represents a unit, finds in the sequence of physical quantities all the characteristics of the unit found.
    Public Member Functions inherited from Units_Sentence
     Units_Sentence (const occ::handle< Units_Lexicon > &alexicon, const char *const astring)
     Createsand returns a Sentence, by analyzing the string <astring> with the lexicon <alexicon>.
    void SetConstants ()
     For each constant encountered, sets the value.
    occ::handle< NCollection_HSequence< occ::handle< Units_Token > > > Sequence () const
     Returns <thesequenceoftokens>.
    void Sequence (const occ::handle< NCollection_HSequence< occ::handle< Units_Token > > > &asequenceoftokens)
     Sets the field <thesequenceoftokens> to <asequenceoftokens>.
    occ::handle< Units_TokenEvaluate ()
     Computes and returns in a token the result of the expression.
    bool IsDone () const
     Return True if number of created tokens > 0 (i.e creation of sentence is successful).
    void Dump () const
     Useful for debugging.

    Detailed Description

    This class describes all the facilities to manipulate and compute units contained in a string expression.

    Constructor & Destructor Documentation

    ◆ Units_UnitSentence() [1/2]

    Units_UnitSentence::Units_UnitSentence ( const char *const astring)

    Creates and returns a UnitSentence. The string <astring> describes in natural language the unit or the composed unit to be analysed.

    ◆ Units_UnitSentence() [2/2]

    Units_UnitSentence::Units_UnitSentence ( const char *const astring,
    const occ::handle< NCollection_HSequence< occ::handle< Units_Quantity > > > & aquantitiessequence )

    Creates and returns a UnitSentence. The string <astring> describes in natural language the unit to be analysed. The sequence of physical quantities <asequenceofquantities> describes the available dictionary of units you want to use.

    Member Function Documentation

    ◆ Analyse()

    void Units_UnitSentence::Analyse ( )

    Analyzes the sequence of tokens created by the constructor to find the true significance of each token.

    ◆ SetUnits()

    void Units_UnitSentence::SetUnits ( const occ::handle< NCollection_HSequence< occ::handle< Units_Quantity > > > & aquantitiessequence)

    For each token which represents a unit, finds in the sequence of physical quantities all the characteristics of the unit found.


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