12#ifndef SST_CORE_SERIALIZATION_OBJECTMAP_H
13#define SST_CORE_SERIALIZATION_OBJECTMAP_H
15#include "sst/core/from_string.h"
16#include "sst/core/warnmacros.h"
43namespace SST::Core::Serialization {
48 bool operator()(
const std::string& a,
const std::string& b)
const
53 if ( isdigit(a[0]) && isdigit(b[0]) ) {
56 unsigned long long na = strtoull(a.c_str(), &ea, 10);
57 if ( *ea ==
'\0' && errno == 0 ) {
59 unsigned long long nb = strtoull(b.c_str(), &eb, 10);
60 if ( *eb ==
'\0' && errno == 0 )
return na < nb;
63 return std::less<>()(a, b);
71using ObjectMultimap = std::multimap<std::string, ObjectMap*, ObjectMultimapCmp>;
116class ObjectMapComparison
119 enum class Op : std::uint8_t { LT, LTE, GT, GTE, EQ, NEQ, CHANGED, INVALID };
121 static Op getOperationFromString(
const std::string& op)
123 if ( op ==
"<" )
return Op::LT;
124 if ( op ==
"<=" )
return Op::LTE;
125 if ( op ==
">" )
return Op::GT;
126 if ( op ==
">=" )
return Op::GTE;
127 if ( op ==
"==" )
return Op::EQ;
128 if ( op ==
"!=" )
return Op::NEQ;
129 if ( op ==
"changed" )
return Op::CHANGED;
133 static std::string getStringFromOp(Op op)
157 ObjectMapComparison() =
default;
159 explicit ObjectMapComparison(
const std::string& name) :
163 ObjectMapComparison(
const std::string& name,
ObjectMap* obj) :
168 virtual ~ObjectMapComparison() =
default;
169 virtual bool compare() = 0;
170 virtual std::string getCurrentValue()
const = 0;
171 virtual void print(std::ostream& stream)
const = 0;
172 virtual void* getVar()
const = 0;
173 const std::string& getName()
const {
return name_; }
176 std::string name_ =
"";
219 virtual void set_impl(
const std::string& UNUSED(value)) {}
240 size_t refCount_ = 1;
270 virtual bool checkValue(
const std::string& UNUSED(value))
const {
return false; }
322 static ObjectMultimap emptyVars;
342 if ( !--refCount_ )
delete this;
357 const std::string& UNUSED(name), ObjectMapComparison::Op UNUSED(op),
const std::string& UNUSED(value))
const
362 virtual ObjectMapComparison* getComparisonVar(
const std::string& UNUSED(name), ObjectMapComparison::Op UNUSED(op),
363 const std::string& UNUSED(name2),
ObjectMap* UNUSED(var2))
const
365 printf(
"In virtual ObjectMapComparison\n");
369 virtual ObjectBuffer* getObjectBuffer(
const std::string& UNUSED(name),
size_t UNUSED(sz)) {
return nullptr; }
424 virtual std::string
get()
const {
return ""; }
438 void set(
const std::string& value)
454 virtual std::string
get(
const std::string& var);
474 virtual void set(
const std::string& var,
const std::string& value,
bool& found,
bool& read_only);
531 virtual std::string
listVariable(std::string name,
bool& found,
int recurse = 0);
544 virtual std::string
list(
int recurse = 0);
571 void activate(
ObjectMap* parent,
const std::string& name)
597 std::string listRecursive(
const std::string& name,
int level,
int recurse);
603std::ostream& dumpObjectMap(std::ostream& os,
const ObjectMap& obj,
size_t indent = 0);
606operator<<(std::ostream& os,
const ObjectMap& obj)
608 return dumpObjectMap(os, obj);
637 for (
const auto& [name, child] :
variables_ )
638 if ( child !=
nullptr ) child->decRefCount();
679 for (
const auto& [name, child] :
variables_ )
680 if ( child !=
nullptr ) child->refresh();
713 std::string
getType()
const override {
return ""; }
721 void*
getAddr()
const override {
return nullptr; }
794template <
class T1,
class T2,
class =
void>
795constexpr bool have_common_type_v =
false;
797template <
class T1,
class T2>
798constexpr bool have_common_type_v<T1, T2, std::void_t<std::common_type_t<T1, T2>>> =
true;
801template <
class T,
class =
void>
802constexpr bool is_ordered_v =
false;
805constexpr bool is_ordered_v<T, std::void_t<
decltype(T {} < T {})>> =
true;
809template <
typename T1,
typename T2>
810std::enable_if_t<have_common_type_v<T1, T2>,
bool>
811cmp(T1 t1, ObjectMapComparison::Op op, T2 t2)
813 using T = std::common_type_t<T1, T2>;
815 case ObjectMapComparison::Op::LT:
816 if constexpr ( is_ordered_v<T> )
817 return static_cast<T
>(t1) <
static_cast<T
>(t2);
820 case ObjectMapComparison::Op::LTE:
821 if constexpr ( is_ordered_v<T> )
822 return static_cast<T
>(t1) <=
static_cast<T
>(t2);
825 case ObjectMapComparison::Op::GT:
826 if constexpr ( is_ordered_v<T> )
827 return static_cast<T
>(t1) >
static_cast<T
>(t2);
830 case ObjectMapComparison::Op::GTE:
831 if constexpr ( is_ordered_v<T> )
832 return static_cast<T
>(t1) >=
static_cast<T
>(t2);
835 case ObjectMapComparison::Op::EQ:
836 return static_cast<T
>(t1) ==
static_cast<T
>(t2);
837 case ObjectMapComparison::Op::NEQ:
838 case ObjectMapComparison::Op::CHANGED:
839 return static_cast<T
>(t1) !=
static_cast<T
>(t2);
841 std::cout <<
"Invalid comparison operator\n";
847template <
typename T1,
typename T2>
848std::enable_if_t<!have_common_type_v<T1, T2>,
bool>
849cmp(T1 UNUSED(t1), ObjectMapComparison::Op UNUSED(op), T2 UNUSED(t2))
852 printf(
"ERROR: cmp() does not support comparison of two types without a std::common_type\n");
859template <
typename T,
typename REF = T>
860class ObjectMapComparison_impl :
public ObjectMapComparison
863 ObjectMapComparison_impl(
const std::string& name, REF* var, Op op,
const std::string& value) :
864 ObjectMapComparison(name),
868 if ( op_ == Op::CHANGED ) {
870 comp_value_ =
static_cast<T
>(*var_);
874 comp_value_ = SST::Core::from_string<T>(value);
878 bool compare()
override
881 bool ret = cmp(*var_, op_, comp_value_);
884 if ( op_ == Op::CHANGED ) comp_value_ =
static_cast<T
>(*var_);
889 std::string getCurrentValue()
const override {
return SST::Core::to_string(*var_); }
891 void* getVar()
const override {
return var_; }
893 void print(std::ostream& stream)
const override
895 stream << name_ <<
" " << getStringFromOp(op_);
896 if ( op_ == Op::CHANGED )
899 stream <<
" " << SST::Core::to_string(comp_value_) <<
" ";
911template <
typename T1,
typename T2>
912class ObjectMapComparison_var :
public ObjectMapComparison
915 ObjectMapComparison_var(
const std::string& name1, T1* var1, Op op,
const std::string& name2, T2* var2) :
916 ObjectMapComparison(name1),
923 bool compare()
override
927 return cmp(v1, op_, v2);
930 std::string getCurrentValue()
const override
932 return SST::Core::to_string(*var1_) +
" " + SST::Core::to_string(*var2_);
935 void* getVar()
const override {
return var1_; }
937 void print(std::ostream& stream)
const override
939 stream << name_ <<
" " << getStringFromOp(op_);
940 if ( op_ == Op::CHANGED )
943 stream <<
" " << name2_ <<
" ";
947 std::string
const name2_;
956 ObjectBuffer(
const std::string& name,
size_t sz) :
961 virtual ~ObjectBuffer() =
default;
963 virtual void sample(
size_t index,
bool trigger) = 0;
964 virtual std::string get(
size_t index)
const = 0;
965 virtual std::string getTriggerVal()
const = 0;
967 std::string getName()
const {
return name_; }
968 size_t getBufSize()
const {
return bufSize_; }
975template <
typename T,
typename REF = T>
976class ObjectBuffer_impl :
public ObjectBuffer
979 ObjectBuffer_impl(
const std::string& name, REF* varPtr,
size_t sz) :
980 ObjectBuffer(name, sz),
983 objectBuffer_.resize(sz);
986 void sample(
size_t index,
bool trigger)
override
988 objectBuffer_[index] = *varPtr_;
989 if ( trigger ) triggerVal = *varPtr_;
992 std::string get(
size_t index)
const override {
return SST::Core::to_string(objectBuffer_.at(index)); }
994 std::string getTriggerVal()
const override {
return SST::Core::to_string(triggerVal); }
998 std::vector<T> objectBuffer_;
1011 tagBuffer_.resize(bufSize_);
1012 cycleBuffer_.resize(bufSize_);
1013 handlerBuffer_.resize(bufSize_);
1016 virtual ~TraceBuffer() =
default;
1018 void setBufferReset() { reset_ =
true; }
1020 void resetTraceBuffer()
1022 printf(
" Reset Trace Buffer\n");
1033 size_t getBufferSize() {
return bufSize_; }
1037 objBuffers_.push_back(vb);
1041 enum BufferState :
int {
1048 const std::map<BufferState, char> state2char { { CLEAR,
'-' }, { TRIGGER,
'!' }, { POSTTRIGGER,
'+' },
1051 bool sampleT(
bool trigger, uint64_t cycle,
const std::string& handler)
1053 size_t start_state = state_;
1054 bool invokeAction =
false;
1058 if ( start_state == CLEAR ) {
1065 if ( start_state == TRIGGER || start_state == POSTTRIGGER ) {
1066 state_ = POSTTRIGGER;
1071#ifdef _OBJMAP_DEBUG_
1072 std::cout <<
" Sample:" << handler <<
": numRecs:" << numRecs_ <<
" first:" << first_ <<
" cur:" << cur_
1073 <<
" state:" << state2char.at(state_) <<
" isOverrun:" << isOverrun_
1074 <<
" samplesLost:" << samplesLost_ << std::endl;
1076 cycleBuffer_[cur_] = cycle;
1077 handlerBuffer_[cur_] = handler;
1079 triggerCycle = cycle;
1084 for (
size_t obj = 0; obj < numObjects; obj++ ) {
1085 varBuffer_ = objBuffers_[obj];
1086 varBuffer_->sample(cur_, trigger);
1089 if ( numRecs_ < bufSize_ ) {
1090 tagBuffer_[cur_] = state_;
1092 cur_ = (cur_ + 1) % bufSize_;
1093 if ( cur_ == 0 ) first_ = 0;
1097 if ( tagBuffer_[cur_] == TRIGGER ) {
1101 tagBuffer_[cur_] = state_;
1103 cur_ = (cur_ + 1) % bufSize_;
1111 if ( (state_ == TRIGGER) && (postDelay_ == 0) ) {
1112 invokeAction =
true;
1113 std::cout <<
" Invoke Action\n";
1116 if ( state_ == POSTTRIGGER ) {
1118 if ( postCount_ >= postDelay_ ) {
1119 invokeAction =
true;
1120 std::cout <<
" Invoke Action\n";
1124 return invokeAction;
1127 void dumpTraceBufferT()
1129 if ( numRecs_ == 0 )
return;
1143 for (
int j = start;; j++ ) {
1144 size_t i = j % bufSize_;
1146 std::cout <<
"buf[" << i <<
"] " << handlerBuffer_.at(i) <<
" @" << cycleBuffer_.at(i) <<
" ("
1147 << state2char.at(tagBuffer_.at(i)) <<
") ";
1149 for (
size_t obj = 0; obj < numObjects; obj++ ) {
1151 std::cout << SST::Core::to_string(varBuffer_->getName()) <<
"=" << varBuffer_->get(i) <<
" ";
1161 void dumpTriggerRecord()
1163 std::stringstream ss;
1164 if ( numRecs_ == 0 ) {
1165 std::cout <<
"No trace samples in current buffer" << std::endl;
1168 if ( state_ != CLEAR ) {
1169 ss <<
"LastTriggerRecord:@cycle" << triggerCycle <<
": SamplesLost=" << samplesLost_ <<
": ";
1170 for (
size_t obj = 0; obj < numObjects; obj++ ) {
1172 ss << SST::Core::to_string(varBuffer_->getName()) <<
"=" << varBuffer_->getTriggerVal() <<
" ";
1175 std::cout << ss.str();
1179 void printVars(std::stringstream& ss)
1181 for (
size_t obj = 0; obj < numObjects; obj++ ) {
1183 ss << SST::Core::to_string(varBuffer_->getName()) <<
" ";
1187 void printConfig(std::stringstream& ss)
1189 ss <<
"bufsize = " << bufSize_ <<
" postDelay = " << postDelay_ <<
" : ";
1195 size_t bufSize_ = 64;
1196 size_t postDelay_ = 8;
1197 size_t postCount_ = 0;
1200 size_t numRecs_ = 0;
1201 bool isOverrun_ =
false;
1202 size_t samplesLost_ = 0;
1203 bool reset_ =
false;
1204 BufferState state_ = CLEAR;
1206 size_t numObjects = 0;
1207 std::vector<BufferState> tagBuffer_;
1208 std::vector<std::string> handlerBuffer_;
1209 std::vector<ObjectBuffer*> objBuffers_;
1210 std::vector<uint64_t> cycleBuffer_;
1211 uint64_t triggerCycle;
1228template <
typename T,
typename REF = T>
1244 virtual void set_impl(
const std::string& value)
override
1247 *
addr_ = SST::Core::from_string<T>(value);
1249 catch (
const std::exception& e ) {
1250 std::cerr << e.what() <<
": " << value << std::endl;
1254 bool checkValue(
const std::string& value)
const override
1257 *
addr_ = SST::Core::from_string<T>(value);
1260 catch (
const std::exception& e ) {
1261 std::cerr << e.what() <<
": " << value << std::endl;
1269 std::string
get()
const override {
return addr_ ? SST::Core::to_string(
static_cast<T
>(*
addr_)) :
"nullptr"; }
1302 ObjectMapFundamental& operator=(
const ObjectMapFundamental&) =
delete;
1313 const std::string& name, ObjectMapComparison::Op op,
const std::string& value)
const override
1318 ObjectMapComparison* getComparisonVar(
const std::string& name, ObjectMapComparison::Op UNUSED(op),
1319 const std::string& name2,
ObjectMap* var2)
const override
1323 printf(
"Triggers can only use fundamental types; %s is not fundamental\n", name2.c_str());
1327 std::string type = var2->
getType();
1329 std::cout <<
"In ObjectMapComparison_var: " << name <<
" " << name2 << std::endl;
1331 std::string type1 =
getType();
1332 std::cout <<
"getType(v1): " << type1 << std::endl;
1333 std::cout <<
"getType(v2): " << type << std::endl;
1338 if constexpr ( std::is_arithmetic_v<T> ) {
1339 if ( type ==
"int" ) {
1341 name,
addr_, op, name2,
static_cast<int*
>(var2->
getAddr()));
1343 else if ( type ==
"unsigned" || type ==
"unsigned int" ) {
1344 return new ObjectMapComparison_var<REF, unsigned>(
1345 name,
addr_, op, name2,
static_cast<unsigned*
>(var2->
getAddr()));
1347 else if ( type ==
"long" ) {
1348 return new ObjectMapComparison_var<REF, long>(
1349 name,
addr_, op, name2,
static_cast<long*
>(var2->
getAddr()));
1351 else if ( type ==
"unsigned long" ) {
1352 return new ObjectMapComparison_var<REF, unsigned long>(
1353 name,
addr_, op, name2,
static_cast<unsigned long*
>(var2->
getAddr()));
1355 else if ( type ==
"char" ) {
1356 return new ObjectMapComparison_var<REF, char>(
1357 name,
addr_, op, name2,
static_cast<char*
>(var2->
getAddr()));
1359 else if ( type ==
"signed char" ) {
1360 return new ObjectMapComparison_var<REF, signed char>(
1361 name,
addr_, op, name2,
static_cast<signed char*
>(var2->
getAddr()));
1363 else if ( type ==
"unsigned char" ) {
1364 return new ObjectMapComparison_var<REF, unsigned char>(
1365 name,
addr_, op, name2,
static_cast<unsigned char*
>(var2->
getAddr()));
1367 else if ( type ==
"short" ) {
1368 return new ObjectMapComparison_var<REF, short>(
1369 name,
addr_, op, name2,
static_cast<short*
>(var2->
getAddr()));
1371 else if ( type ==
"unsigned short" ) {
1372 return new ObjectMapComparison_var<REF, unsigned short>(
1373 name,
addr_, op, name2,
static_cast<unsigned short*
>(var2->
getAddr()));
1375 else if ( type ==
"long long" ) {
1376 return new ObjectMapComparison_var<REF, long long>(
1377 name,
addr_, op, name2,
static_cast<long long*
>(var2->
getAddr()));
1379 else if ( type ==
"unsigned long long" ) {
1380 return new ObjectMapComparison_var<REF, unsigned long long>(
1381 name,
addr_, op, name2,
static_cast<unsigned long long*
>(var2->
getAddr()));
1383 else if ( type ==
"bool" ) {
1384 return new ObjectMapComparison_var<REF, bool>(
1385 name,
addr_, op, name2,
static_cast<bool*
>(var2->
getAddr()));
1387 else if ( type ==
"float" ) {
1388 return new ObjectMapComparison_var<REF, float>(
1389 name,
addr_, op, name2,
static_cast<float*
>(var2->
getAddr()));
1391 else if ( type ==
"double" ) {
1392 return new ObjectMapComparison_var<REF, double>(
1393 name,
addr_, op, name2,
static_cast<double*
>(var2->
getAddr()));
1395 else if ( type ==
"long double" ) {
1396 return new ObjectMapComparison_var<REF, long double>(
1397 name,
addr_, op, name2,
static_cast<long double*
>(var2->
getAddr()));
1401 std::cout <<
"Invalid type for comparison: " << name2 <<
"(" << type <<
")\n";
1405 ObjectBuffer* getObjectBuffer(
const std::string& name,
size_t sz)
override
1407 return new ObjectBuffer_impl<T, REF>(name,
addr_, sz);
1412template <
typename T>
1413ObjectMap* ObjectMapSerialization(T&& obj);
1425 explicit ObjectMapContainer(T* addr) :
1434 for (
const auto& [name, child] :
variables_ )
1435 if ( child !=
nullptr ) child->decRefCount();
1441 variables_ = std::move(
dynamic_cast<ObjectMapContainer&
>(*ObjectMapSerialization(*addr_)).
variables_);
1453template <
typename T,
typename REF,
typename PTYPE = T>
1454class ObjectMapFundamentalReference :
public ObjectMapFundamental<T, REF>
1458 static_assert(std::is_copy_constructible_v<REF> && std::is_convertible_v<REF, T> && std::is_assignable_v<REF, T>,
1459 "ObjectMapFundamentalReference<T, REF, PTYPE>: REF must be copyable, implicitly convertible to T, and "
1460 "assignable from T.");
1464 explicit ObjectMapFundamentalReference(
const REF& ref) :
1465 ObjectMapFundamental<T, REF>(std::addressof(this->ref)),
Definition objectMap.h:954
void * getAddr() const override
Get the address of the represented object.
Definition objectMap.h:788
std::string type_
Type of the variable as given by the demangled version of typeid(T).name() for the type.
Definition objectMap.h:735
ObjectMapClass(const ObjectMapClass &)=delete
Disallow copying and assignment.
std::string getType() const override
Get the type of the represented object.
Definition objectMap.h:781
ObjectMapClass(void *addr, const std::string &type)
Constructor.
Definition objectMap.h:762
void * addr_
Address of the variable for reading and writing.
Definition objectMap.h:740
~ObjectMapClass() override=default
Destructor.
ObjectMapClass()=default
Default constructor.
Template implementation of ObjectMapComparison for <op> .
Definition objectMap.h:861
Template implementation of ObjectMapComparison for <op> .
Definition objectMap.h:913
Base class for interacting with data from ObjectMap.
Definition objectMap.h:117
Class used to map containers.
Definition objectMap.h:1420
void refresh() override
Refresh the ObjectMap, reconstructing children.
Definition objectMap.h:1431
std::string getType() const override
Get the type of the variable represented by the ObjectMap.
Definition objectMap.h:1429
bool isContainer() const final override
Check to see if this ObjectMap represents a container.
Definition objectMap.h:1428
void * getAddr() const override
Get the address of the variable represented by the ObjectMap.
Definition objectMap.h:1430
Definition objectMap.h:1455
std::string getType() const override
Return the type represented by this ObjectMap as given by the demangled version of typeid(T)....
Definition objectMap.h:1470
ObjectMap representing fundamental types, and classes treated as fundamental types.
Definition objectMap.h:1230
std::string getType() const override
Return the type represented by this ObjectMap as given by the demangled version of typeid(T)....
Definition objectMap.h:1310
REF * addr_
Address of the variable for reading and writing.
Definition objectMap.h:1235
void * getAddr() const override
Get the address of the variable represented by the ObjectMap.
Definition objectMap.h:1283
std::string get() const override
Get the value of the object as a string.
Definition objectMap.h:1269
virtual void set_impl(const std::string &value) override
Set the value of the object represented as a string.
Definition objectMap.h:1244
bool isFundamental() const final override
Returns true as object is a fundamental.
Definition objectMap.h:1276
ObjectMapFundamental(const ObjectMapFundamental &)=delete
Disallow copying and assignment.
~ObjectMapFundamental() override=default
Destructor.
ObjectMapHierarchyOnly()=default
Default constructor.
~ObjectMapHierarchyOnly() override=default
Destructor.
std::string getType() const override
Returns empty string since there is no underlying object being represented.
Definition objectMap.h:713
void * getAddr() const override
Returns nullptr since there is no underlying object being represented.
Definition objectMap.h:721
const ObjectMultimap & getVariables() const final override
Get the list of child variables contained in this ObjectMap.
Definition objectMap.h:671
ObjectMapWithChildren()=default
Default constructor.
~ObjectMapWithChildren() override
Destructor.
Definition objectMap.h:635
void addVariable(const std::string &name, ObjectMap *obj) final override
Adds a variable to this ObjectMap.
Definition objectMap.h:655
void refresh() override
Refresh the children.
Definition objectMap.h:677
void removeVariable(const std::string &name) final override
Removes a variable from this ObjectMap.
Definition objectMap.h:662
ObjectMultimap variables_
Map that child ObjectMaps are stored in.
Definition objectMap.h:621
ObjectMapWithChildren(const ObjectMapWithChildren &)=delete
Disallow copying and assignment.
Base class for objects created by the serializer mapping mode used to map the variables for objects.
Definition objectMap.h:188
ObjectMap()=default
Default constructor primarily used for the "top" object in the hierarchy.
bool isReadOnly() const
Check to see if this object is read-only.
Definition objectMap.h:253
virtual std::string get() const
Get the value of the variable as a string.
Definition objectMap.h:424
virtual void removeVariable(const std::string &UNUSED(name))
Removes a variable from this ObjectMap.
Definition objectMap.h:412
size_t getRefCount() const
Get the current reference count.
Definition objectMap.h:350
virtual const ObjectMultimap & getVariables() const
Get the list of child variables contained in this ObjectMap.
Definition objectMap.h:314
bool read_only_
Indicates whether or not the variable is read-only.
Definition objectMap.h:211
virtual std::string listVariable(std::string name, bool &found, int recurse=0)
Create a string that lists information for the specified variable.
Definition objectMap.cc:168
std::string getFullName() const
Get the full hierarchical name of the variable represented by this ObjectMap, based on the path taken...
Definition objectMap.cc:23
ObjectMap(const ObjectMap &)=delete
Disallow copying and assignment.
std::string getName() const
Get the name of the variable represented by this ObjectMap.
Definition objectMap.h:280
virtual std::string list(int recurse=0)
Create a string that lists information for the current object.
Definition objectMap.cc:192
virtual ObjectMapComparison * getComparison(const std::string &UNUSED(name), ObjectMapComparison::Op UNUSED(op), const std::string &UNUSED(value)) const
Get a watch point for this object.
Definition objectMap.h:356
virtual std::string getType() const =0
Get the type of the variable represented by the ObjectMap.
ObjectMap * selectVariable(std::string name, bool &loop_detected, bool confirm=false)
Get the ObjectMap for the specified variable.
Definition objectMap.cc:50
virtual void addVariable(const std::string &UNUSED(name), ObjectMap *UNUSED(obj))
Adds a variable to this ObjectMap.
Definition objectMap.h:403
virtual ~ObjectMap()=default
Destructor.
void incRefCount()
Increment the reference counter for this ObjectMap.
Definition objectMap.h:332
virtual bool checkValue(const std::string &UNUSED(value)) const
Check if value string is valid for this type.
Definition objectMap.h:270
virtual bool isContainer() const
Check to see if this ObjectMap represents a container.
Definition objectMap.h:491
void set(const std::string &value)
Sets the value of the variable represented by the ObjectMap to the specified value,...
Definition objectMap.h:438
virtual void refresh()
Refresh the ObjectMap, reconstructing children.
Definition objectMap.h:560
ObjectMap * findVariable(const std::string &name, bool confirm=false) const
Find a variable in this object map.
Definition objectMap.cc:228
virtual void deactivate_callback()
Function that will get called when this object is deactivated (i.e selectParent() is called).
Definition objectMap.h:230
virtual bool isFundamental() const
Check to see if this ObjectMap represents a fundamental or a class treated as a fundamental.
Definition objectMap.h:483
virtual void set_impl(const std::string &UNUSED(value))
Function implemented by derived classes to implement set().
Definition objectMap.h:219
virtual void activate_callback()
Function that will get called when this object is selected.
Definition objectMap.h:224
static std::string demangle_name(const char *name)
Static function to demangle type names returned from typeid(T).name().
Definition objectMap.cc:152
void decRefCount()
Decrement the reference counter for this ObjectMap.
Definition objectMap.h:340
ObjectMap * selectParent()
Get the parent for this ObjectMap.
Definition objectMap.cc:38
void setReadOnly(bool state=true)
Set the read-only state of the object.
Definition objectMap.h:263
virtual void * getAddr() const =0
Get the address of the variable represented by the ObjectMap.
ObjectMapMetaData * mdata_
Metadata object for walking the object hierarchy.
Definition objectMap.h:206
Definition objectMap.h:1003
Definition objectMap.h:47