21 namespace makVrfVrlinkExtToolkit
23 class DtReflectedExtendedAttributesObjectList;
24 class DtReflectedExtendedAttributesObject;
28 #include <vl/globalObjectDesignator.h>
31 #include <vlutil/vlPrint.h>
32 #include <vlutil/vlPrintUtil.h>
56 template<
class ReflectedObjType,
class StateRepType>
59 template<
class ReflectedObjType,
class StateRepType>
65 template<
class ReflectedObjType,
class StateRepType>
68 template<
class ReflectedObjType,
class StateRepType>
74 template<
class ReflectedObjType,
class StateRepType>
77 template<
class ReflectedObjType,
class StateRepType>
99 template<
class StateRepType>
102 DtPrintAttribute(DtInfo,
"EntityId", stateRep->entityId().string());
103 DtPrintAttribute(DtInfo,
"EntityType", stateRep->entityType().string());
109 DtPrintAttribute(DtInfo,
"EnvironmentProcessId", stateRep->environmentalProcessID().string());
110 DtPrintAttribute(DtInfo,
"EnvironmentType", stateRep->environmentType().string());
114 template<
class ReflectedObjType,
class StateRepType>
118 processObjectAdded<ReflectedObjType, StateRepType>(
object);
121 template<
class ReflectedObjType,
class StateRepType>
126 object->addPostUpdateCallback(objectUpdatedCallback<ReflectedObjType, StateRepType>,
this);
128 processObjectUpdated<ReflectedObjType, StateRepType>(object);
132 template<
class ReflectedObjType,
class StateRepType>
136 processObjectUpdated<ReflectedObjType, StateRepType>(
object);
139 template<
class ReflectedObjType,
class StateRepType>
144 bool headerPrinted =
false;
148 StateRepType* sr =
dynamic_cast<StateRepType*
>(
object->stateRep());
153 std::vector<DtReaderWriterRegistryData *>::const_iterator propIter =
154 sr->stateProperties().registry().registryData().begin();
155 std::vector<DtReaderWriterRegistryData *>::const_iterator propEnd =
156 sr->stateProperties().registry().registryData().end();
157 for (; propIter != propEnd; ++propIter)
168 DtInfo <<
"****************************************" << std::endl;
169 DtInfo <<
"****** Updated State Properties *******" << std::endl;
170 DtInfo <<
"****************************************" << std::endl;
171 printStateRepBasicInfo<StateRepType>(sr);
173 headerPrinted =
true;
176 DtInfo << prop->
stringRep() << std::endl;
186 template<
class ReflectedObjType,
class StateRepType>
190 processObjectRemoved<ReflectedObjType, StateRepType>(
object);
193 template<
class ReflectedObjType,
class StateRepType>
198 object->removePostUpdateCallback(objectUpdatedCallback<ReflectedObjType, StateRepType>,
this);
DtVrfStatePropertyPrinter & operator=(const DtVrfStatePropertyPrinter &orig)
Not implemented.
virtual DtString stringRep(const DtString &root="") const =0
DtReflectedVrfControlObjectList * myReflectedControlObjectList
Definition: vrfStatePropertyPrinter.h:88
DtReflectedVrfExtEntityList * myReflectedEntityList
Definition: vrfStatePropertyPrinter.h:86
virtual bool wasUpdatedSince(DtTime t) const
Can be implemented in subclasses to return true if an update occurred after the specified time...
DtVrfStatePropertyPrinter()
Not implemented.
makVrfVrlinkExtToolkit::DtReflectedExtendedAttributesObjectList * myReflectedExtendedAttributesList
Definition: vrfStatePropertyPrinter.h:90
void processObjectRemoved(ReflectedObjType *object)
Callback for the removal of objects.
Definition: vrfStatePropertyPrinter.h:194
Definition: reflectedVrfExtEntityList.h:23
Definition: readerWriter.h:85
void printStateRepBasicInfo(StateRepType *stateRep)
Prints some basic identifying information about the state rep.
Definition: vrfStatePropertyPrinter.h:100
void printStateRepBasicInfo< DtControlObjectRepository >(DtControlObjectRepository *stateRep)
Prints some basic identifying information about the state rep.
Definition: vrfStatePropertyPrinter.h:107
Interface class used to define minimal interface for a property. The DtPropertyInterface class provid...
Definition: propertyInterface.h:48
Contains the DtExtEntityStateRepository class.
Registers for all state property updates and prints the current state.
Definition: vrfStatePropertyPrinter.h:35
DtExerciseConn * exerciseConn()
DtControlObjectRepository class extends the DtControlObjectBaseRepository to be able to handle extend...
Definition: controlObjectRepository.h:27
virtual bool init(DtSmsLoader *smsLoader)
The DtCommunicationManager class is a convenience class that will create both the DtNetworkInterfaceM...
Definition: communicationManager.h:51
DtClock myClock
Definition: vrfStatePropertyPrinter.h:93
void processObjectUpdated(ReflectedObjType *object)
Callback for the update of objects.
Definition: vrfStatePropertyPrinter.h:140
void processObjectAdded(ReflectedObjType *object)
Callback for the addition of new objects.
Definition: vrfStatePropertyPrinter.h:122
virtual DtPropertyInterface * property()
Returns a PropertyInterface pointer of the ReaderWriter. Returns 0 by default, must by overridden by ...
DtCommunicationManager * myEventManager
Definition: vrfStatePropertyPrinter.h:85
Definition: smsLoader.h:19
Definition: reflectedVrfExtControlObjectList.h:23
DtReflectedVrfExtAggregateList * myReflectedAggregateList
Definition: vrfStatePropertyPrinter.h:87
static void objectUpdatedCallback(ReflectedObjType *object, void *usr)
Callback for the update of objects.
Definition: vrfStatePropertyPrinter.h:133
virtual ~DtVrfStatePropertyPrinter()
static void objectAddedCallback(ReflectedObjType *object, void *usr)
Callback for the addition of new objects.
Definition: vrfStatePropertyPrinter.h:115
static void objectRemovedCallback(ReflectedObjType *object, void *usr)
Callback for the removal of objects.
Definition: vrfStatePropertyPrinter.h:187
std::map< DtGlobalObjectDesignator, DtTime > myLastUpdateTimes
Definition: vrfStatePropertyPrinter.h:94
Definition: reflectedVrfExtAggregateList.h:23