00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00033 #ifndef OSC_HIERARCHICAL_NAMESPACE_H
00034 #define OSC_HIERARCHICAL_NAMESPACE_H
00035
00036 #include <map>
00037 #include <string>
00038 #include "OSCNamespace.h"
00039 #include "OSCNamespaceItem.h"
00040 #include "OSCCallable.h"
00041 #include "Transmit.h"
00042
00043 class OSCHierarchicalNamespace : public OSCNamespace
00044 {
00045 protected:
00046 typedef std::map < std::string, OSCCallable*, std::less<std::string> > CallableMap;
00047
00048 private:
00049
00050 OSCNamespaceItem* myRoot;
00051
00052 protected:
00053 void setRoot(OSCNamespaceItem *root) { this->myRoot = root; }
00054 OSCNamespaceItem *getRoot() { return this->myRoot; }
00055
00056 public:
00057 OSCHierarchicalNamespace();
00058 virtual ~OSCHierarchicalNamespace();
00059
00060 virtual bool add(const std::string &address, OSCCallable *thingamabob);
00061 virtual bool remove(const std::string& address);
00062
00064 virtual OSCCallable* find(const std::string& address);
00065
00067 virtual bool dispatch(const std::string &address, const std::string& data, Transmit *const reply);
00068
00071 virtual std::vector<std::string> list(const std::string& basename);
00072 };
00073
00074 #endif