Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
68658f88
Commit
68658f88
authored
Nov 18, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added another constructor to the linker that lets you link two connections
right away.
parent
c016de42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
2 deletions
+36
-2
linker_kernel_1.cpp
dlib/linker/linker_kernel_1.cpp
+16
-0
linker_kernel_1.h
dlib/linker/linker_kernel_1.h
+5
-1
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