Skip to content
Snippets Groups Projects
Commit 7da5e9df authored by Francois Keith's avatar Francois Keith
Browse files

Split the declaration and the imnplementation in mailbox

parent b632e01d
No related branches found
No related tags found
No related merge requests found
......@@ -71,18 +71,8 @@ public:
void post( const Object& obj );
sotTimestampedObject& get( sotTimestampedObject& res,const int& dummy );
Object& getObject( Object& res,const int& time )
{
const sotTimestampedObject & data = SOUT(time);
res = data.obj; return res;
}
struct timeval& getTimestamp( struct timeval& res,const int& time )
{
const sotTimestampedObject & data = SOUT(time);
res.tv_sec = data.timestamp.tv_sec ;
res.tv_usec = data.timestamp.tv_usec ;
return res;
}
Object& getObject( Object& res,const int& time );
struct timeval& getTimestamp( struct timeval& res,const int& time );
bool hasBeenUpdated( void );
......
......@@ -123,6 +123,24 @@ post( const Object& value )
return;
}
template< class Object >
Object& Mailbox<Object>::
getObject( Object& res,const int& time )
{
const sotTimestampedObject & data = SOUT(time);
res = data.obj; return res;
}
template< class Object >
timeval& Mailbox<Object>::
getTimestamp( struct timeval& res,const int& time )
{
const sotTimestampedObject & data = SOUT(time);
res.tv_sec = data.timestamp.tv_sec ;
res.tv_usec = data.timestamp.tv_usec ;
return res;
}
}
#endif // #ifdef HAVE_LIBBOOST_THREAD
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment