Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
Overview
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
lvzhengyang
yaml-cpp
Commits
80cf3c98
Commit
80cf3c98
authored
Sep 10, 2011
by
Jesse Beder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed minor things that used the old API, compiles/links/runs\!
parent
f7b22472
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletions
+12
-1
include/yaml-cpp/null.h
+2
-0
src/null.cpp
+5
-0
test/new-api/parsertests.cpp
+1
-0
util/parse.cpp
+4
-1
No files found.
include/yaml-cpp/null.h
View file @
80cf3c98
...
...
@@ -16,7 +16,9 @@ namespace YAML
inline
bool
operator
==
(
const
_Null
&
,
const
_Null
&
)
{
return
true
;
}
inline
bool
operator
!=
(
const
_Null
&
,
const
_Null
&
)
{
return
false
;
}
#if YAML_CPP_OLD_API
YAML_CPP_API
bool
IsNull
(
const
Node
&
node
);
#endif
extern
YAML_CPP_API
_Null
Null
;
}
...
...
src/null.cpp
View file @
80cf3c98
#include "yaml-cpp/null.h"
#if YAML_CPP_OLD_API
#include "yaml-cpp/node.h"
#endif
namespace
YAML
{
_Null
Null
;
#if YAML_CPP_OLD_API
bool
IsNull
(
const
Node
&
node
)
{
return
node
.
Read
(
Null
);
}
#endif
}
test/new-api/parsertests.cpp
View file @
80cf3c98
...
...
@@ -3,5 +3,6 @@
namespace
Test
{
bool
RunParserTests
()
{
return
true
;
}
}
util/parse.cpp
View file @
80cf3c98
...
...
@@ -37,14 +37,17 @@ public:
void
parse
(
std
::
istream
&
input
)
{
try
{
#if YAML_CPP_OLD_API
YAML
::
Parser
parser
(
input
);
YAML
::
Node
doc
;
NullEventHandler
handler
;
while
(
parser
.
GetNextDocument
(
doc
))
{
YAML
::
Emitter
emitter
;
emitter
<<
doc
;
std
::
cout
<<
emitter
.
c_str
()
<<
"
\n
"
;
}
#else
// TODO: Parse with new API
#endif
}
catch
(
const
YAML
::
Exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
"
\n
"
;
}
...
...
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