a function used by STOFFDocument to store the version of document More...
#include <STOFFHeader.hxx>
Public Types | |
typedef enum STOFFDocument::Kind | Kind |
Public Member Functions | |
STOFFHeader (int version=0, STOFFDocument::Kind kind=STOFFDocument::STOFF_K_TEXT) | |
constructor given the input More... | |
virtual | ~STOFFHeader () |
destructor More... | |
void | reset (int vers, Kind kind=STOFFDocument::STOFF_K_TEXT) |
resets the data More... | |
int | getVersion () const |
returns the major version More... | |
void | setVersion (int version) |
sets the major version More... | |
Kind | getKind () const |
returns the document kind More... | |
void | setKind (Kind kind) |
sets the document kind More... | |
bool | isEncrypted () const |
returns true if the file is encypted More... | |
void | setEncrypted (bool encrypted) |
set the encryption mode More... | |
Static Public Member Functions | |
static std::vector< STOFFHeader > | constructHeader (STOFFInputStreamPtr input) |
tests the input file and returns a header if the file looks like a STOFF document ( trying first to use the resource parsed if it exists ) More... | |
Private Attributes | |
int | m_version |
the document version More... | |
Kind | m_docKind |
the document kind More... | |
bool | m_isEncrypted |
flag to know if the file is encrypted More... | |
a function used by STOFFDocument 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 STOFFDocument.
This class also allows to store the document type, king and version.
typedef enum STOFFDocument::Kind STOFFHeader::Kind |
STOFFHeader::STOFFHeader | ( | int | version = 0 , |
STOFFDocument::Kind | kind = STOFFDocument::STOFF_K_TEXT |
||
) |
constructor given the input
version | the file version |
kind | the document kind (default word processing document) |
Referenced by constructHeader().
|
virtual |
destructor
|
static |
tests the input file and returns a header if the file looks like a STOFF document ( trying first to use the resource parsed if it exists )
So far, we have identified.
Referenced by STOFFDocumentInternal::getHeader().
|
inline |
|
inline |
returns the major version
Referenced by STOFFParserState::STOFFParserState().
|
inline |
returns true if the file is encypted
|
inline |
resets the data
Referenced by SDAParser::checkHeader(), SDWParser::checkHeader(), SDGParser::checkHeader(), and SDCParser::checkHeader().
|
inline |
set the encryption mode
Referenced by SDAParser::checkHeader(), SDWParser::checkHeader(), and SDCParser::checkHeader().
|
inline |
sets the document kind
|
inline |
sets the major version
|
private |
|
private |
flag to know if the file is encrypted
Referenced by isEncrypted(), and setEncrypted().
|
private |
the document version
Referenced by getVersion(), reset(), and setVersion().