True Axis Physics SDK 1.2.0.1 Beta Documentation
www.trueaxis.com

FileHeader.h

00001 //---------------------------------------------------------------------------------
00002 // File Name: FileHeader.h
00003 // Description:
00004 //
00005 // Copyright (C) 2004 - 2006 True Axis Pty Ltd, Australia. 
00006 // All Rights Reserved.
00007 //
00008 // History:
00009 //      Created File.
00010 //---------------------------------------------------------------------------------
00011 
00012 #ifndef __FILEHEADER__
00013 #define __FILEHEADER__
00014 
00015 #ifndef TA_STRING_H
00016 #include "String.h"
00017 #endif // TA_STRING_H
00018 
00019 #ifndef TA_VERSION_H
00020 #include "Version.h"
00021 #endif // TA_VERSION_H
00022 
00023 namespace TA
00024 {
00025 
00026 class TACOMMON_CLASS FileHeader
00027 {
00028 public:
00029     FileHeader() {}
00030     FileHeader(const Char* szName, const Version& version) { Initialise(szName, version); }
00031     ~FileHeader() {}
00032 
00033     void Initialise(const Char* szName, const Version& version);
00034 
00035     //---------------------------------------------------------------------------------
00036     //  If an output stream, this file header is written.
00037     //  If an input stream, the stream is read and compared with this header to
00038     //  check if the names are the same and the read version is returned.
00039     //---------------------------------------------------------------------------------
00040     Version Serialise(Serialiser& serialiser) const;
00041 
00042     const Version& GetVersion() const { return m_version; }
00043     void SetVersion(const Version& version) { m_version = version; }
00044 
00045 private:
00046     const char* m_szName;
00047     Version m_version;
00048 };
00049 
00050 };
00051 
00052 #endif // __FILEHEADER__


© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.