Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# deWorld_Helper.hpp File Reference

Destiny "World" storage, helper file. More...

`#include "deWorld.hpp"`
`#include "deFile.hpp"`

Include dependency graph for deWorld_Helper.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Compounds
class | deWorldObject
| inherit from this class instead of IdeWorldObject to get basic functionality implemented More...
## Defines
#define | WorldObjectClassDef
#define | WorldObjectClassImp(classname)
#define | WorldObjectRegister(classname) (IdeWorld_GetManager()->RegisterWOClass(#classname, classname::CreateWorldObject))
#define | DE3D_STREAM_PUT(FS, var, vartype) if(!De3d_Write_CheckLength<vartype>(FS,(vartype)var)) return deFALSE
#define | DE3D_STREAM_PUTP(FS, var, size) if(!De3d_Write_CheckLength(FS,var,size)) return deFALSE
#define | DE3D_STREAM_GET(FS, var, vartype, length, maxlength) if(!De3d_Read_CheckLength<sizeof(vartype)>(FS,var,length,maxlength)) return deFALSE
#define | DE3D_STREAM_GETP(FS, var, size, length, maxlength) if(!De3d_Read_CheckLength(FS,var,length,maxlength, size)) return deFALSE
## Functions
template<int N, typename Y> deBoolean | De3d_Read_CheckLength (IdeFile *FS, Y &Target, u32 &Length, u32 MaxLength)
deBoolean | De3d_Read_CheckLength (IdeFile *FS, void *Target, u32 &Length, u32 MaxLength, u32 ByteSize)
template<typename T> deBoolean | De3d_Write_CheckLength (IdeFile *FS, T Source)
deBoolean | De3d_Write_CheckLength (IdeFile *FS, void *Source, u32 ByteSize)

## Detailed Description

Destiny "World" storage, helper file.

Author:
  Assassin

This file is the intellectual property of Novus Delta, LLC.. Usage of the contents of this file is subject to the Destiny3D Member License which can be found at http://www.destiny3d.com. Any other usage is prohibited.

This file is distributed "AS IS" without warranty of any kind. Novus Delta, LLC. does not guarantee the fitness of the contents of this file for any particular purpose.

Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.

Change History

Date:
  July 2003

Author:
  Assassin

Remarks:
  Creation

## Define Documentation

#define DE3D_STREAM_GET | ( | FS,
|  | var,
|  | vartype,
|  | length,
|  | maxlength |  | ) | if(!De3d_Read_CheckLength<sizeof(vartype)>(FS,var,length,maxlength)) return deFALSE

#define DE3D_STREAM_GETP | ( | FS,
|  | var,
|  | size,
|  | length,
|  | maxlength |  | ) | if(!De3d_Read_CheckLength(FS,var,length,maxlength, size)) return deFALSE

#define DE3D_STREAM_PUT | ( | FS,
|  | var,
|  | vartype |  | ) | if(!De3d_Write_CheckLength<vartype>(FS,(vartype)var)) return deFALSE

#define DE3D_STREAM_PUTP | ( | FS,
|  | var,
|  | size |  | ) | if(!De3d_Write_CheckLength(FS,var,size)) return deFALSE

#define WorldObjectClassDef

| Value:
    private: \
        static const char* s_WOTypeName; \
    public: \
        static IdeWorldObject* CreateWorldObject(void); \
        const char* GetWOTypeName(void); \
        deBoolean Serialize(IdeFile * File); \
        deBoolean DeSerialize(IdeFile * File, long DataLength)

#define WorldObjectClassImp | ( | classname |  | ) |

| Value:
    const char* classname::GetWOTypeName(void) { return s_WOTypeName; } \
        IdeWorldObject* classname::CreateWorldObject(void) { return (IdeWorldObject*)(new classname); } \
        const char* classname::s_WOTypeName = #classname

#define WorldObjectRegister | ( | classname |  | ) | (IdeWorld_GetManager()->RegisterWOClass(#classname, classname::CreateWorldObject))

## Function Documentation

deBoolean De3d_Read_CheckLength | ( | IdeFile * | FS,
|  | void * | Target,
|  | u32 & | Length,
|  | u32 | MaxLength,
|  | u32 | ByteSize
| ) | `[static]`

template<int N, typename Y>
deBoolean De3d_Read_CheckLength | ( | IdeFile * | FS,
|  | Y & | Target,
|  | u32 & | Length,
|  | u32 | MaxLength
| ) | `[static]`

deBoolean De3d_Write_CheckLength | ( | IdeFile * | FS,
|  | void * | Source,
|  | u32 | ByteSize
| ) | `[static]`

template<typename T>
deBoolean De3d_Write_CheckLength | ( | IdeFile * | FS,
|  | T | Source
| ) | `[static]`