MWAWHeader Class Reference documentation

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
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 More...
| MWAWHeader (MWAWHeader const &)=default
MWAWHeader & | operator= (MWAWHeader const &)=default
virtual | ~MWAWHeader ()
| destructor More...
void | reset (MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
| resets the data More...
int | getMajorVersion () const
| returns the major version More...
void | setMajorVersion (int version)
| sets the major version More...
Type | getType () const
| returns the document type More...
void | setType (Type type)
| sets the document type More...
Kind | getKind () const
| returns the document kind More...
void | setKind (Kind kind)
| sets the document kind More...

## 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 ) More...

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

## 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() [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 ClarisWksDocument::checkHeader(), GreatWksDocument::checkHeader(), RagTime5Document::checkHeader(), ActaParser::checkHeader(), ApplePictParser::checkHeader(), BeagleWksBMParser::checkHeader(), BeagleWksDBParser::checkHeader(), BeagleWksDRParser::checkHeader(), BeagleWksParser::checkHeader(), BeagleWksSSParser::checkHeader(), Canvas5BMParser::checkHeader(), Canvas5Parser::checkHeader(), CanvasParser::checkHeader(), ClarisDrawParser::checkHeader(), CorelPainterParser::checkHeader(), CricketDrawParser::checkHeader(), DocMkrParser::checkHeader(), DrawTableParser::checkHeader(), EDocParser::checkHeader(), FreeHandParser::checkHeader(), FullWrtParser::checkHeader(), GreatWksBMParser::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(), RagTimeParser::checkHeader(), ReadySetGoParser::checkHeader(), ScoopParser::checkHeader(), ScriptWriterParser::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(), reset(), and setKind().

## ◆ m_docType

Type MWAWHeader::m_docType
| private

the document type

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

## ◆ m_version

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