OpenDaVINCI  4.16.0
TimeTriggeredConferenceClientModule.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_BASE_TIMETRIGGEREDCONFERENCECLIENTMODULE_H_
21 #define OPENDAVINCI_BASE_TIMETRIGGEREDCONFERENCECLIENTMODULE_H_
22 
23 #include <map>
24 #include <string>
25 #include <vector>
26 
28 #include <memory>
35 #include "opendavinci/generated/odcore/data/dmcp/ModuleExitCodeMessage.h"
36 
37 namespace odcore { namespace base { class AbstractDataStore; } }
38 
39 namespace odcore {
40  namespace base {
41  namespace module {
42 
43  using namespace std;
44 
97  private:
104 
111 
112  public:
122  TimeTriggeredConferenceClientModule(const int32_t &argc, char **argv, const string &name) throw (odcore::exceptions::InvalidArgumentException,
123  odcore::exceptions::NoDatabaseAvailableException);
124 
126 
127  protected:
128  virtual void setUp() = 0;
129 
130  virtual void tearDown() = 0;
131 
132  virtual odcore::data::dmcp::ModuleExitCodeMessage::ModuleExitCode body() = 0;
133 
134  virtual void nextContainer(odcore::data::Container &c);
135 
136  virtual void addDataStoreFor(odcore::base::AbstractDataStore &dataStore);
137 
138  virtual void addDataStoreFor(const int32_t &datatype, odcore::base::AbstractDataStore &dataStore);
139 
140  virtual odcore::base::KeyValueDataStore& getKeyValueDataStore();
141 
142  private:
143  // Distribute input data using thread-safe data stores.
144  odcore::base::Mutex m_dataStoresMutex;
145  vector<odcore::base::AbstractDataStore*> m_listOfDataStores;
146  map<int32_t, vector<odcore::base::AbstractDataStore*> > m_mapOfListOfDataStores;
147 
148  // Store all received data using Container::DATATYPE as key.
149  std::shared_ptr<odcore::base::KeyValueDataStore> m_keyValueDataStore;
150  };
151 
152  }
153  }
154 } // odcore::base::module
155 
156 #endif /*OPENDAVINCI_BASE_TIMETRIGGEREDCONFERENCECLIENTMODULE_H_*/
Definition: base/Mutex.h:49
Definition: KeyValueDataStore.h:46
Definition: Container.h:40
Definition: TimeTriggeredConferenceClientModule.h:96
Definition: AbstractConferenceClientModule.h:50
#define OPENDAVINCI_API
Definition: opendavinci.h:67
Definition: AbstractDataStore.h:34
Definition: DataStoreManager.h:36