Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

yaml Class Reference

You have stumbled upon a yaml parser, do you want to run or fight. More...

#include <yaml.h>

List of all members.

Public Member Functions

 yaml ()
 construct a yaml object
 ~yaml ()
 destroy
yamlnodegetroot ()
 return the root node
bool readfile (const std::string &fname)
 read/parse a text file
void writenode (std::ostream &os, yamlnode *item, int depth=-1)
 write a yamlnode
int trim (std::string *str, bool frontonly=false)
 trim a string
void tokenize (const std::string &str, std::vector< std::string > &tokens, const std::string &delim)
 tokenize a string

Public Attributes

std::string m_eol
 eol


Detailed Description

You have stumbled upon a yaml parser, do you want to run or fight.


Constructor & Destructor Documentation

yaml::yaml  ) 
 

construct a yaml object

yaml::~yaml  ) 
 

destroy


Member Function Documentation

yamlnode* yaml::getroot  )  [inline]
 

return the root node

bool yaml::readfile const std::string &  fname  ) 
 

read/parse a text file

void yaml::tokenize const std::string &  str,
std::vector< std::string > &  tokens,
const std::string &  delim
 

tokenize a string

Parameters:
str the string to tokenize
tokens the vector to fill
delim the delimiter to cut on

int yaml::trim std::string *  str,
bool  frontonly = false
 

trim a string

This also removes comments in the string.

Parameters:
str line a pointer to a string
frontonly only trim the front of the string if true
Returns:
the number of spaces taken off the front

void yaml::writenode std::ostream &  os,
yamlnode item,
int  depth = -1
 

write a yamlnode


Member Data Documentation

std::string yaml::m_eol
 

eol


The documentation for this class was generated from the following files:
Generated on Fri Mar 10 12:32:03 2006 for MonkeyFish by  doxygen 1.4.4