anfo  1.0
Public Member Functions | Private Attributes | List of all members
anfo::AnimeHeader Class Reference

Anime header in the file. More...

#include <Anime.h>

Collaboration diagram for anfo::AnimeHeader:
Collaboration graph

Public Member Functions

 AnimeHeader ()
 Empty constructor. More...
 
 AnimeHeader (Anime *anime)
 Constructor build from an anime. More...
 
unsigned int getVersionMajor ()
 Get the major version. More...
 
unsigned int getVersionMinor ()
 Get the minor version. More...
 
unsigned int getSizeOfName ()
 Get the size of the name string (with the zero byte) More...
 
unsigned int getSizeOfSecondName ()
 Get the size of the second name string (with the zero byte) More...
 
unsigned int getSizeOfCoverName ()
 Get the size of the cover file name (with the zero byte) More...
 
unsigned int getNumberOfSeasons ()
 Get the number of seasons. More...
 
bool checkMarks ()
 Check the header of errors. More...
 

Private Attributes

char anfoMark [4]
 The mark to beginning of an file. Needs to be 'ANFO'. More...
 
unsigned int versionMajor
 The major version of the file. More...
 
unsigned int versionMinor
 The minor version of the file. More...
 
unsigned int sizeOfName
 The size of the name. More...
 
unsigned int sizeOfSecondName
 The size of the second name. More...
 
unsigned int sizeOfCoverName
 The size of the cover name. More...
 
unsigned int numberOfSeasons
 The number of seasons. More...
 
char reserved [128]
 Reserved bytes for future versions. More...
 
char anvaluesMark [8]
 The mark of the beginning of the string values. Needs to be 'ANVALUE'. More...
 

Detailed Description

Anime header in the file.

On the top of an anfo file, the anfo header describes informations about the anime.
This class prepares a header to write the anime to a file
or read a file to rebuild a anime object.
You can check the file for errors with marks.

Definition at line 143 of file Anime.h.

Constructor & Destructor Documentation

anfo::AnimeHeader::AnimeHeader ( )

Empty constructor.

Creates an empty header file

anfo::AnimeHeader::AnimeHeader ( Anime anime)

Constructor build from an anime.

This constructor builds a header from an anime.

Parameters
animeThe anime object with the informations.

Member Function Documentation

bool anfo::AnimeHeader::checkMarks ( )

Check the header of errors.

Returns
If true, the marks are on the correct possition. If false, the file is corrupt.
unsigned int anfo::AnimeHeader::getNumberOfSeasons ( )

Get the number of seasons.

Returns
The number of seasons stored in this file
unsigned int anfo::AnimeHeader::getSizeOfCoverName ( )

Get the size of the cover file name (with the zero byte)

Returns
The size of the cover file name
unsigned int anfo::AnimeHeader::getSizeOfName ( )

Get the size of the name string (with the zero byte)

Returns
The size of the name string
unsigned int anfo::AnimeHeader::getSizeOfSecondName ( )

Get the size of the second name string (with the zero byte)

Returns
The size of the second name string
unsigned int anfo::AnimeHeader::getVersionMajor ( )

Get the major version.

Returns
The anfo major version of the file
unsigned int anfo::AnimeHeader::getVersionMinor ( )

Get the minor version.

Returns
The anfo minor version of the file

Member Data Documentation

char anfo::AnimeHeader::anfoMark[4]
private

The mark to beginning of an file. Needs to be 'ANFO'.

Definition at line 147 of file Anime.h.

char anfo::AnimeHeader::anvaluesMark[8]
private

The mark of the beginning of the string values. Needs to be 'ANVALUE'.

Definition at line 171 of file Anime.h.

unsigned int anfo::AnimeHeader::numberOfSeasons
private

The number of seasons.

Definition at line 165 of file Anime.h.

char anfo::AnimeHeader::reserved[128]
private

Reserved bytes for future versions.

Definition at line 168 of file Anime.h.

unsigned int anfo::AnimeHeader::sizeOfCoverName
private

The size of the cover name.

Definition at line 162 of file Anime.h.

unsigned int anfo::AnimeHeader::sizeOfName
private

The size of the name.

Definition at line 156 of file Anime.h.

unsigned int anfo::AnimeHeader::sizeOfSecondName
private

The size of the second name.

Definition at line 159 of file Anime.h.

unsigned int anfo::AnimeHeader::versionMajor
private

The major version of the file.

Definition at line 150 of file Anime.h.

unsigned int anfo::AnimeHeader::versionMinor
private

The minor version of the file.

Definition at line 153 of file Anime.h.


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