Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olivier Stasse
sot-core
Commits
7da5e9df
Commit
7da5e9df
authored
14 years ago
by
Francois Keith
Browse files
Options
Downloads
Patches
Plain Diff
Split the declaration and the imnplementation in mailbox
parent
b632e01d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/sot-core/mailbox.hxx
+2
-12
2 additions, 12 deletions
include/sot-core/mailbox.hxx
include/sot-core/mailbox.t.cpp
+18
-0
18 additions, 0 deletions
include/sot-core/mailbox.t.cpp
with
20 additions
and
12 deletions
include/sot-core/mailbox.hxx
+
2
−
12
View file @
7da5e9df
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
include/sot-core/mailbox.t.cpp
+
18
−
0
View file @
7da5e9df
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment