Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
68658f88
Commit
68658f88
authored
Nov 18, 2012
by
Davis King
Browse files
Added another constructor to the linker that lets you link two connections
right away.
parent
c016de42
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
2 deletions
+36
-2
dlib/linker/linker_kernel_1.cpp
dlib/linker/linker_kernel_1.cpp
+16
-0
dlib/linker/linker_kernel_1.h
dlib/linker/linker_kernel_1.h
+5
-1
dlib/linker/linker_kernel_abstract.h
dlib/linker/linker_kernel_abstract.h
+15
-1
No files found.
dlib/linker/linker_kernel_1.cpp
View file @
68658f88
...
...
@@ -24,6 +24,22 @@ namespace dlib
{
}
// ----------------------------------------------------------------------------------------
linker
::
linker
(
connection
&
a
,
connection
&
b
)
:
running
(
false
),
running_signaler
(
running_mutex
),
A
(
0
),
B
(
0
),
service_connection_running_signaler
(
service_connection_running_mutex
)
{
link
(
a
,
b
);
}
// ----------------------------------------------------------------------------------------
linker
::
...
...
dlib/linker/linker_kernel_1.h
View file @
68658f88
...
...
@@ -70,10 +70,14 @@ namespace dlib
typedef
linker
kernel_1a
;
typedef
linker
kernel_1a_c
;
linker
(
);
linker
(
connection
&
a
,
connection
&
b
);
virtual
~
linker
(
);
...
...
dlib/linker/linker_kernel_abstract.h
View file @
68658f88
...
...
@@ -36,7 +36,6 @@ namespace dlib
public:
linker
(
);
/*!
...
...
@@ -47,6 +46,21 @@ namespace dlib
- dlib::thread_error
!*/
linker
(
connection
&
a
,
connection
&
b
);
/*!
ensures
- #*this is properly initialized
- immediately invokes link(a,b);
(i.e. using this constructor is the same as creating a linker with
the default constructor and then immediately invoking link() on it)
throws
- std::bad_alloc
- dlib::thread_error
!*/
virtual
~
linker
(
);
/*!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment