Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

libsvx::Document Class Reference

The high level class containing SVX informations. More...

#include <document.h>

List of all members.

Public Methods

 Document ()
 not sure we should allow direct access to the constructor (protected instead of public).

 ~Document ()
 destructor, free all the sub-informations.

bool Parse (const std::string &the_SVX_buffer, const bool AllowURLRetrieval)
 Transform the content of a SVX buffer into a hierarchy of classes. More...

bool ParseAdd (const std::string &the_SVX_buffer, const bool AllowURLRetrieval)
 Transform the content of a SVX buffer into a hierarchy of classes and merge it with the current hierarchy. More...

bool ParseBack (::TiXmlDocument &m_XML_Document)
 Create an XML buffer from the data in memory. More...

bool LoadFile (const std::string &the_filename, const bool AllowURLRetrieval)
 Load the specified File and parse it. More...

bool AddFile (const std::string &the_filename, const bool AllowURLRetrieval)
 Add the content of the specified File and parse it.

bool LoadURL (const std::string &the_filename, const bool AllowURLRetrieval)
 Load the specified URL data and parse it. More...

bool SaveFile (const std::string &the_filename)
 Save the XML data in memory into the specified file.

void UpdateProduct (const std::string &the_product_name, const bool AllowDependencyRetrieval)
 Retrieve the updated information. More...

ProductFindProduct (const std::string &the_product_uid) const
 Find the specified Product in the Document.

void Iterate_Product_Begin ()
 Put the Document internal iterator on the first document.

bool Iterate_Product_IsEnd ()
 Specify wether there is still a Product available in the list.

const std::string & Iterate_Product_Next ()
 Return the UID of the next Product in line.

const std::string & Iterate_Product_Prev ()
 Return the UID of the previous Product in line.

bool IsOldProductVersion (const std::string &the_product_uid, const std::string &the_version_to_check) const
 Check if the version is older than the current possible version of the specified Product.

const VersionGetLatestProductVersion (const std::string &the_product_uid)
 Retrieve the name of the latest version for a specified product.

const VersionFindVersion (const std::string &the_product_uid, const std::string &the_version_name) const
 Find the specified Version in the Document.

void Iterate_Version_Begin (const std::string &the_product_uid)
 Put the Document internal iterator on the first document.

bool Iterate_Version_IsBegin (const std::string &the_product_uid)
 Specify wether there is still a Version available in the list.

bool Iterate_Version_IsEnd (const std::string &the_product_uid)
 Specify wether there is still a Version available in the list.

const std::string & Iterate_Version_Next (const std::string &the_product_uid)
 Return the UID of the next Version in line.

const std::string & Iterate_Version_Prev (const std::string &the_product_uid)
 Return the UID of the previous Version in line.


Protected Attributes

Svxm_SvxInfo
 the SVX class hierarchy in memory.

MNetworkm_Network
 the Network information when required.


Detailed Description

The high level class containing SVX informations.

Definition at line 63 of file document.h.


Member Function Documentation

bool Document::LoadFile const std::string &    filename,
const bool    bAllowURLRetrieval
 

Load the specified File and parse it.

Warning:
you must have the MNetwork class configured with proxy settings if you want to use the URL Retrieval
Remarks:
if there was some data in memory they are lost

Definition at line 157 of file document.cxx.

References Parse().

bool Document::LoadURL const std::string &    Url,
const bool    bAllowURLRetrieval
 

Load the specified URL data and parse it.

Warning:
you must have the MNetwork class configured with proxy settings if you want to use the URL Retrieval
Remarks:
if there was some data in memory they are lost
only HTTP and FTP are supported for the moment

Definition at line 216 of file document.cxx.

bool Document::Parse const std::string &    SVX_buffer,
const bool    bAllowURLRetrieval
 

Transform the content of a SVX buffer into a hierarchy of classes.

Once this operation is done, you can save and retrieve any information from the SVX file. All the meta data are transformed into a hierarchy of classes.

Warning:
you must have the MNetwork class configured with proxy settings if you want to use the URL Retrieval

Definition at line 91 of file document.cxx.

References m_SvxInfo.

Referenced by LoadFile().

bool Document::ParseAdd const std::string &    SVX_buffer,
const bool    bAllowURLRetrieval
 

Transform the content of a SVX buffer into a hierarchy of classes and merge it with the current hierarchy.

Once this operation is done, you can save and retrieve any information from the SVX file. All the meta data are transformed into a hierarchy of classes.

Definition at line 124 of file document.cxx.

References libsvx::Svx::Add(), and m_SvxInfo.

Referenced by AddFile().

bool Document::ParseBack ::TiXmlDocument &    m_XML_Document
 

Create an XML buffer from the data in memory.

Todo:
handle this

Definition at line 249 of file document.cxx.

References m_SvxInfo, and libsvx::Svx::XmlElement().

Referenced by SaveFile().

void Document::UpdateProduct const std::string &    the_product_name,
const bool    AllowDependencyRetrieval
 

Retrieve the updated information.

Parameters:
AllowDependencyRetrieval  specify if we have to retrieve the dependency packages too
Todo:
support (AllowDependencyRetrieval == true)

Definition at line 267 of file document.cxx.

References FindProduct(), libsvx::Product::HREF(), m_Network, libsvx::MNetwork::RetrieveURL(), and libsvx::Attribute::String().


The documentation for this class was generated from the following files:
Generated on Sat Apr 13 22:56:50 2002 for libsvx by doxygen1.2.15