Esempio n. 1
0
//
// MetaTable::setConstString
//
// If the table already contains a MetaConstString with the provided key, its
// value will be set to newValue. Otherwise, a new MetaConstString will be
// created with this key and value and will be added to the table.
//
void MetaTable::setConstString(size_t keyIndex, const char *newValue)
{
   MetaObject *obj;

   if(!(obj = getObjectKeyAndType(keyIndex, RTTI(MetaConstString))))
      addConstString(keyIndex, newValue);
   else
      static_cast<MetaConstString *>(obj)->setValue(newValue);
}
Esempio n. 2
0
//
// MetaTable::setConstString
//
// If the table already contains a MetaConstString with the provided key, its
// value will be set to newValue. Otherwise, a new MetaConstString will be
// created with this key and value and will be added to the table.
//
void MetaTable::setConstString(size_t keyIndex, const char *newValue)
{
   MetaConstString *obj;

   if(!(obj = getObjectKeyAndTypeEx<MetaConstString>(keyIndex)))
      addConstString(keyIndex, newValue);
   else
      obj->setValue(newValue);
}