Journal
Engine/source/core/util/journal/journal.h
Journaling System.
Classes:
Functor base classes.
Multiple argument function functor specialization.
Private Types
Mode { StopState PlayState RecordState DisabledState }
Private Static Attributes
bool
FuncDecl *
enum Journal::Mode
Public Attributes
Private Static Functions
Functor *
_create(Id id)
Id
_getFunctionId(VoidPtr ptr, VoidMethod method)
_removeFunctionId(VoidPtr ptr, VoidMethod method)
idPool()
Public Static Functions
DeclareFunction(T func)
Register a function with the journalling system.
DeclareFunction(T obj, U method)
bool
Returns true if a function is being dispatched.
bool
Returns true if in play mode.
bool
Returns true if in recording mode.
bool
PlayNext()
ReadString(char str)
RemoveFunction(T obj, U method)
WriteString(const char str)
Public Functions
class B class C class D
class B class C class D class E
class B class C class D class E class F
class B class C class D class E class F class G
class B class C class D class E class F class G class H
class B class C class D class E class F class G class H class I
class B class C class D class E class F class G class H class I class J
class B class C class D class E class F class G class H class I class J class K
class B class C class D class E class F class G class H class I class J class K class L
class B class C class D class E
class B class C class D class E class F
class B class C class D class E class F class G
class B class C class D class E class F class G class H
class B class C class D class E class F class G class H class I
class B class C class D class E class F class G class H class I class J
class B class C class D class E class F class G class H class I class J class K
class B class C class D class E class F class G class H class I class J class K class L
class B class C class D class E
class B class C class D class E class F
class B class C class D class E class F class G
class B class C class D class E class F class G class H
class B class C class D class E class F class G class H class I
class B class C class D class E class F class G class H class I class J
class B class C class D class E class F class G class H class I class J class K
class B class C class D class E class F class G class H class I class J class K class L
Detailed Description
Journaling System.
The journaling system is used to record external events and non-deterministic values from an execution run in order that the run may be re-played for debugging purposes. The journaling system is integrated into the platform library, though not all platform calls are journaled.
File system calls are not journaled, so any modified files must be reset to their original state before playback. Only a single journal can be recored or played back at a time.
For the journals to play back correctly, journal events cannot be triggered during the processing of another event.
Private Types
Mode
Enumerator
- StopState
- PlayState
- RecordState
- DisabledState
typedef U32 Id
typedef void(Journal::* VoidMethod )()
typedef void * VoidPtr
Private Static Attributes
U32 _Count
bool _Dispatching
FuncDecl * _FunctionList
enum Journal::Mode _State
Stream * mFile
Journal smInstance
Public Attributes
class B class A Func func
class B class A id
class B class A void(Obj::* id )
class B class A void(Obj::* method )())
class B class A mFile
class B class A void(Obj::* mFile )
Private Functions
Journal()
~Journal()
Private Static Functions
_create(Id id)
_finish()
_getFunctionId(VoidPtr ptr, VoidMethod method)
_removeFunctionId(VoidPtr ptr, VoidMethod method)
_start()
idPool()
Public Static Functions
DeclareFunction(T func)
Register a function with the journalling system.
DeclareFunction(T obj, U method)
Disable()
IsDispatching()
Returns true if a function is being dispatched.
IsPlaying()
Returns true if in play mode.
IsRecording()
Returns true if in recording mode.
Play(const char * file)
PlayNext()
Read(T * v)
Read(U32 size, void * buffer)
ReadString(char str)
Record(const char * file)
RemoveFunction(T obj, U method)
Stop()
Write(const T & v)
Write(U32 size, void * buffer)
WriteString(const char str)
Public Functions
Method((A &a) , (mFile, a) )
Method((A &a) , (mFile, a) )
Method((A &a, B &b) , (mFile, a, b) )
Method((A &a, B &b) , (mFile, a, b) )
Method((A &a, B &b, C &c) , (mFile, a, b, c) )
Method((A &a, B &b, C &c) , (mFile, a, b, c) )
Method((A &a, B &b, C &c, D &d) , (mFile, a, b, c, d) )
Method((A &a, B &b, C &c, D &d) , (mFile, a, b, c, d) )
Method((A &a, B &b, C &c, D &d, E &e) , (mFile, a, b, c, d, e) )
Method((A &a, B &b, C &c, D &d, E &e) , (mFile, a, b, c, d, e) )
Method((A &a, B &b, C &c, D &d, E &e, F &f) , (mFile, a, b, c, d, e, f) )
Method((A &a, B &b, C &c, D &d, E &e, F &f) , (mFile, a, b, c, d, e, f) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g) , (mFile, a, b, c, d, e, f, g) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g) , (mFile, a, b, c, d, e, f, g) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h) , (mFile, a, b, c, d, e, f, g, h) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h) , (mFile, a, b, c, d, e, f, g, h) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i) , (mFile, a, b, c, d, e, f, g, h, i) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i) , (mFile, a, b, c, d, e, f, g, h, i) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i, J &j) , (mFile, a, b, c, d, e, f, g, h, i, j) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i, J &j) , (mFile, a, b, c, d, e, f, g, h, i, j) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i, J &j, K &k) , (mFile, a, b, c, d, e, f, g, h, i, j, k) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i, J &j, K &k) , (mFile, a, b, c, d, e, f, g, h, i, j, k) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i, J &j, K &k, L &l) , (mFile, a, b, c, d, e, f, g, h, i, j, k, l) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i, J &j, K &k, L &l) , (mFile, a, b, c, d, e, f, g, h, i, j, k, l) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i, J &j, K &k, L &l, M &m) , (mFile, a, b, c, d, e, f, g, h, i, j, k, l, m) )
Method((A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i, J &j, K &k, L &l, M &m) , (mFile, a, b, c, d, e, f, g, h, i, j, k, l, m) )
Method((Func func, A a) , (mFile, id, a) , (a) )
Method((Func func, A a, B b) , (mFile, id, a, b) , (a, b) )
Method((Func func, A a, B b, C c) , (mFile, id, a, b, c) , (a, b, c) )
Method((Func func, A a, B b, C c, D d) , (mFile, id, a, b, c, d) , (a, b, c, d) )
Method((Func func, A a, B b, C c, D d, E e) , (mFile, id, a, b, c, d, e) , (a, b, c, d, e) )
Method((Func func, A a, B b, C c, D d, E e, F f) , (mFile, id, a, b, c, d, e, f) , (a, b, c, d, e, f) )
Method((Func func, A a, B b, C c, D d, E e, F f, G g) , (mFile, id, a, b, c, d, e, f, g) , (a, b, c, d, e, f, g) )
Method((Func func, A a, B b, C c, D d, E e, F f, G g, H h) , (mFile, id, a, b, c, d, e, f, g, h) , (a, b, c, d, e, f, g, h) )
Method((Func func, A a, B b, C c, D d, E e, F f, G g, H h, I i) , (mFile, id, a, b, c, d, e, f, g, h, i) , (a, b, c, d, e, f, g, h, i) )
Method((Func func, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j) , (mFile, id, a, b, c, d, e, f, g, h, i, j) , (a, b, c, d, e, f, g, h, i, j) )
Method((Func func, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k) , (mFile, id, a, b, c, d, e, f, g, h, i, j, k) , (a, b, c, d, e, f, g, h, i, j, k) )
Method((Func func, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l) , (mFile, id, a, b, c, d, e, f, g, h, i, j, k, l) , (a, b, c, d, e, f, g, h, i, j, k, l) )
Method((Func func, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m) , (mFile, id, a, b, c, d, e, f, g, h, i, j, k, l, m) , (a, b, c, d, e, f, g, h, i, j, k, l, m) )
Method((Obj *obj, void(Obj::*)(A) method, A a)
Method((Obj *obj, void(Obj::*)(A, B) method, A a, B b)
Method((Obj *obj, void(Obj::*)(A, B, C) method, A a, B b, C c)
Method((Obj *obj, void(Obj::*)(A, B, C, D) method, A a, B b, C c, D d)
Method((Obj *obj, void(Obj::*)(A, B, C, D, E) method, A a, B b, C c, D d, E e)
Method((Obj *obj, void(Obj::*)(A, B, C, D, E, F) method, A a, B b, C c, D d, E e, F f)
Method((Obj *obj, void(Obj::*)(A, B, C, D, E, F, G) method, A a, B b, C c, D d, E e, F f, G g)
Method((Obj *obj, void(Obj::*)(A, B, C, D, E, F, G, H) method, A a, B b, C c, D d, E e, F f, G g, H h)
Method((Obj *obj, void(Obj::*)(A, B, C, D, E, F, G, H, I) method, A a, B b, C c, D d, E e, F f, G g, H h, I i)
Method((Obj *obj, void(Obj::*)(A, B, C, D, E, F, G, H, I, J) method, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j)
Method((Obj *obj, void(Obj::*)(A, B, C, D, E, F, G, H, I, J, K) method, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k)
Method((Obj *obj, void(Obj::*)(A, B, C, D, E, F, G, H, I, J, K, L) method, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l)
Method((Obj *obj, void(Obj::*)(A, B, C, D, E, F, G, H, I, J, K, L, M) method, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m)
Method(Func , (Func func, A a) , (a) )
Method(Func , (Func func, A a, B b) , (a, b) )
Method(Func , (Func func, A a, B b, C c) , (a, b, c) )
Method(Func , (Func func, A a, B b, C c, D d) , (a, b, c, d) )
Method(Func , (Func func, A a, B b, C c, D d, E e) , (a, b, c, d, e) )
Method(Func , (Func func, A a, B b, C c, D d, E e, F f) , (a, b, c, d, e, f) )
Method(Func , (Func func, A a, B b, C c, D d, E e, F f, G g) , (a, b, c, d, e, f, g) )
Method(Func , (Func func, A a, B b, C c, D d, E e, F f, G g, H h) , (a, b, c, d, e, f, g, h) )
Method(Func , (Func func, A a, B b, C c, D d, E e, F f, G g, H h, I i) , (a, b, c, d, e, f, g, h, i) )
Method(Func , (Func func, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j) , (a, b, c, d, e, f, g, h, i, j) )
Method(Func , (Func func, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k) , (a, b, c, d, e, f, g, h, i, j, k) )
Method(Func , (Func func, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l) , (a, b, c, d, e, f, g, h, i, j, k, l) )
Method(Func , (Func func, A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m) , (a, b, c, d, e, f, g, h, i, j, k, l, m) )