C:/quickbuild-1.2.13/working/root/Docs/TGEA_Offline_Docs/checkouts/engine/source/core/util/journal/journal.h File Reference

#include "platform/platform.h"
#include "core/stream/stream.h"
#include "util/returnType.h"
#include "core/stream/ioHelper.h"
#include "core/idGenerator.h"

Classes

class  Journal
 Journaling System. More...
struct  Journal::Functor
 Functor base classes. More...
struct  Journal::FunctorDecl< T >
 Multiple argument function functor specialization. More...
struct  Journal::FunctorDecl< void(*)(A, B, C, D, E, F, G, H, I, J) >
struct  Journal::FunctorDecl< void(*)(A, B, C, D, E, F, G, H, I) >
struct  Journal::FunctorDecl< void(*)(A, B, C, D, E, F, G, H) >
struct  Journal::FunctorDecl< void(*)(A, B, C, D, E, F, G) >
struct  Journal::FunctorDecl< void(*)(A, B, C, D, E, F) >
struct  Journal::FunctorDecl< void(*)(A, B, C, D, E) >
struct  Journal::FunctorDecl< void(*)(A, B, C, D) >
struct  Journal::FunctorDecl< void(*)(A, B, C) >
struct  Journal::FunctorDecl< void(*)(A, B) >
struct  Journal::FunctorDecl< void(*)(A) >
struct  Journal::MethodDecl< T, U >
struct  Journal::MethodDecl< T *, void(T::*)(A, B, C, D, E, F, G, H, I, J) >
struct  Journal::MethodDecl< T *, void(T::*)(A, B, C, D, E, F, G, H, I) >
struct  Journal::MethodDecl< T *, void(T::*)(A, B, C, D, E, F, G, H) >
struct  Journal::MethodDecl< T *, void(T::*)(A, B, C, D, E, F, G) >
struct  Journal::MethodDecl< T *, void(T::*)(A, B, C, D, E, F) >
struct  Journal::MethodDecl< T *, void(T::*)(A, B, C, D, E) >
struct  Journal::MethodDecl< T *, void(T::*)(A, B, C, D) >
struct  Journal::MethodDecl< T *, void(T::*)(A, B, C) >
struct  Journal::MethodDecl< T *, void(T::*)(A, B) >
struct  Journal::MethodDecl< T *, void(T::*)(A) >
struct  Journal::FuncDecl
struct  Journal::FuncRep< T >
struct  Journal::MethodRep< T >

Defines

#define Method(Func, Arg1, Arg2)
 Journal a function's return value.
#define Method(Arg1, Arg2, Arg3)
 Journal a function's return value.
#define Method(Arg1, Arg2, Arg3)
 Journal a function's return value.
#define Method(Arg1, Arg2)
 Journal a function's return value.
#define Method(Arg1, Arg2)
 Journal a function's return value.


Define Documentation

#define Method ( Func,
Arg1,
Arg2   ) 

Value:

static typename ReturnType<Func>::ValueType Result Arg1 { \
         typename ReturnType<Func>::ValueType value; \
         if (_Dispatching) \
            return; \
         if (_State == PlayState) { \
            _start(); \
            IOHelper::reads(mFile,value); \
            _finish(); \
            return value; \
         } \
         _Dispatching = true; \
         value = (*func) Arg2; \
         _Dispatching = false; \
         if (_State == RecordState) { \
            _start(); \
            IOHelper::writes(mFile,value); \
            _finish(); \
         } \
         return value; \
      }
Journal a function's return value.

The return value of the function is stored into the journal and retrieved during playback. During playback the function is not executed.

#define Method ( Arg1,
Arg2,
Arg3   ) 

Value:

static void Call Arg1 { \
         if (_Dispatching) \
            return; \
         if (_State == PlayState) \
            return; \
         if (_State == RecordState) { \
            Id id = _getFunctionId((VoidPtr)func,0); \
            AssertFatal(id,"Journal: Function must be be declared before being called"); \
            _start(); \
            IOHelper::writes Arg2; \
            _finish(); \
         } \
         _Dispatching = true; \
         (*func) Arg3; \
         _Dispatching = false; \
         return; \
      }
Journal a function's return value.

The return value of the function is stored into the journal and retrieved during playback. During playback the function is not executed.

#define Method ( Arg1,
Arg2,
Arg3   ) 

Value:

static void Call Arg1 { \
         if (_Dispatching) \
            return; \
         if (_State == PlayState) \
            return; \
         if (_State == RecordState) { \
            Id id = _getFunctionId((VoidPtr)obj,(VoidMethod)method); \
            AssertFatal(id != 0,"Journal: Function must be be declared before being called"); \
            _start(); \
            IOHelper::writes Arg2; \
            _finish(); \
         } \
         _Dispatching = true; \
         (obj->*method) Arg3; \
         _Dispatching = false; \
         return; \
      }
Journal a function's return value.

The return value of the function is stored into the journal and retrieved during playback. During playback the function is not executed.

#define Method ( Arg1,
Arg2   ) 

Value:

static inline bool Writes Arg1 { \
         if (_State == RecordState) { \
            _start(); IOHelper::writes Arg2; _finish(); \
            return true; \
         } \
         return false; \
      }
Journal a function's return value.

The return value of the function is stored into the journal and retrieved during playback. During playback the function is not executed.

#define Method ( Arg1,
Arg2   ) 

Value:

static inline bool Reads Arg1 { \
         if (_State == PlayState) { \
            _start(); IOHelper::reads Arg2; _finish(); \
         return true; \
         } \
         return false; \
      }
Journal a function's return value.

The return value of the function is stored into the journal and retrieved during playback. During playback the function is not executed.