NGL  6.5
The NCCA Graphics Library
rapidxml::file< Ch > Class Template Reference

Represents data loaded from a file. More...

#include <rapidxml_utils.hpp>

+ Collaboration diagram for rapidxml::file< Ch >:

Public Member Functions

 file (const char *filename)
 
 file (std::basic_istream< Ch > &stream)
 
Ch * data ()
 
const Ch * data () const
 
std::size_t size () const
 

Private Attributes

std::vector< Ch > m_data
 

Detailed Description

template<class Ch = char>
class rapidxml::file< Ch >

Represents data loaded from a file.

Definition at line 21 of file rapidxml_utils.hpp.

Constructor & Destructor Documentation

template<class Ch = char>
rapidxml::file< Ch >::file ( const char *  filename)
inline

Loads file into the memory. Data will be automatically destroyed by the destructor.

Parameters
filenameFilename to load.

Definition at line 28 of file rapidxml_utils.hpp.

References rapidxml::file< Ch >::m_data, and rapidxml::file< Ch >::size().

+ Here is the call graph for this function:

template<class Ch = char>
rapidxml::file< Ch >::file ( std::basic_istream< Ch > &  stream)
inline

Loads file into the memory. Data will be automatically destroyed by the destructor

Parameters
streamStream to load from

Definition at line 51 of file rapidxml_utils.hpp.

References rapidxml::file< Ch >::m_data.

Member Function Documentation

template<class Ch = char>
Ch* rapidxml::file< Ch >::data ( )
inline

Gets file data.

Returns
Pointer to data of file.

Definition at line 65 of file rapidxml_utils.hpp.

References rapidxml::file< Ch >::m_data.

template<class Ch = char>
const Ch* rapidxml::file< Ch >::data ( ) const
inline

Gets file data.

Returns
Pointer to data of file.

Definition at line 72 of file rapidxml_utils.hpp.

References rapidxml::file< Ch >::m_data.

template<class Ch = char>
std::size_t rapidxml::file< Ch >::size ( ) const
inline

Gets file data size.

Returns
Size of file data, in characters.

Definition at line 79 of file rapidxml_utils.hpp.

References rapidxml::file< Ch >::m_data.

+ Here is the caller graph for this function:

Member Data Documentation

template<class Ch = char>
std::vector<Ch> rapidxml::file< Ch >::m_data
private

Definition at line 86 of file rapidxml_utils.hpp.


The documentation for this class was generated from the following file: