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
virtual ~MWAWHeader ()
 destructor
void reset (MWAWDocument::DocumentType type, int vers, DocumentKind kind=MWAWDocument::K_TEXT)
 resets the data
int getMajorVersion () const
 returns the major version
void setMajorVersion (int version)
 sets the major version
DocumentType getType () const
 returns the document type
void setType (DocumentType type)
 sets the document type
DocumentKind getKind () const
 returns the document kind
void setKind (DocumentKind 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
DocumentType m_docType
 the document type
DocumentKind 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

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
DocumentType MWAWHeader::getType ( ) const
inline

returns the document type

Referenced by MWAWDocumentInternal::getParserFromHeader().

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:

Generated on Wed May 22 2013 18:12:46 for libmwaw by doxygen 1.8.1.2