MWAWHeader Class Reference

a function used by MWAWDocument to store the version of document and the input More...

`#include <MWAWHeader.hxx>`

## Public Types

typedef enum MWAWDocument::DocumentType | DocumentType
typedef enum MWAWDocument::DocumentKind | DocumentKind

## Public Member Functions

| MWAWHeader (MWAWDocument::DocumentType type=MWAWDocument::UNKNOWN, int vers=0, DocumentKind kind=MWAWDocument::K_TEXT)
| constructor given the input More...
virtual | ~MWAWHeader ()
| destructor More...
void | reset (MWAWDocument::DocumentType type, int vers, DocumentKind kind=MWAWDocument::K_TEXT)
| resets the data More...
int | getMajorVersion () const
| returns the major version More...
void | setMajorVersion (int version)
| sets the major version More...
DocumentType | getType () const
| returns the document type More...
void | setType (DocumentType type)
| sets the document type More...
DocumentKind | getKind () const
| returns the document kind More...
void | setKind (DocumentKind kind)
| sets the document kind More...

## Static Public Member Functions

static std::vector< MWAWHeader > | constructHeader (MWAWInputStreamPtr input, shared_ptr< MWAWRSRCParser > rsrcParser)
| tests the input file and returns a header if the file looks like a MWAW document ( trying first to use the resource parsed if it exists ) More...

## Private Attributes

int | m_version
| the document version More...
DocumentType | m_docType
| the document type More...
DocumentKind | m_docKind
| the document kind More...

## Detailed Description

a function used by MWAWDocument to store the version of document and the input

This class is mainly used to maintain a symetry with the libwpd library

## Member Typedef Documentation

typedef enum MWAWDocument::DocumentKind MWAWHeader::DocumentKind

typedef enum MWAWDocument::DocumentType MWAWHeader::DocumentType

## Constructor & Destructor Documentation

MWAWHeader::MWAWHeader | ( | MWAWDocument::DocumentType | type = `MWAWDocument::UNKNOWN`,
|  | int | vers = `0`,
|  | DocumentKind | kind = `MWAWDocument::K_TEXT`
| ) |  |

constructor given the input

MWAWHeader::~MWAWHeader | ( |  | ) |

virtual

destructor

## Member Function Documentation

std::vector< MWAWHeader > MWAWHeader::constructHeader | ( | MWAWInputStreamPtr | input,
|  | shared_ptr< MWAWRSRCParser > | rsrcParser
| ) |  |

static

tests the input file and returns a header if the file looks like a MWAW document ( trying first to use the resource parsed if it exists )

So far, we have identified.

Note
  this check phase can only be partial ; ie. we only test the first bytes of the file and/or the existence of some oles. This explains that MWAWDocument implements a more complete test to recognize the difference Mac Files which share the same type of header...

Referenced by MWAWDocumentInternal::getHeader().

DocumentKind MWAWHeader::getKind | ( |  | ) | const

inline

returns the document kind

Referenced by CWPresentation::numPages(), and CWParser::typeMainZones().

int MWAWHeader::getMajorVersion | ( |  | ) | const

inline

returns the major version

Referenced by MWAWDocumentInternal::getParserFromHeader(), and MWAWParserState::MWAWParserState().

DocumentType MWAWHeader::getType | ( |  | ) | const

inline

returns the document type

Referenced by MWAWDocumentInternal::getParserFromHeader().

void MWAWHeader::reset | ( | MWAWDocument::DocumentType | type,
|  | int | vers,
|  | DocumentKind | kind = `MWAWDocument::K_TEXT`
| ) |  |

inline

resets the data

Referenced by EDParser::checkHeader(), MCDParser::checkHeader(), TTParser::checkHeader(), DMParser::checkHeader(), MSW1Parser::checkHeader(), BWParser::checkHeader(), ACParser::checkHeader(), MWParser::checkHeader(), LWParser::checkHeader(), NSParser::checkHeader(), GWParser::checkHeader(), MDWParser::checkHeader(), MSK3Parser::checkHeader(), MSK4Parser::checkHeader(), WPParser::checkHeader(), FWParser::checkHeader(), WNParser::checkHeader(), MWProParser::checkHeader(), MORParser::checkHeader(), ZWParser::checkHeader(), CWParser::checkHeader(), MSWParser::checkHeader(), HMWJParser::checkHeader(), MRWParser::checkHeader(), and HMWKParser::checkHeader().

void MWAWHeader::setKind | ( | DocumentKind | kind | ) |

inline

sets the document kind

Referenced by CWParser::checkHeader().

void MWAWHeader::setMajorVersion | ( | int | version | ) |

inline

sets the major version

void MWAWHeader::setType | ( | DocumentType | type | ) |

inline

sets the document type

## Member Data Documentation

DocumentKind MWAWHeader::m_docKind

private

the document kind

Referenced by getKind(), reset(), and setKind().

DocumentType MWAWHeader::m_docType

private

the document type

Referenced by getType(), reset(), and setType().

int MWAWHeader::m_version

private

the document version

Referenced by getMajorVersion(), reset(), and setMajorVersion().

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

- MWAWHeader.hxx
- MWAWHeader.cxx