17 template <
typename Publisher>
39 typename std::map<std::string, Publisher*>::iterator iter=
myPublishers.begin();
47 void add(Publisher* pub)
50 typename std::list<DtPublisherListDelegate*>::iterator iter=
myAddedDelegates.begin();
57 void add(Publisher* pub,
const std::string&
id)
60 typename std::list<DtPublisherListDelegate*>::iterator iter =
myAddedDelegates.begin();
68 void remove(Publisher* pub)
71 typename std::list<DtPublisherListDelegate*>::iterator iter=
myRemovedDelegates.begin();
80 void remove(
const std::string& id)
84 typename std::list<DtPublisherListDelegate*>::iterator iter =
myRemovedDelegates.begin();
93 Publisher*
find(std::string
id)
95 Publisher* result = NULL;
96 typename std::map<std::string, Publisher*>::iterator pubIter;
130 typename std::map< std::string, Publisher* >::iterator
begin()
136 typename std::map< std::string, Publisher*>::iterator
end()
144 typename std::map<std::string, Publisher*>::iterator iter=
myPublishers.begin();
147 delete (iter->second);
151 typename std::list<DtPublisherListDelegate*>::iterator iter2=
myAddedDelegates.begin();
158 typename std::list<DtPublisherListDelegate*>::iterator iter3=
myRemovedDelegates.begin();
std::map< std::string, Publisher * >::iterator end()
Get the end of the list for iteration.
Definition: publisherList.h:136
std::list< DtPublisherListDelegate * > myAddedDelegates
Definition: publisherList.h:168
std::map< std::string, Publisher * >::iterator begin()
Get the beginning of the list for iteration.
Definition: publisherList.h:130
Defines a single parameter delegate to make binding member function pointers easier.
void removePublisherRemovedDelegate(DtPublisherListDelegate *del)
remove a callback for when a publisher is removed from the list
Definition: publisherList.h:124
void removePublisherAddedDelegate(DtPublisherListDelegate *del)
remove a callback for when a publisher is added to the list
Definition: publisherList.h:112
void tick()
Ticks all of the publishers.
Definition: publisherList.h:37
void add(Publisher *pub)
add a publisher to the list
Definition: publisherList.h:47
std::map< std::string, Publisher * > myPublishers
Definition: publisherList.h:167
~DtPublisherList()
destructor
Definition: publisherList.h:31
DtPublisherList()
constructor
Definition: publisherList.h:25
DtDelegate< void, Publisher * > DtPublisherListDelegate
Defines a delegate that has a Publisher object pointer as a parameter and returns a void type...
Definition: publisherList.h:22
Publisher * find(std::string id)
find a particular object publisher in the list
Definition: publisherList.h:93
Defines the DtPublisherList template. The parameter is the VR-Link Publisher object class type...
Definition: publisherList.h:18
void addPublisherRemovedDelegate(DtPublisherListDelegate *del)
add a callback for when a publisher is removed from the list
Definition: publisherList.h:118
void addPublisherAddedDelegate(DtPublisherListDelegate *del)
add a callback for when a publisher is added to the list
Definition: publisherList.h:106
void add(Publisher *pub, const std::string &id)
add a publisher to the list with a specific identifier
Definition: publisherList.h:57
Delegate template for binding static or member functions for callback at later time The return type a...
Definition: delegate.h:69
void clear()
Clears the list and all delegates. This will release the memory used by the delegates or object publi...
Definition: publisherList.h:142
std::list< DtPublisherListDelegate * > myRemovedDelegates
Definition: publisherList.h:169