claw::graphic::targa::file_structure::footer Class Reference

Footer of a targa file. More...

#include <targa.hpp>

List of all members.

Public Member Functions

 footer ()
 Constructor.
bool is_valid () const
 Tell if the data of this footer is valid.

Public Attributes

unsigned int extension_offset
 Offset of the extension area.
unsigned int developer_offset
 Offset of the developer directory.
char signature [18]
 Footer identier. Must be as long as std::string("TRUEVISION-XFILE.") + 1 (for the last '\0').

Static Private Attributes

static const std::string s_signature
 The string content in the signature.

Detailed Description

Footer of a targa file.

Definition at line 151 of file targa.hpp.


Constructor & Destructor Documentation

claw::graphic::targa::file_structure::footer::footer (  ) 

Constructor.

Definition at line 131 of file targa_file_structure.cpp.

References s_signature, and signature.

00132   : extension_offset(0), developer_offset(0)
00133 {
00134   std::copy( s_signature.begin(), s_signature.end(), signature );
00135   signature[s_signature.length()] = '\0';
00136 } // targa::file_structure::footer::footer()


Member Function Documentation

bool claw::graphic::targa::file_structure::footer::is_valid (  )  const

Tell if the data of this footer is valid.

Definition at line 142 of file targa_file_structure.cpp.

References s_signature, and signature.

Referenced by claw::graphic::targa::reader::check_if_targa().

00143 {
00144   return std::equal( s_signature.begin(), s_signature.end(), signature )
00145     && signature[s_signature.length()] == '\0';
00146 } // targa::file_structure::footer::is_valid()


Member Data Documentation

Offset of the developer directory.

Definition at line 163 of file targa.hpp.

Offset of the extension area.

Definition at line 160 of file targa.hpp.

const std::string claw::graphic::targa::file_structure::footer::s_signature [static, private]

The string content in the signature.

Definition at line 171 of file targa.hpp.

Referenced by footer(), and is_valid().

Footer identier. Must be as long as std::string("TRUEVISION-XFILE.") + 1 (for the last '\0').

Definition at line 167 of file targa.hpp.

Referenced by footer(), and is_valid().


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

Generated on 9 Nov 2009 for CLAW Library (a C++ Library Absolutely Wonderful) by  doxygen 1.6.1