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

#include <mathtyp.h>

Inheritance diagram for NamedValue:
Collaboration diagram for NamedValue:

Public Member Functions

 NamedValue (const char *const s)
 
virtual ~NamedValue (void)
 
virtual bool IsVar (void) const
 
const char * GetName (void) const
 
virtual TypedValue::Type GetType (void) const =0
 
virtual const char *const GetTypeName (void) const
 
virtual TypedValue GetVal (void) const =0
 
virtual bool Const (void) const =0
 
virtual bool MayChange (void) const =0
 

Private Member Functions

void AllocName (const char *const s)
 

Private Attributes

char * name
 

Detailed Description

Definition at line 152 of file mathtyp.h.

Constructor & Destructor Documentation

NamedValue::NamedValue ( const char *const  s)

Definition at line 1725 of file mathp.cc.

References AllocName().

1726 : name(NULL)
1727 {
1728  AllocName(s);
1729 }
void AllocName(const char *const s)
Definition: mathp.cc:1738
char * name
Definition: mathtyp.h:154

Here is the call graph for this function:

NamedValue::~NamedValue ( void  )
virtual

Definition at line 1731 of file mathp.cc.

References ASSERT, name, and SAFEDELETEARR.

1732 {
1733  ASSERT(name != NULL);
1735 }
#define SAFEDELETEARR(pnt)
Definition: mynewmem.h:713
char * name
Definition: mathtyp.h:154
#define ASSERT(expression)
Definition: colamd.c:977

Member Function Documentation

void NamedValue::AllocName ( const char *const  s)
private

Definition at line 1738 of file mathp.cc.

References ASSERT, name, and SAFESTRDUP.

Referenced by NamedValue().

1739 {
1740  ASSERT(s != NULL);
1741  SAFESTRDUP(name, s);
1742 }
char * name
Definition: mathtyp.h:154
#define ASSERT(expression)
Definition: colamd.c:977
#define SAFESTRDUP(pnt, src)
Definition: mynewmem.h:707
virtual bool NamedValue::Const ( void  ) const
pure virtual

Implemented in MathParser::PlugInVar, and Var.

Referenced by MathParser::stmt().

const char * NamedValue::GetName ( void  ) const

Definition at line 1751 of file mathp.cc.

References ASSERT, and name.

Referenced by EE_DeclareAssign::Eval(), MathParser::InsertSym(), EE_Var::Output(), EE_Assign::Output(), EE_DeclareAssign::Output(), and Table::Put().

1752 {
1753  ASSERT(name != NULL);
1754  return name;
1755 }
char * name
Definition: mathtyp.h:154
#define ASSERT(expression)
Definition: colamd.c:977
virtual TypedValue::Type NamedValue::GetType ( void  ) const
pure virtual

Implemented in MathParser::PlugInVar, and Var.

Referenced by GetTypeName(), and MathParser::stmt().

const char *const NamedValue::GetTypeName ( void  ) const
virtual

Definition at line 1758 of file mathp.cc.

References GetType(), and TypedValue::GetTypeName().

Referenced by EE_DeclareAssign::Output(), and MathParser::stmt().

1759 {
1760  return TypedValue::GetTypeName(GetType());
1761 }
virtual TypedValue::Type GetType(void) const =0
const char *const GetTypeName(void) const
Definition: mathp.cc:1176

Here is the call graph for this function:

virtual TypedValue NamedValue::GetVal ( void  ) const
pure virtual
bool NamedValue::IsVar ( void  ) const
virtual

Reimplemented in Var.

Definition at line 1745 of file mathp.cc.

Referenced by DriveHandler::DriveHandler(), MathParser::InsertSym(), and MathParser::stmt().

1746 {
1747  return false;
1748 }
virtual bool NamedValue::MayChange ( void  ) const
pure virtual

Implemented in MathParser::PlugInVar, and Var.

Member Data Documentation

char* NamedValue::name
private

Definition at line 154 of file mathtyp.h.

Referenced by AllocName(), GetName(), and ~NamedValue().


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