MWAWHeader Class Reference

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

`#include <MWAWHeader.hxx>`

## Public Types
typedef enum MWAWDocument::Type | Type
typedef enum MWAWDocument::Kind | Kind

## Public Member Functions
| MWAWHeader (MWAWDocument::Type type=MWAWDocument::MWAW_T_UNKNOWN, int version=0, MWAWDocument::Kind kind=MWAWDocument::MWAW_K_TEXT)
| constructor given the input
| MWAWHeader (MWAWHeader const &)=default
MWAWHeader & | operator= (MWAWHeader const &)=default
virtual | ~MWAWHeader ()
| destructor
void | reset (MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
| resets the data
int | getMajorVersion () const
| returns the major version
void | setMajorVersion (int version)
| sets the major version
Type | getType () const
| returns the document type
void | setType (Type type)
| sets the document type
Kind | getKind () const
| returns the document kind
void | setKind (Kind kind)
| sets the document kind

## Static Public Member Functions
static std::vector< MWAWHeader > | constructHeader (MWAWInputStreamPtr input, std::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 )

## Private Attributes
int | m_version
| the document version
Type | m_docType
| the document type
Kind | m_docKind
| the document kind

## Detailed Description

a function used by MWAWDocument to store the version of document

This class is responsible for finding a list of potential formats corresponding to a file, this list will latter be checked by calling the corresponding parser's function checkHeader via MWAWDocument.

This class also allows to store the document type, king and version.

## Member Typedef Documentation

## ◆ Kind

typedef enum MWAWDocument::Kind MWAWHeader::Kind

## ◆ Type

typedef enum MWAWDocument::Type MWAWHeader::Type

## Constructor & Destructor Documentation

## ◆ MWAWHeader() [1/2]

MWAWHeader::MWAWHeader | ( | MWAWDocument::Type | type = MWAWDocument::MWAW_T_UNKNOWN,
|  | int | version = 0,
|  | MWAWDocument::Kind | kind = MWAWDocument::MWAW_K_TEXT )
| explicit

constructor given the input

Parameters

  type | the document type
  version | the file version
  kind | the document kind (default word processing document)

Referenced by constructHeader(), MWAWHeader(), and operator=().

## ◆ MWAWHeader() [2/2]

MWAWHeader::MWAWHeader | ( | MWAWHeader const & |  | ) |
| default

## ◆ ~MWAWHeader()

MWAWHeader::~MWAWHeader | ( |  | ) |
| virtual

destructor

## Member Function Documentation

## ◆ constructHeader()

std::vector< MWAWHeader > MWAWHeader::constructHeader | ( | MWAWInputStreamPtr | input,
|  | std::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().

## ◆ getKind()

Kind MWAWHeader::getKind | ( |  | ) | const
| inline

returns the document kind

Referenced by MWAWDocumentInternal::getGraphicParserFromHeader(), MWAWDocumentInternal::getPresentationParserFromHeader(), MWAWDocumentInternal::getSpreadsheetParserFromHeader(), MWAWDocumentInternal::getTextParserFromHeader(), and MWAWParserState::MWAWParserState().

## ◆ getMajorVersion()

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

returns the major version

Referenced by MWAWDocumentInternal::getGraphicParserFromHeader(), MWAWDocumentInternal::getPresentationParserFromHeader(), MWAWDocumentInternal::getSpreadsheetParserFromHeader(), MWAWDocumentInternal::getTextParserFromHeader(), and MWAWParserState::MWAWParserState().

## ◆ getType()

Type MWAWHeader::getType | ( |  | ) | const
| inline

returns the document type

Referenced by MWAWDocumentInternal::getGraphicParserFromHeader(), MWAWDocumentInternal::getPresentationParserFromHeader(), MWAWDocumentInternal::getSpreadsheetParserFromHeader(), and MWAWDocumentInternal::getTextParserFromHeader().

## ◆ operator=()

MWAWHeader & MWAWHeader::operator= | ( | MWAWHeader const & |  | ) |
| default

## ◆ reset()

void MWAWHeader::reset | ( | MWAWDocument::Type | type,
|  | int | vers,
|  | Kind | kind = MWAWDocument::MWAW_K_TEXT )
| inline

resets the data

Referenced by ActaParser::checkHeader(), ApplePictParser::checkHeader(), BeagleWksBMParser::checkHeader(), BeagleWksDBParser::checkHeader(), BeagleWksDRParser::checkHeader(), BeagleWksParser::checkHeader(), BeagleWksSSParser::checkHeader(), Canvas5BMParser::checkHeader(), Canvas5Parser::checkHeader(), CanvasParser::checkHeader(), ClarisDrawParser::checkHeader(), ClarisWksDocument::checkHeader(), CorelPainterParser::checkHeader(), CricketDrawParser::checkHeader(), DocMkrParser::checkHeader(), DrawTableParser::checkHeader(), EDocParser::checkHeader(), FreeHandParser::checkHeader(), FullWrtParser::checkHeader(), GreatWksBMParser::checkHeader(), GreatWksDocument::checkHeader(), HanMacWrdJParser::checkHeader(), HanMacWrdKParser::checkHeader(), JazzSSParser::checkHeader(), JazzWriterParser::checkHeader(), LightWayTxtParser::checkHeader(), MacDocParser::checkHeader(), MacDraft5Parser::checkHeader(), MacDraftParser::checkHeader(), MacDrawParser::checkHeader(), MacDrawProParser::checkHeader(), MacPaintParser::checkHeader(), MacWrtParser::checkHeader(), MacWrtProParser::checkHeader(), MarinerWrtParser::checkHeader(), MaxWrtParser::checkHeader(), MindWrtParser::checkHeader(), MoreParser::checkHeader(), MouseWrtParser::checkHeader(), MsWksParser::checkHeader(), MsWrd1Parser::checkHeader(), MsWrdParser::checkHeader(), MultiplanParser::checkHeader(), NisusWrtParser::checkHeader(), PixelPaintParser::checkHeader(), PowerPoint1Parser::checkHeader(), PowerPoint3Parser::checkHeader(), PowerPoint7Parser::checkHeader(), RagTime5Document::checkHeader(), RagTimeParser::checkHeader(), ReadySetGoParser::checkHeader(), ScoopParser::checkHeader(), ScriptWriterParser::checkHeader(), SpringBoardParser::checkHeader(), StudentWritingCParser::checkHeader(), StyleParser::checkHeader(), SuperPaintParser::checkHeader(), TeachTxtParser::checkHeader(), WingzParser::checkHeader(), WordMakerParser::checkHeader(), WriteNowParser::checkHeader(), WriterPlsParser::checkHeader(), ZWrtParser::checkHeader(), and MsWksDocument::checkHeader3().

## ◆ setKind()

void MWAWHeader::setKind | ( | Kind | kind | ) |
| inline

sets the document kind

Referenced by ClarisWksDocument::checkHeader().

## ◆ setMajorVersion()

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

sets the major version

## ◆ setType()

void MWAWHeader::setType | ( | Type | type | ) |
| inline

sets the document type

## Member Data Documentation

## ◆ m_docKind

Kind MWAWHeader::m_docKind
| private

the document kind

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

## ◆ m_docType

Type MWAWHeader::m_docType
| private

the document type

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

## ◆ m_version

int MWAWHeader::m_version
| private

the document version

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

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

- MWAWHeader.hxx
- MWAWHeader.cxx