NW4F G3d
Loading...
Searching...
No Matches
g3d_ResCommon.h File Reference

Go to the source code of this file.

Classes

struct  nw::g3d::res::ResNameData
class  nw::g3d::res::ResName
class  nw::g3d::res::Offset
class  nw::g3d::res::BinString
class  nw::g3d::res::BinPtr
struct  nw::g3d::res::BinaryFileHeader
struct  nw::g3d::res::BinaryBlockHeader
struct  nw::g3d::res::ResExternalFileData
class  nw::g3d::res::ResExternalFile

Namespaces

namespace  nw
namespace  nw::g3d
namespace  nw::g3d::res

Macros

#define NW_G3D_VALIDITY_ASSERT    NW_G3D_ASSERTMSG(this, "%s::%s: Object not valid.", GetClassName(), __FUNCTION__)
#define NW_G3D_RES_COMMON_ALIGN(class_name, alignment)
#define NW_G3D_RES_COMMON(class_name)

Macro Definition Documentation

◆ NW_G3D_VALIDITY_ASSERT

#define NW_G3D_VALIDITY_ASSERT    NW_G3D_ASSERTMSG(this, "%s::%s: Object not valid.", GetClassName(), __FUNCTION__)

◆ NW_G3D_RES_COMMON_ALIGN

#define NW_G3D_RES_COMMON_ALIGN ( class_name,
alignment )
Value:
public: \
typedef class_name##Data DataType; \
DataType* ptr() { return this; } \
const DataType* ptr() const { return this; } \
DataType& ref() { NW_G3D_VALIDITY_ASSERT; return *ptr(); } \
const DataType& ref() const { NW_G3D_VALIDITY_ASSERT; return *ptr(); } \
static class_name* ResCast(DataType* ptr) \
{ NW_G3D_ASSERT_ADDR_ALIGNMENT(ptr, alignment); return static_cast<class_name*>(ptr); } \
static const class_name* ResCast(const DataType* ptr) \
{ NW_G3D_ASSERT_ADDR_ALIGNMENT(ptr, alignment); return static_cast<const class_name*>(ptr); } \
static const char* GetClassName() { return #class_name; } \
private: \
NW_G3D_DISALLOW_COPY_AND_ASSIGN(class_name) \
#define NW_G3D_VALIDITY_ASSERT
Definition g3d_ResCommon.h:11
#define NW_G3D_ASSERT_ADDR_ALIGNMENT(addr, alignment)
Definition g3d_assert.h:36

◆ NW_G3D_RES_COMMON

#define NW_G3D_RES_COMMON ( class_name)
Value:
#define NW_G3D_RES_COMMON_ALIGN(class_name, alignment)
Definition g3d_ResCommon.h:14