WPS4Graph Class Reference

the main class to read/store picture in a Pc MS Works document v1-4 More...

#include <WPS4Graph.h>

Public Member Functions

 WPS4Graph (WPS4Parser &parser)
 constructor given the main parser of the MN0 zone More...
 
 ~WPS4Graph ()
 destructor More...
 
void setListener (WPSContentListenerPtr &listen)
 sets the listener More...
 
void computePositions () const
 computes the position of all found figures. More...
 
int numPages () const
 returns the number page where we find a picture. In practice, 0/1 More...
 

Protected Member Functions

int version () const
 returns the file version More...
 
void storeObjects (std::vector< WPSOLEParserObject > const &objects, std::vector< int > const &ids)
 store a list of object More...
 
int readObject (RVNGInputStreamPtr input, WPSEntry const &entry)
 tries to find a picture in the zone pointed by entry More...
 
void sendObject (WPSPosition const &position, int id)
 sends an object with identificator id as a character to a given pposition More...
 
void sendObjects (int page)
 send all the objects of a given page: More...
 
libwps::DebugFileascii ()
 returns the debug file More...
 

Protected Attributes

WPSContentListenerPtr m_listener
 the listener More...
 
WPS4Parserm_mainParser
 the main parser More...
 
shared_ptr< WPS4GraphInternal::Statem_state
 the state More...
 
libwps::DebugFilem_asciiFile
 the ascii file More...
 

Private Member Functions

 WPS4Graph (WPS4Graph const &orig)
 
WPS4Graphoperator= (WPS4Graph const &orig)
 

Friends

class WPS4Parser
 

Detailed Description

the main class to read/store picture in a Pc MS Works document v1-4

This class must be associated with a WPS4Parser.

Note
As the pictures seems always be given with character' position, many functions which exists to maintain the same structures that exist(will) in WPS8TextGraph class do almost nothing.

Constructor & Destructor Documentation

§ WPS4Graph() [1/2]

WPS4Graph::WPS4Graph ( WPS4Parser parser)
explicit

constructor given the main parser of the MN0 zone

§ ~WPS4Graph()

WPS4Graph::~WPS4Graph ( )

destructor

§ WPS4Graph() [2/2]

WPS4Graph::WPS4Graph ( WPS4Graph const &  orig)
private

Member Function Documentation

§ ascii()

libwps::DebugFile& WPS4Graph::ascii ( )
inlineprotected

returns the debug file

Referenced by readObject().

§ computePositions()

void WPS4Graph::computePositions ( ) const

computes the position of all found figures.

In reality, as all the pictures seemed to be given with characters positions, it does almost nothing, ie it only updates some internal bool to know the picture which have been sent to the listener.

§ numPages()

int WPS4Graph::numPages ( ) const

returns the number page where we find a picture. In practice, 0/1

§ operator=()

WPS4Graph& WPS4Graph::operator= ( WPS4Graph const &  orig)
private

§ readObject()

int WPS4Graph::readObject ( RVNGInputStreamPtr  input,
WPSEntry const &  entry 
)
protected

tries to find a picture in the zone pointed by entry

Returns
the object id or -1 if find nothing
Note
the content of this zone is mainly unknown, so this function may failed to retrieved valid data

§ sendObject()

void WPS4Graph::sendObject ( WPSPosition const &  position,
int  id 
)
protected

sends an object with identificator id as a character to a given pposition

§ sendObjects()

void WPS4Graph::sendObjects ( int  page)
protected

send all the objects of a given page:

Parameters
pageif page < 0, sends all the pictures which have not been used,

As all the pictures seemed to be given with characters positions, this function only does something if page < 0.

§ setListener()

void WPS4Graph::setListener ( WPSContentListenerPtr listen)
inline

sets the listener

§ storeObjects()

void WPS4Graph::storeObjects ( std::vector< WPSOLEParserObject > const &  objects,
std::vector< int > const &  ids 
)
protected

store a list of object

§ version()

int WPS4Graph::version ( ) const
protected

returns the file version

Friends And Related Function Documentation

§ WPS4Parser

friend class WPS4Parser
friend

Member Data Documentation

§ m_asciiFile

libwps::DebugFile& WPS4Graph::m_asciiFile
protected

the ascii file

§ m_listener

WPSContentListenerPtr WPS4Graph::m_listener
protected

the listener

Referenced by sendObject(), and sendObjects().

§ m_mainParser

WPS4Parser& WPS4Graph::m_mainParser
protected

the main parser

Referenced by version().

§ m_state

shared_ptr<WPS4GraphInternal::State> WPS4Graph::m_state
mutableprotected

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

Generated on Wed Oct 26 2016 16:54:38 for libwps by doxygen 1.8.12