# ApplicationFramework
TKLCAF
TDataStd

# TDataStd_Variable Class Reference

Variable attribute.
==================
* A variable is associated to a TDataStd_Real (which
contains its current value) and a TDataStd_Name
attribute (which contains its name). It contains a
constant flag, and a Unit
* An expression may be assigned to a variable. In
thatcase the expression is handled by the associated
Expression Attribute and the Variable returns True to
the method <isassigned>.
.

`#include <TDataStd_Variable.hxx>`

Inheritance diagram for TDataStd_Variable:

[legend]

## Public Member Functions

Standard_EXPORT | TDataStd_Variable ()
Standard_EXPORT void | Name (const TCollection_ExtendedString &string)
| set or change the name of the variable, in myUnknown and my associated Name attribute.
Standard_EXPORT const TCollection_ExtendedString & | Name () const
| returns string stored in the associated Name attribute.
Standard_EXPORT void | Set (const Standard_Real value, const TDataStd_RealEnum dimension=TDataStd_SCALAR) const
| retrieve or create the associated real attribute and set the value <value>. if creation, dimension is written.
Standard_EXPORT Standard_Boolean | IsValued () const
| returns True if a Real attribute is associated.
Standard_EXPORT Standard_Real | Get () const
| returns value stored in associated Real attribute.
Standard_EXPORT Handle_TDataStd_Real | Real () const
| returns associated Real attribute.
Standard_EXPORT Standard_Boolean | IsAssigned () const
| returns True if an Expression attribute is associated. //! create(if doesn't exist), set and returns the assigned expression attribute.
Standard_EXPORT Handle_TDataStd_Expression | Assign () const
| create(if doesn't exist) and returns the assigned expression attribute. fill it after.
Standard_EXPORT void | Desassign () const
| if <me> is assigned delete the associated expression attribute.
Standard_EXPORT Handle_TDataStd_Expression | Expression () const
| if <me> is assigned, returns associated Expression attribute.
Standard_EXPORT Standard_Boolean | IsCaptured () const
| shortcut for <Real()->IsCaptured()>
Standard_EXPORT Standard_Boolean | IsConstant () const
| A constant value is not modified by regeneration. .
Standard_EXPORT void | Unit (const TCollection_AsciiString &unit)
Standard_EXPORT const TCollection_AsciiString & | Unit () const
| to read/write fields ===================
Standard_EXPORT void | Constant (const Standard_Boolean status)
| if <status> is True, this variable will not be modified by the solver.
Standard_EXPORT const Standard_GUID & | ID () const
| Returns the ID of the attribute. .
Standard_EXPORT void | Restore (const Handle(TDF_Attribute)&With)
| Restores the backuped contents from <anattribute> into this one. It is used when aborting a transaction. .
Standard_EXPORT Handle_TDF_Attribute | NewEmpty () const
| Returns an new empty attribute from the good end type. It is used by the copy algorithm. .
Standard_EXPORT void | Paste (const Handle(TDF_Attribute)&Into, const Handle(TDF_RelocationTable)&RT) const

This method is different from the "Copy" one,
because it is used when copying an attribute from
a source structure into a target structure. This
method may paste the contents of <me> into
<intoattribute>.
The given pasted attribute can be full or empty of
its contents. But don't make a NEW! Just set the
contents!
It is possible to use <arelocationtable> to
get/set the relocation value of a source
attribute.
.

virtual Standard_EXPORT void | References (const Handle(TDF_DataSet)&DS) const
| to export reference to the associated Name attribute.
virtual Standard_EXPORT Standard_OStream & | Dump (Standard_OStream &anOS) const
| Dumps the minimum information about <me> on <astream>. .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Static Public Member Functions

static Standard_EXPORT const Standard_GUID & | GetID ()
| class methods =============
static Standard_EXPORT Handle_TDataStd_Variable | Set (const TDF_Label &label)
| Find, or create, a Variable attribute. //! Real methods ============ .

## Private Attributes

Standard_Boolean | isConstant
TCollection_AsciiString | myUnit

## Constructor & Destructor Documentation

Standard_EXPORT TDataStd_Variable::TDataStd_Variable | ( |  | ) |

## Member Function Documentation

Standard_EXPORT Handle_TDataStd_Expression TDataStd_Variable::Assign | ( |  | ) | const

Standard_EXPORT void TDataStd_Variable::Constant | ( | const Standard_Boolean | status | ) |

Standard_EXPORT void TDataStd_Variable::Desassign | ( |  | ) | const

virtual Standard_EXPORT Standard_OStream& TDataStd_Variable::Dump | ( | Standard_OStream & | anOS | ) | const`[virtual]`

| Reimplemented from TDF_Attribute.

Standard_EXPORT Handle_TDataStd_Expression TDataStd_Variable::Expression | ( |  | ) | const

Standard_EXPORT Standard_Real TDataStd_Variable::Get | ( |  | ) | const

static Standard_EXPORT const Standard_GUID& TDataStd_Variable::GetID | ( |  | ) | `[static]`

Standard_EXPORT const TDataStd_Variable::Handle | ( | Standard_Type |  | ) | const

| Reimplemented from TDF_Attribute.

Standard_EXPORT const Standard_GUID& TDataStd_Variable::ID | ( |  | ) | const`[virtual]`

| Implements TDF_Attribute.

Standard_EXPORT Standard_Boolean TDataStd_Variable::IsAssigned | ( |  | ) | const

Standard_EXPORT Standard_Boolean TDataStd_Variable::IsCaptured | ( |  | ) | const

Standard_EXPORT Standard_Boolean TDataStd_Variable::IsConstant | ( |  | ) | const

Standard_EXPORT Standard_Boolean TDataStd_Variable::IsValued | ( |  | ) | const

Standard_EXPORT const TCollection_ExtendedString& TDataStd_Variable::Name | ( |  | ) | const

Standard_EXPORT void TDataStd_Variable::Name | ( | const TCollection_ExtendedString & | string | ) |

Standard_EXPORT Handle_TDF_Attribute TDataStd_Variable::NewEmpty | ( |  | ) | const`[virtual]`

| Implements TDF_Attribute.

Standard_EXPORT void TDataStd_Variable::Paste | ( | const Handle(TDF_Attribute)& | Into,
|  | const Handle(TDF_RelocationTable)& | RT
| ) | const`[virtual]`

| Implements TDF_Attribute.

Standard_EXPORT Handle_TDataStd_Real TDataStd_Variable::Real | ( |  | ) | const

virtual Standard_EXPORT void TDataStd_Variable::References | ( | const Handle(TDF_DataSet)& | DS | ) | const`[virtual]`

| Reimplemented from TDF_Attribute.

Standard_EXPORT void TDataStd_Variable::Restore | ( | const Handle(TDF_Attribute)& | With | ) | `[virtual]`

| Implements TDF_Attribute.

Standard_EXPORT void TDataStd_Variable::Set | ( | const Standard_Real | value,
|  | const TDataStd_RealEnum | dimension = `TDataStd_SCALAR`
| ) | const

static Standard_EXPORT Handle_TDataStd_Variable TDataStd_Variable::Set | ( | const TDF_Label & | label | ) | `[static]`

Standard_EXPORT const TCollection_AsciiString& TDataStd_Variable::Unit | ( |  | ) | const

Standard_EXPORT void TDataStd_Variable::Unit | ( | const TCollection_AsciiString & | unit | ) |

## Field Documentation

Standard_Boolean TDataStd_Variable::isConstant `[private]`

TCollection_AsciiString TDataStd_Variable::myUnit `[private]`

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

- TDataStd_Variable.hxx