freedaisy::NCC Class Reference

NCC document class. More...

#include <ncc.h>

Inheritance diagram for freedaisy::NCC:

[legend]
List of all members.

Public Member Functions

 NCC ()
 Create an empty NCC object.
 NCC (std::string filename)
 Create an NCC object from an XML file.
void createDoc (std::string title="Default title", std::string lang="en")
 Create the NCC document.
std::string getTitle ()
 Get the document title.
void setTitle (std::string newtitle)
 Set the document title.
void setLang (std::string lang)
 Set the document language.
std::string getLang ()
 Get the document language.
std::vector< MetagetMeta (std::string name)
 Get a meta (like dc or ncc).
void addMeta (Meta *m)
 Add a meta.
XMLNode getPage (std::string number)
 Get a page.
XMLNode getBody ()
 Get body node.
std::vector< XMLNodegetHeadings ()
 Get headings (h1 to h6).

Detailed Description

NCC document class.

Definition at line 12 of file ncc.h.


Constructor & Destructor Documentation

freedaisy::NCC::NCC std::string  filename  )  [inline]
 

Create an NCC object from an XML file.

Parameters:
filename XML filename to parse

Definition at line 20 of file ncc.h.


Member Function Documentation

void freedaisy::NCC::createDoc std::string  title = "Default title",
std::string  lang = "en"
 

Create the NCC document.

Parameters:
title Title of the document (optional)
lang Language of the document (optional)

Definition at line 12 of file ncc.cpp.

References freedaisy::XMLDoc::_createDoc(), freedaisy::XMLNode::addChild(), freedaisy::XMLDoc::createRootNode(), freedaisy::XMLNode::setAttr(), freedaisy::XMLNode::setContent(), and setLang().

std::string freedaisy::NCC::getLang  ) 
 

Get the document language.

Code shared with Discinfo

Definition at line 60 of file ncc.cpp.

References freedaisy::XMLNode::hasAttr(), and freedaisy::XMLDoc::xpathEval().

std::vector< Meta > freedaisy::NCC::getMeta std::string  name  ) 
 

Get a meta (like dc or ncc).

Parameters:
name Name of the meta

Definition at line 71 of file ncc.cpp.

References freedaisy::XMLDoc::xpathEval().

XMLNode freedaisy::NCC::getPage std::string  number  ) 
 

Get a page.

Parameters:
number Page number

Definition at line 109 of file ncc.cpp.

References freedaisy::XMLDoc::xpathEval().

void freedaisy::NCC::setLang std::string  lang  ) 
 

Set the document language.

Parameters:
lang New document language
Code shared with Discinfo

Definition at line 52 of file ncc.cpp.

References freedaisy::XMLNode::setAttr(), and freedaisy::XMLDoc::xpathEval().

Referenced by createDoc().

void freedaisy::NCC::setTitle std::string  newtitle  ) 
 

Set the document title.

Parameters:
newtitle New document title

Definition at line 46 of file ncc.cpp.

References freedaisy::XMLNode::setContent(), and freedaisy::XMLDoc::xpathEval().


The documentation for this class was generated from the following files:
Generated on Sun Jun 25 23:35:45 2006 for libdaisy by  doxygen 1.4.6