10 #ifndef __SOT_MAILBOX_T_CPP 11 #define __SOT_MAILBOX_T_CPP 23 template <
class Object>
25 : Entity(name), mainObjectMutex(), mainObject(), update(false)
28 SOUT(boost::bind(&
Mailbox::get, this, _1, _2), sotNOSIGNAL,
29 "Mailbox(" + name +
")::output(Object)::sout"),
30 objSOUT(boost::bind(&
Mailbox::getObject, this, _1, _2), SOUT,
31 "Mailbox(" + name +
")::output(Object)::object"),
32 timeSOUT(boost::bind(&
Mailbox::getTimestamp, this, _1, _2), SOUT,
33 "Mailbox(" + name +
")::output(Object)::timestamp") {
35 SOUT.setDependencyType(TimeDependency<int>::BOOL_DEPENDENT);
48 if (lockMain.owns_lock()) {
56 template <
class Object>
62 if (lockMain.owns_lock()) {
84 template <
class Object>
91 template <
class Object>
103 #define MAILBOX_TEMPLATE_SPE(S) \ 104 namespace dynamicgraph { \ 106 template void Mailbox<S>::post(const S &obj); \ 107 template dynamicgraph::Vector &Mailbox<S>::getObject(S &res, \ 109 template bool Mailbox<S>::hasBeenUpdated(void); \ 110 template Mailbox<S>::~Mailbox(); \ 111 template Mailbox<S>::sotTimestampedObject & \ 112 Mailbox<S>::get(Mailbox<S>::sotTimestampedObject &res, const int &dummy); \ 113 template Mailbox<S>::Mailbox(const std::string &name); \ 115 } // namespace sot namespace dynamicgraph 118 #endif // #ifdef __SOT_MAILBOX_T_CPP dg::SignalTimeDependent< struct sotTimestampedObject, int > SOUT
Definition: mailbox.hh:66
dg::SignalTimeDependent< struct timeval, int > timeSOUT
Definition: mailbox.hh:68
Mailbox(const std::string &name)
Definition: mailbox.hxx:24
Object obj
Definition: mailbox.hh:43
Definition: mailbox.hh:42
boost::timed_mutex mainObjectMutex
Definition: mailbox.hh:60
bool update
Definition: mailbox.hh:63
void post(const Object &obj)
Definition: mailbox.hxx:74
~Mailbox(void)
Definition: mailbox.hxx:38
sotTimestampedObject & get(sotTimestampedObject &res, const int &dummy)
Definition: mailbox.hxx:58
struct timeval timestamp
Definition: mailbox.hh:44
Definition: mailbox.hh:36
struct timeval & getTimestamp(struct timeval &res, const int &time)
Definition: mailbox.hxx:92
bool hasBeenUpdated(void)
Definition: mailbox.hxx:45
struct timeval mainTimeStamp
Definition: mailbox.hh:62
Object mainObject
Definition: mailbox.hh:61
dg::SignalTimeDependent< Object, int > objSOUT
Definition: mailbox.hh:67
Definition: abstract-sot-external-interface.hh:17
Object & getObject(Object &res, const int &time)
Definition: mailbox.hxx:85