Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: tnlJournal.h File Reference

# tnlJournal.h File Reference

`#include "tnlMethodDispatch.h"`
`#include <stdio.h>`

## Namespaces

namespace | TNL

## Data Structures

class | TNL::Journal
| The Journal class represents the recordable entry point(s) into program execution. More...
struct | TNL::JournalEntryRecord
class | TNL::JournalToken
class | TNL::JournalBlockTypeToken

## Defines

#define | TNL_ENABLE_JOURNALING
#define | TNL_DECLARE_JOURNAL_ENTRYPOINT(func, args)
#define | TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(className, func, args, argNames)
#define | TNL_JOURNAL_WRITE_BLOCK(blockType, x)
#define | TNL_JOURNAL_READ_BLOCK(blockType, x)
#define | TNL_JOURNAL_READ(x) TNL::Journal::getReadStream()->read x
#define | TNL_JOURNAL_WRITE(x) TNL::Journal::getWriteStream()->write x

## Define Documentation

#define TNL_ENABLE_JOURNALING

#define TNL_DECLARE_JOURNAL_ENTRYPOINT | ( | func,
|  | args |  | ) |

Value:

    void func args; \
          void func##_body args

#define TNL_IMPLEMENT_JOURNAL_ENTRYPOINT | ( | className,
|  | func,
|  | args,
|  | argNames |  | ) |

Value:

    struct Journal_##className##_##func##_er : public JournalEntryRecord { \
          FunctorDecl<void (className::*) args> mFunctorDecl; \
          Journal_##className##_##func##_er(const char *name) : JournalEntryRecord(name), mFunctorDecl(&className::func##_body) { mFunctor = &mFunctorDecl; } \
          } gJournal_##className##_##func##_er(#func); \
          void className::func args { \
          gJournal_##className##_##func##_er.mFunctorDecl.set argNames; \
             callEntry(#func, gJournal_##className##_##func##_er.mFunctor); \
          } \
          void className::func##_body args

#define TNL_JOURNAL_WRITE_BLOCK | ( | blockType,
|  | x |  | ) |

Value:

    { \
       if(TNL::Journal::getCurrentMode() == TNL::Journal::Record && TNL::Journal::isInEntrypoint()) \
       { \
          static TNL::JournalBlockTypeToken typeToken(#blockType);\
          TNL::JournalToken dummy(typeToken.getValue(), true); \
          { \
          x \
          } \
       } \
    }

#define TNL_JOURNAL_READ_BLOCK | ( | blockType,
|  | x |  | ) |

Value:

    { \
       if(TNL::Journal::getCurrentMode() == TNL::Journal::Playback && TNL::Journal::isInEntrypoint()) \
       { \
          static TNL::JournalBlockTypeToken typeToken(#blockType);\
          TNL::JournalToken dummy(typeToken.getValue(), false); \
          { \
          x \
          } \
       } \
    }

#define TNL_JOURNAL_READ | ( | x |  | ) | TNL::Journal::getReadStream()->read x

#define TNL_JOURNAL_WRITE | ( | x |  | ) | TNL::Journal::getWriteStream()->write x