MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Var Class Reference

#include <mathtyp.h>

Inheritance diagram for Var:
Collaboration diagram for Var:

Public Member Functions

 Var (const char *const s, const TypedValue &v)
 
 Var (const char *const s, const bool &b)
 
 Var (const char *const s, const Int &v)
 
 Var (const char *const s, const Real &v)
 
 Var (const char *const s, const std::string &v)
 
 ~Var (void)
 
bool IsVar (void) const
 
TypedValue::Type GetType (void) const
 
bool Const (void) const
 
bool MayChange (void) const
 
TypedValue GetVal (void) const
 
void SetVal (const bool &b)
 
void SetVal (const Int &v)
 
void SetVal (const Real &v)
 
void SetVal (const std::string &v)
 
void SetVal (const TypedValue &v)
 
void Cast (const TypedValue &v, bool bErr=false)
 
- Public Member Functions inherited from NamedValue
 NamedValue (const char *const s)
 
virtual ~NamedValue (void)
 
const char * GetName (void) const
 
virtual const char *const GetTypeName (void) const
 

Private Attributes

TypedValue value
 

Detailed Description

Definition at line 175 of file mathtyp.h.

Constructor & Destructor Documentation

Var::Var ( const char *const  s,
const TypedValue v 
)

Definition at line 1763 of file mathp.cc.

References TypedValue::Const(), TypedValue::SetConst(), and value.

1764 : NamedValue(s), value(v)
1765 {
1766  value.SetConst(v.Const(), true);
1767 }
NamedValue(const char *const s)
Definition: mathp.cc:1725
TypedValue value
Definition: mathtyp.h:177
void SetConst(bool isConst=true, bool bForce=false)
Definition: mathp.cc:1275
bool Const(void) const
Definition: mathp.cc:1182

Here is the call graph for this function:

Var::Var ( const char *const  s,
const bool b 
)

Definition at line 1769 of file mathp.cc.

References NO_OP.

1770 : NamedValue(s), value(v)
1771 {
1772  NO_OP;
1773 }
#define NO_OP
Definition: myassert.h:74
NamedValue(const char *const s)
Definition: mathp.cc:1725
TypedValue value
Definition: mathtyp.h:177
Var::Var ( const char *const  s,
const Int v 
)
Var::Var ( const char *const  s,
const Real v 
)

Definition at line 1781 of file mathp.cc.

References NO_OP.

1782 : NamedValue(s), value(v)
1783 {
1784  NO_OP;
1785 }
#define NO_OP
Definition: myassert.h:74
NamedValue(const char *const s)
Definition: mathp.cc:1725
TypedValue value
Definition: mathtyp.h:177
Var::Var ( const char *const  s,
const std::string &  v 
)

Definition at line 1787 of file mathp.cc.

References NO_OP.

1788 : NamedValue(s), value(v)
1789 {
1790  NO_OP;
1791 }
#define NO_OP
Definition: myassert.h:74
NamedValue(const char *const s)
Definition: mathp.cc:1725
TypedValue value
Definition: mathtyp.h:177
Var::~Var ( void  )

Definition at line 1793 of file mathp.cc.

References NO_OP.

1794 {
1795  NO_OP;
1796 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

void Var::Cast ( const TypedValue v,
bool  bErr = false 
)

Definition at line 1859 of file mathp.cc.

References TypedValue::Cast(), and value.

1860 {
1861  value.Cast(v, bErr);
1862 }
TypedValue & Cast(const TypedValue &var, bool bErr=false)
Definition: mathp.cc:1032
TypedValue value
Definition: mathtyp.h:177

Here is the call graph for this function:

bool Var::Const ( void  ) const
virtual

Implements NamedValue.

Definition at line 1811 of file mathp.cc.

References TypedValue::Const(), and value.

Referenced by EE_DeclareAssign::Output().

1812 {
1813  return value.Const();
1814 }
TypedValue value
Definition: mathtyp.h:177
bool Const(void) const
Definition: mathp.cc:1182

Here is the call graph for this function:

TypedValue::Type Var::GetType ( void  ) const
virtual

Implements NamedValue.

Definition at line 1805 of file mathp.cc.

References TypedValue::GetType(), and value.

1806 {
1807  return value.GetType();
1808 }
TypedValue::Type GetType(void) const
Definition: mathp.cc:1155
TypedValue value
Definition: mathtyp.h:177

Here is the call graph for this function:

TypedValue Var::GetVal ( void  ) const
virtual

Implements NamedValue.

Definition at line 1823 of file mathp.cc.

References value.

1824 {
1825  return value;
1826 }
TypedValue value
Definition: mathtyp.h:177
bool Var::IsVar ( void  ) const
virtual

Reimplemented from NamedValue.

Definition at line 1799 of file mathp.cc.

1800 {
1801  return true;
1802 }
bool Var::MayChange ( void  ) const
virtual

Implements NamedValue.

Definition at line 1817 of file mathp.cc.

References TypedValue::Const(), and value.

1818 {
1819  return !value.Const();
1820 }
TypedValue value
Definition: mathtyp.h:177
bool Const(void) const
Definition: mathp.cc:1182

Here is the call graph for this function:

void Var::SetVal ( const bool b)

Definition at line 1829 of file mathp.cc.

References TypedValue::Set(), and value.

Referenced by EE_Assign::Eval(), EE_DeclareAssign::Eval(), DriveHandler::SetTime(), and DriveHandler::SetVar().

1830 {
1831  value.Set(v);
1832 }
const TypedValue & Set(const bool &b)
Definition: mathp.cc:1285
TypedValue value
Definition: mathtyp.h:177

Here is the call graph for this function:

void Var::SetVal ( const Int v)
void Var::SetVal ( const Real v)

Definition at line 1841 of file mathp.cc.

References TypedValue::Set(), and value.

1842 {
1843  value.Set(v);
1844 }
const TypedValue & Set(const bool &b)
Definition: mathp.cc:1285
TypedValue value
Definition: mathtyp.h:177

Here is the call graph for this function:

void Var::SetVal ( const std::string &  v)

Definition at line 1847 of file mathp.cc.

References TypedValue::Set(), and value.

1848 {
1849  value.Set(v);
1850 }
const TypedValue & Set(const bool &b)
Definition: mathp.cc:1285
TypedValue value
Definition: mathtyp.h:177

Here is the call graph for this function:

void Var::SetVal ( const TypedValue v)

Definition at line 1853 of file mathp.cc.

References value.

1854 {
1855  value = v;
1856 }
TypedValue value
Definition: mathtyp.h:177

Member Data Documentation

TypedValue Var::value
private

Definition at line 177 of file mathtyp.h.

Referenced by Cast(), Const(), GetType(), GetVal(), MayChange(), SetVal(), and Var().


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