#include <cmt_fragment.h>
Collaboration diagram for Variable:
Public Types | |
typedef cmt_vector<Variable> | VariableVector |
Public Methods | |
Variable () | |
Variable (const cmt_string& n) | |
const cmt_string& | macro_braces () const |
const cmt_string& | macro_pars () const |
void | set (const cmt_string& new_name, const cmt_string& new_value = "") |
Variable& | operator= (const Variable& other) |
Variable& | operator= (const cmt_string& v) |
void | operator+= (const cmt_string& v) |
cmt_string | operator+ (const cmt_string& v) const |
operator const cmt_string & () const | |
bool | operator== (const cmt_string& v) const |
bool | operator!= (const cmt_string& v) const |
Public Attributes | |
cmt_string | name |
cmt_string | value |
Static Public Methods | |
Variable* | find (VariableVector& vector, const cmt_string& name) |
Private Attributes | |
cmt_string | m_macro_braces |
cmt_string | m_macro_pars |
|
Definition at line 13 of file cmt_fragment.h. |
|
Definition at line 34 of file cmt_fragment.cxx. 00035 { 00036 } |
|
Definition at line 39 of file cmt_fragment.cxx. 00039 : name (n) 00040 { 00041 m_macro_braces = "${"; 00042 m_macro_braces += name; 00043 m_macro_braces += "}"; 00044 00045 m_macro_pars = "$("; 00046 m_macro_pars += name; 00047 m_macro_pars += ")"; 00048 } |
|
Definition at line 20 of file cmt_fragment.cxx. Referenced by CmtModel::expand(), and constituents_action_iterator::set(). 00022 { 00023 for (int i = 0; i < vector.size (); i++) 00024 { 00025 Variable& v = vector[i]; 00026 00027 if (v.name == name) return (&v); 00028 } 00029 00030 return (0); 00031 } |
|
Definition at line 51 of file cmt_fragment.cxx. Referenced by Fragment::copy(), and Fragment::wincopy(). 00052 { 00053 return (m_macro_braces); 00054 } |
|
Definition at line 57 of file cmt_fragment.cxx. Referenced by Fragment::copy(), and Fragment::wincopy(). 00058 { 00059 return (m_macro_pars); 00060 } |
|
Definition at line 105 of file cmt_fragment.cxx. 00106 { 00107 return (value); 00108 } |
|
Definition at line 117 of file cmt_fragment.cxx. 00118 { 00119 return ((value != v)); 00120 } |
|
Definition at line 99 of file cmt_fragment.cxx. 00100 { 00101 return (value + v); 00102 } |
|
Definition at line 93 of file cmt_fragment.cxx. 00094 { 00095 value += v; 00096 } |
|
Definition at line 86 of file cmt_fragment.cxx. 00087 { 00088 value = v; 00089 return (*this); 00090 } |
|
Definition at line 79 of file cmt_fragment.cxx. 00080 { 00081 value = other.value; 00082 return (*this); 00083 } |
|
Definition at line 111 of file cmt_fragment.cxx. 00112 { 00113 return ((value == v)); 00114 } |
|
Definition at line 63 of file cmt_fragment.cxx. Referenced by CmtModel::expand(), and constituents_action_iterator::set(). 00065 { 00066 name = new_name; 00067 value = new_value; 00068 00069 m_macro_braces = "${"; 00070 m_macro_braces += name; 00071 m_macro_braces += "}"; 00072 00073 m_macro_pars = "$("; 00074 m_macro_pars += name; 00075 m_macro_pars += ")"; 00076 } |
|
Definition at line 40 of file cmt_fragment.h. |
|
Definition at line 41 of file cmt_fragment.h. |
|
Definition at line 36 of file cmt_fragment.h. |
|
Definition at line 37 of file cmt_fragment.h. |