This commit is contained in:
Jesse Beder 2008-06-25 22:45:08 +00:00
parent bb55b0ba91
commit 110a7f06a8
6 changed files with 93 additions and 0 deletions

29
document.cpp Normal file
View file

@ -0,0 +1,29 @@
#include "document.h"
#include "node.h"
namespace YAML
{
Document::Document(): m_pRoot(0)
{
}
Document::Document(const std::string& fileName): m_pRoot(0)
{
Load(fileName);
}
Document::~Document()
{
Clear();
}
void Document::Clear()
{
delete m_pRoot;
m_pRoot = 0;
}
void Document::Load(const std::string& fileName)
{
}
}

22
document.h Normal file
View file

@ -0,0 +1,22 @@
#pragma once
#include <string>
namespace YAML
{
class Node;
class Document
{
public:
Document();
Document(const std::string& fileName);
~Document();
void Clear();
void Load(const std::string& fileName);
private:
Node *m_pRoot;
};
}

8
main.cpp Normal file
View file

@ -0,0 +1,8 @@
#include "document.h"
int main()
{
YAML::Document doc("test.yaml");
return 0;
}

12
node.cpp Normal file
View file

@ -0,0 +1,12 @@
#include "node.h"
namespace YAML
{
Node::Node()
{
}
Node::~Node()
{
}
}

20
node.h Normal file
View file

@ -0,0 +1,20 @@
#pragma once
#include <string>
namespace YAML
{
const std::string Str = "!!str";
const std::string Seq = "!!seq";
const std::string Map = "!!map";
class Node
{
public:
Node();
~Node();
private:
std::string m_tag;
};
}

2
test.yaml Normal file
View file

@ -0,0 +1,2 @@
---
test