MWProStructuresListenerState Class Reference

an interface to transmit the info of MWProStructures to a listener More...

`#include <MWProStructures.hxx>`

## Public Member Functions

| MWProStructuresListenerState (shared_ptr< MWProStructures > structures, bool mainZone)
| the constructor More...
| ~MWProStructuresListenerState ()
| the destructor More...
bool | isSent (int blockId)
| returns true if the block is already sent ( or does not exists) More...
bool | send (int blockId)
| try to send a block which corresponds to blockid More...
void | sendSection (int numSection)
| try to send the i^th section More...
bool | sendFont (int id)
| try to send a character style More...
bool | sendParagraph (int id)
| try to send a paragraph More...
void | sendChar (char c)
| send a character More...
bool | resendAll ()
| force resent data : font + paragraph More...
int | numSection () const
| returns the actual section More...
std::vector< int > | getPageBreaksPos () const
| return a list of page break position ( as some page break are soft ) More...
void | insertSoftPageBreak ()
| insert a page break ( if we are not on a new page ) More...
std::string | getFontDebugString (int fontId)
| debug function which returns a string corresponding to a fontId More...
std::string | getParagraphDebugString (int paraId)
| debug function which returns a string corresponding to a paragrapId More...

## Protected Member Functions

bool | newPage (bool softBreak=false)
| create a new page More...
void | sendFont (MWProStructuresInternal::Font const &font)
| sends the font properties to the listener More...
void | sendParagraph (MWProStructuresInternal::Paragraph const &para)
| sends the paragraph properties to the listener More...

## Protected Attributes

bool | m_isMainZone
int | m_actPage
int | m_actTab
int | m_numTab
int | m_section
int | m_numCols
bool | m_newPageDone
shared_ptr< MWProStructures > | m_structures
shared_ptr < MWProStructuresInternal::Font > | m_font
shared_ptr < MWProStructuresInternal::Paragraph > | m_paragraph

## Detailed Description

an interface to transmit the info of MWProStructures to a listener

## Constructor & Destructor Documentation

MWProStructuresListenerState::MWProStructuresListenerState | ( | shared_ptr< MWProStructures > | structures,
|  | bool | mainZone
| ) |  |

the constructor

MWProStructuresListenerState::~MWProStructuresListenerState | ( |  | ) |

the destructor

## Member Function Documentation

std::string MWProStructuresListenerState::getFontDebugString | ( | int | fontId | ) |

debug function which returns a string corresponding to a fontId

Referenced by MWProParser::sendText().

std::vector< int > MWProStructuresListenerState::getPageBreaksPos | ( |  | ) | const

return a list of page break position ( as some page break are soft )

Referenced by MWProParser::sendText().

std::string MWProStructuresListenerState::getParagraphDebugString | ( | int | paraId | ) |

debug function which returns a string corresponding to a paragrapId

Referenced by MWProParser::sendText().

void MWProStructuresListenerState::insertSoftPageBreak | ( |  | ) |

insert a page break ( if we are not on a new page )

Referenced by MWProParser::sendText().

bool MWProStructuresListenerState::isSent | ( | int | blockId | ) |

returns true if the block is already sent ( or does not exists)

Referenced by MWProParser::sendText().

bool MWProStructuresListenerState::newPage | ( | bool | softBreak = `false` | ) |

protected

create a new page

Referenced by insertSoftPageBreak(), MWProStructuresListenerState(), sendChar(), and sendSection().

int MWProStructuresListenerState::numSection | ( |  | ) | const

inline

returns the actual section

Referenced by MWProParser::sendText().

bool MWProStructuresListenerState::resendAll | ( |  | ) |

force resent data : font + paragraph

Referenced by MWProParser::sendText().

bool MWProStructuresListenerState::send | ( | int | blockId | ) |

try to send a block which corresponds to blockid

Referenced by MWProParser::sendText().

void MWProStructuresListenerState::sendChar | ( | char | c | ) |

send a character

Referenced by MWProParser::sendText().

bool MWProStructuresListenerState::sendFont | ( | int | id | ) |

try to send a character style

Referenced by resendAll(), and MWProParser::sendText().

void MWProStructuresListenerState::sendFont | ( | MWProStructuresInternal::Font const & | font | ) |

protected

sends the font properties to the listener

bool MWProStructuresListenerState::sendParagraph | ( | int | id | ) |

try to send a paragraph

Referenced by resendAll(), sendChar(), and MWProParser::sendText().

void MWProStructuresListenerState::sendParagraph | ( | MWProStructuresInternal::Paragraph const & | para | ) |

protected

sends the paragraph properties to the listener

void MWProStructuresListenerState::sendSection | ( | int | numSection | ) |

try to send the i^th section

Referenced by MWProStructuresListenerState(), and sendChar().

## Member Data Documentation

int MWProStructuresListenerState::m_actPage

protected

Referenced by newPage().

int MWProStructuresListenerState::m_actTab

protected

Referenced by newPage(), and sendChar().

shared_ptr<MWProStructuresInternal::Font> MWProStructuresListenerState::m_font

protected

Referenced by getFontDebugString(), resendAll(), and sendFont().

bool MWProStructuresListenerState::m_isMainZone

protected

Referenced by getPageBreaksPos(), newPage(), numSection(), and sendChar().

bool MWProStructuresListenerState::m_newPageDone

protected

Referenced by insertSoftPageBreak(), newPage(), send(), and sendChar().

int MWProStructuresListenerState::m_numCols

protected

Referenced by sendChar(), and sendSection().

int MWProStructuresListenerState::m_numTab

protected

Referenced by sendChar(), and sendParagraph().

shared_ptr<MWProStructuresInternal::Paragraph> MWProStructuresListenerState::m_paragraph

protected

Referenced by resendAll(), sendChar(), and sendParagraph().

int MWProStructuresListenerState::m_section

protected

Referenced by numSection(), and sendChar().

shared_ptr<MWProStructures> MWProStructuresListenerState::m_structures

protected

Referenced by getFontDebugString(), getPageBreaksPos(), getParagraphDebugString(), isSent(), MWProStructuresListenerState(), newPage(), send(), sendChar(), sendFont(), sendParagraph(), and sendSection().

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

- MWProStructures.hxx
- MWProStructures.cxx