MWAWHeader Class Reference

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

#include <MWAWHeader.hxx>

List of all members.

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
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< MWAWHeaderconstructHeader (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 )

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 and the input

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


Member Typedef Documentation


Constructor & Destructor Documentation

constructor given the input

Parameters:
typethe document type
versionthe file version
kingthe document kind (default word processing document)
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().

int MWAWHeader::getMajorVersion ( ) const [inline]
Type MWAWHeader::getType ( ) const [inline]

returns the document type

Referenced by MWAWDocumentInternal::getParserFromHeader().

void MWAWHeader::setKind ( Kind  kind) [inline]

sets the document kind

Referenced by CWParser::checkHeader(), and CWParser::parse().

void MWAWHeader::setMajorVersion ( int  version) [inline]

sets the major version

void MWAWHeader::setType ( Type  type) [inline]

sets the document type


Member Data Documentation

the document kind

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

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: