Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cObjectSignature< _SIGVALID > Class Template Reference

#include <cObject.h>

Inheritance diagram for Gray::cObjectSignature< _SIGVALID >:
Gray::cMemSignature< 0xCA11AB11 >

Public Member Functions

 cObjectSignature (UINT32 nVer, size_t nSizeofThis)
 
 ~cObjectSignature ()
 
bool IsValidSignature (UINT32 nVer, size_t nSizeofThis) const
 
- Public Member Functions inherited from Gray::cMemSignature< 0xCA11AB11 >
 cMemSignature () noexcept
 
 ~cMemSignature ()
 
bool isValidSignature () const noexcept
 

Additional Inherited Members

- Static Public Attributes inherited from Gray::cMemSignature< 0xCA11AB11 >
static const UINT32 k_VALID
 used just to make sure this is valid. FEEDF00D More...
 
static const UINT32 k_INVALID
 Mark as NOT valid when freed! More...
 

Detailed Description

template<UINT32 _SIGVALID = 0xCA11AB11>
class Gray::cObjectSignature< _SIGVALID >

use this to make sure 2 DLL/SO's agree on the format and version of some object.

Constructor & Destructor Documentation

◆ cObjectSignature()

template<UINT32 _SIGVALID = 0xCA11AB11>
Gray::cObjectSignature< _SIGVALID >::cObjectSignature ( UINT32  nVer,
size_t  nSizeofThis 
)
inline

◆ ~cObjectSignature()

template<UINT32 _SIGVALID = 0xCA11AB11>
Gray::cObjectSignature< _SIGVALID >::~cObjectSignature ( )
inline

Member Function Documentation

◆ IsValidSignature()

template<UINT32 _SIGVALID = 0xCA11AB11>
bool Gray::cObjectSignature< _SIGVALID >::IsValidSignature ( UINT32  nVer,
size_t  nSizeofThis 
) const
inline

Call this from the context of some other DLL or lib and make sure they match. If not, then there are un-matching pound defines (conditional code) or different compiler packing params. This is BAD. Make sure this is inline compiled.


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