VR-Forces 5.0.2 Developer's Guide
 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 
33 {
34 
35 public:
36 
39 
41  DtSensorContactInfoList(const DtString& name, DtReaderWriterRegistry* parentRegistry = NULL);
42  DtSensorContactInfoList(const DtSymbolString& name, DtReaderWriterRegistry* parentRegistry = NULL);
43 
45  virtual ~DtSensorContactInfoList();
46 
49 
51  DtReaderWriterRegistry* parentRegistry = NULL);
52 
54  DtReaderWriterRegistry* parentRegistry = NULL);
56 
61 
63 
64  virtual DtSensorContactInfoList* clone(const DtString& name, DtReaderWriterRegistry* parentRegistry = NULL) const;
65  virtual DtSensorContactInfoList* clone(const DtSymbolString& name, DtReaderWriterRegistry* parentRegistry = NULL) const;
67 
69  virtual void clear();
70 
72  virtual void removeAndDelete(DtRwSensorContactInfo* contactInfo);
73 
77  virtual DtRwSensorContactInfo* findContactInfoByContact(const DtUUID& contact) const;
78 
81  virtual std::set<DtUUID> contacts() const;
82 
91  virtual DtRwSensorContactInfo* createSensorContactInfo();
92 
97 
98  virtual void addModifiedCallback(DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void* usr);
99  virtual void removeModifiedCallback(DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void* usr);
101 
104  virtual void listModified();
105 
106  bool operator==(const DtSensorContactInfoList&) const;
107 
109  static const char* theXmlType();
110 
111  virtual const char* xmlType() const
112  {
113  return theXmlType();
114  }
115 
116 protected:
117 
119  void copyList(const DtSensorContactInfoList& orig);
120 
123  void emptyList();
124 
127  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
128  const DtVariableBindingsList& variableBindings);
129 
133  virtual const char* readerWriterType() const;
134 
136 
137 protected:
138 
139 };
140 
146 {
147 private:
149 
154 public:
157 
160  bool listChanged() const;
161 
164  void markUnchanged();
165 
168  bool checkAndResetListChanged();
169 
170 protected:
171  static void listChangedCallback(void* usr);
172  void processListChanged();
173 
176 };
177 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
Definition: symbolString.h:20
A Readable, Writable version of DtList. This class cannot be used directly, but must be inherited to ...
Definition: rwList.h:26
void(* DtCallbackFunctionType)(void *)
The function signature of the callback function.
Definition: noArgumentCallbackList.h:156
DtSensorContactInfoList & myContactInfoList
Definition: sensorContactInfoList.h:174
virtual const char * xmlType() const
Routines to archive/dearchive from an XML Environment.
Definition: sensorContactInfoList.h:111
virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)=0
This method must be overridden by a subclass. Within this method, new instances of the DtReaderWriter...
static const char * theXmlType()
The type that is used when archiving to an XML stream.
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
This class represents the data gathered by a sensor about a particular single sensor contact...
Definition: rwSensorContactInfo.h:68
A reader-writer list of DtRwSensorContactInfo elements. Use the DtRwList::add() and remove() methods ...
Definition: sensorContactInfoList.h:32
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. When instantiated, this class registers a callback with the list, and maintains internal state as to whether the callback has been invoked since the last time listChanged() was called.
Definition: sensorContactInfoList.h:145
bool myListChanged
Definition: sensorContactInfoList.h:175
DtNoArgumentCallbackList myModifiedCallbackList
Definition: sensorContactInfoList.h:135
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. This can be used in place of dynamic-ca...

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)