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
2e67aa54
Commit
2e67aa54
authored
Nov 18, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turned the xml_parser into a single implementation component.
parent
f9e63c9d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
108 deletions
+0
-108
xml_parser.h
dlib/xml_parser.h
+0
-44
xml_parser_kernel_1.h
dlib/xml_parser/xml_parser_kernel_1.h
+0
-0
xml_parser_kernel_c.h
dlib/xml_parser/xml_parser_kernel_c.h
+0
-64
No files found.
dlib/xml_parser.h
View file @
2e67aa54
...
@@ -7,51 +7,7 @@
...
@@ -7,51 +7,7 @@
#include "xml_parser/xml_parser_kernel_interfaces.h"
#include "xml_parser/xml_parser_kernel_interfaces.h"
#include "xml_parser/xml_parser_kernel_1.h"
#include "xml_parser/xml_parser_kernel_1.h"
#include "xml_parser/xml_parser_kernel_c.h"
#include "map.h"
#include "stack.h"
#include "sequence.h"
#include "memory_manager.h"
namespace
dlib
{
class
xml_parser
{
typedef
map
<
std
::
string
,
std
::
string
,
memory_manager
<
char
>::
kernel_2a
>::
kernel_1b
map1a
;
typedef
map
<
std
::
string
,
std
::
string
,
memory_manager
<
char
>::
kernel_2a
>::
kernel_1b_c
map1a_c
;
typedef
stack
<
std
::
string
,
memory_manager
<
char
>::
kernel_2a
>::
kernel_1a
stack1a
;
typedef
sequence
<
document_handler
*>::
kernel_2a
seq_dh2a
;
typedef
sequence
<
error_handler
*>::
kernel_2a
seq_eh2a
;
// A version that uses the checked map. This way there is checking on the attribute
// list that gets passed back to the user.
typedef
xml_parser_kernel_1
<
map1a_c
,
stack1a
,
seq_dh2a
,
seq_eh2a
>
kernel_1a_c_impl
;
xml_parser
()
{}
public
:
//----------- kernels ---------------
// kernel_1a
typedef
xml_parser_kernel_1
<
map1a
,
stack1a
,
seq_dh2a
,
seq_eh2a
>
kernel_1a
;
typedef
xml_parser_kernel_c
<
kernel_1a_c_impl
>
kernel_1a_c
;
};
}
#endif // DLIB_XML_PARSEr_
#endif // DLIB_XML_PARSEr_
dlib/xml_parser/xml_parser_kernel_1.h
View file @
2e67aa54
This diff is collapsed.
Click to expand it.
dlib/xml_parser/xml_parser_kernel_c.h
deleted
100644 → 0
View file @
f9e63c9d
// Copyright (C) 2003 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifndef DLIB_XML_PARSER_KERNEL_C_
#define DLIB_XML_PARSER_KERNEL_C_
#include "xml_parser_kernel_abstract.h"
#include <string>
#include <iostream>
#include "../algs.h"
#include "../assert.h"
namespace
dlib
{
template
<
typename
xml_parser_base
>
class
xml_parser_kernel_c
:
public
xml_parser_base
{
public
:
void
parse
(
std
::
istream
&
in
);
};
template
<
typename
xml_parser_base
>
inline
void
swap
(
xml_parser_kernel_c
<
xml_parser_base
>&
a
,
xml_parser_kernel_c
<
xml_parser_base
>&
b
)
{
a
.
swap
(
b
);
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// member function definitions
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
typename
xml_parser_base
>
void
xml_parser_kernel_c
<
xml_parser_base
>::
parse
(
std
::
istream
&
in
)
{
DLIB_CASSERT
(
in
.
fail
()
==
false
,
"
\t
void xml_parser::parse"
<<
"
\n\t
the input stream must not be in the fail state"
<<
"
\n\t
this: "
<<
this
);
return
xml_parser_base
::
parse
(
in
);
}
// ----------------------------------------------------------------------------------------
}
#endif // DLIB_XML_PARSER_KERNEL_C_
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