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
b9d92535
Commit
b9d92535
authored
Feb 02, 2012
by
Davis King
Browse files
Added an is_config_reader template.
parent
1afa8aca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
dlib/config_reader.h
dlib/config_reader.h
+5
-0
dlib/is_kind.h
dlib/is_kind.h
+13
-0
No files found.
dlib/config_reader.h
View file @
b9d92535
...
...
@@ -8,6 +8,7 @@
#include "tokenizer.h"
#include "algs.h"
#include "is_kind.h"
namespace
dlib
...
...
@@ -19,11 +20,15 @@ namespace dlib
tokenizer
::
kernel_1a
>
config_reader
;
template
<
>
struct
is_config_reader
<
config_reader
>
{
const
static
bool
value
=
true
;
};
#ifndef DLIB_ISO_CPP_ONLY
typedef
config_reader_thread_safe_1
<
config_reader
,
map
<
std
::
string
,
void
*>::
kernel_1b
>
config_reader_thread_safe
;
template
<
>
struct
is_config_reader
<
config_reader_thread_safe
>
{
const
static
bool
value
=
true
;
};
#endif // DLIB_ISO_CPP_ONLY
...
...
dlib/is_kind.h
View file @
b9d92535
...
...
@@ -111,6 +111,19 @@ namespace dlib
!*/
};
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
struct
is_config_reader
:
public
default_is_kind_value
{
/*!
- if (T is an implementation of config_reader/config_reader_kernel_abstract.h) then
- is_config_reader<T>::value == true
- else
- is_config_reader<T>::value == false
!*/
};
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// Implementation details
...
...
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