VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sensorContactInfoList.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
12 #include <readerWriter/rwList.h>
14 #include "vrfutil/vrfutilDefines.h"
15 #include "vrfutil/rwUUID.h"
16 
17 #include <set>
18 
20 class DtString;
22 
31 {
32 
33 public:
34 
37 
39  DtSensorContactInfoList(const DtString& name, DtReaderWriterRegistry* parentRegistry = NULL);
40  DtSensorContactInfoList(const DtSymbolString& name, DtReaderWriterRegistry* parentRegistry = NULL);
41 
43  virtual ~DtSensorContactInfoList();
44 
47 
49  DtReaderWriterRegistry* parentRegistry = NULL);
50 
52  DtReaderWriterRegistry* parentRegistry = NULL);
54 
59 
61 
62  virtual DtSensorContactInfoList* clone(const DtString& name, DtReaderWriterRegistry* parentRegistry = NULL);
63  virtual DtSensorContactInfoList* clone(const DtSymbolString& name, DtReaderWriterRegistry* parentRegistry = NULL);
65 
67  virtual void clear();
68 
70  virtual void removeAndDelete(DtRwSensorContactInfo* contactInfo);
71 
75  virtual DtRwSensorContactInfo* findContactInfoByContact(const DtUUID& contact);
76 
79  virtual std::set<DtUUID> contacts() const;
80 
89  virtual DtRwSensorContactInfo* createSensorContactInfo();
90 
95 
96  virtual void addModifiedCallback(DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void* usr);
97  virtual void removeModifiedCallback(DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void* usr);
99 
102  virtual void listModified();
103 
104  bool operator==(const DtSensorContactInfoList&) const;
105 
107  static const char* theXmlType();
108 
109  virtual const char* xmlType() const
110  {
111  return theXmlType();
112  }
113 
114 protected:
115 
117  void copyList(const DtSensorContactInfoList& orig);
118 
121  void emptyList();
122 
125  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
126  const DtVariableBindingsList& variableBindings);
127 
131  virtual const char* readerWriterType() const;
132 
134 
135 protected:
136 
137 };
138 
144 {
145 private:
147 
152 public:
155 
158  bool listChanged() const;
159 
162  void markUnchanged();
163 
166  bool checkAndResetListChanged();
167 
168 protected:
169  static void listChangedCallback(void* usr);
170  void processListChanged();
171 
174 };
175 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
Definition: symbolString.h:20
A Readable, Writable version of DtList.
Definition: rwList.h:26
void(* DtCallbackFunctionType)(void *)
The function signature of the callback function.
Definition: noArgumentCallbackList.h:156
DtSensorContactInfoList & myContactInfoList
Definition: sensorContactInfoList.h:172
virtual const char * xmlType() const
Definition: sensorContactInfoList.h:109
virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)=0
This method must be overridden by a subclass.
static const char * theXmlType()
The type that is used when archiving to an XML stream.
Definition: readerWriterRegistry.h:39
This class represents the data gathered by a sensor about a particular single sensor contact...
Definition: rwSensorContactInfo.h:67
A reader-writer list of DtRwSensorContactInfo elements.
Definition: sensorContactInfoList.h:30
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
This class works just as DtCalllbackTable, but manages callbacks that have no arguments, and therefore don&#39;t fit in the template defined by DtCallbackList.
Definition: noArgumentCallbackList.h:152
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
bool operator==(const DtRwList &rhs) const
Iterates over all items and calls the factory to compare.
This class is for monitoring a DtSensorContactInfoList for changes.
Definition: sensorContactInfoList.h:143
bool myListChanged
Definition: sensorContactInfoList.h:173
DtNoArgumentCallbackList myModifiedCallbackList
Definition: sensorContactInfoList.h:133
const DtRwList & operator=(const DtRwList &orig)
Calls down to DtReaderWriter::operator=(). List elements are not copied.
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)