53 {
"RAND_MAX",
Int(RAND_MAX) },
55 {
"INT_MAX", std::numeric_limits<Int>::max() },
56 {
"INT_MIN", std::numeric_limits<Int>::min() },
57 {
"REAL_MAX", std::numeric_limits<Real>::max() },
58 {
"REAL_MIN", std::numeric_limits<Real>::min() },
63 {
"in2m",
Real(.0254) },
64 {
"m2in",
Real(1./.0254) },
65 {
"in2mm",
Real(25.4) },
66 {
"mm2in",
Real(1./25.4) },
67 {
"ft2m",
Real(.3048) },
68 {
"m2ft",
Real(1./.3048) },
69 {
"lb2kg",
Real(.45359237) },
70 {
"kg2lb",
Real(1./.45359237) },
73 {
"slug2kg",
Real(9.80665/.3048*.45359237) },
74 {
"kg2slug",
Real(.3048/.45359237/9.80665) },
89 while (p->
name != 0) {
93 silent_cerr(
"Table: unable to insert const \"" << p->
name <<
"\""
104 for (VM::iterator i =
vm.begin(); i !=
vm.end(); ++i) {
114 silent_cerr(
"Table::Put(): name \"" << name <<
"\" "
115 "already defined" << std::endl);
119 Var *pVar =
new Var(name.c_str(), x);
121 if (!
vm.insert(VM::value_type(name, pVar)).second) {
122 silent_cerr(
"Table::Put(): unable to insert variable "
123 "\"" << name <<
"\"" << std::endl);
135 silent_cerr(
"Table::Put(): name \"" << p->
GetName()
136 <<
"\" already defined" << std::endl);
140 if (!
vm.insert(VM::value_type(p->
GetName(), p)).second) {
141 silent_cerr(
"Table::Put(): unable to insert named value "
142 "\"" << p->
GetName() <<
"\"" << std::endl);
152 VM::const_iterator i =
vm.find(name);
162 for (Table::VM::const_iterator i = T.
vm.begin(); i != T.
vm.end(); ++i) {
164 if (i->second->Const()) {
167 out << i->second->GetTypeName()
168 <<
" " << i->second->GetName()
169 <<
" = " << i->second->GetVal() << std::endl;
#define MBDYN_EXCEPT_ARGS
Var * Put(const std::string &name, const TypedValue &v)
std::ostream & operator<<(std::ostream &out, const Table &T)
Table(bool bSetConstants)
NamedValue * Get(const std::string &name) const
void SetConst(bool isConst=true, bool bForce=false)
const char * GetName(void) const