RigsofRods
Soft-body Physics Simulation
Macros
RigDef_SequentialImporter.cpp File Reference
#include <iomanip>
#include "RigDef_SequentialImporter.h"
#include "Actor.h"
#include "Application.h"
#include "Console.h"
#include "RigDef_Parser.h"
+ Include dependency graph for RigDef_SequentialImporter.cpp:

Go to the source code of this file.

Macros

#define RESOLVE_OPTIONAL_SECTION(KEYWORD, PTRNAME, BLOCK)
 
#define FOR_EACH(KEYWORD, VECTOR, VARNAME, BLOCK)
 
#define RESOLVE(VARNAME)   VARNAME = this->ResolveNode(VARNAME);
 
#define RESOLVE_VECTOR(VECTORNAME)
 
#define STAT_LINE(STREAM, TITLE, COUNT_VAR, KEYWORD)
 

Detailed Description

Author
Petr Ohlidal
Date
04/2015

Definition in file RigDef_SequentialImporter.cpp.

Macro Definition Documentation

◆ FOR_EACH

#define FOR_EACH (   KEYWORD,
  VECTOR,
  VARNAME,
  BLOCK 
)
Value:
{ \
m_current_keyword = KEYWORD; \
auto itor_ = VECTOR.begin(); \
auto end_ = VECTOR.end(); \
for (; itor_ != end_; ++itor_) \
{ \
auto& VARNAME = *itor_; \
BLOCK \
} \
m_current_keyword = Keyword::INVALID; \
}

Definition at line 366 of file RigDef_SequentialImporter.cpp.

◆ RESOLVE

#define RESOLVE (   VARNAME)    VARNAME = this->ResolveNode(VARNAME);

Definition at line 379 of file RigDef_SequentialImporter.cpp.

◆ RESOLVE_OPTIONAL_SECTION

#define RESOLVE_OPTIONAL_SECTION (   KEYWORD,
  PTRNAME,
  BLOCK 
)
Value:
{ \
m_current_keyword = KEYWORD; \
if (PTRNAME) \
{ \
BLOCK \
} \
m_current_keyword = Keyword::INVALID; \
}

Definition at line 356 of file RigDef_SequentialImporter.cpp.

◆ RESOLVE_VECTOR

#define RESOLVE_VECTOR (   VECTORNAME)
Value:
{ \
auto end = VECTORNAME.end(); \
for ( auto itor = VECTORNAME.begin(); itor != end; ++itor) \
{ \
RESOLVE(*itor); \
} \
}

Definition at line 381 of file RigDef_SequentialImporter.cpp.

◆ STAT_LINE

#define STAT_LINE (   STREAM,
  TITLE,
  COUNT_VAR,
  KEYWORD 
)
Value:
{ \
unsigned offset = this->GetNodeArrayOffset(KEYWORD); \
STREAM << "\n\t" << TITLE << std::setw(4) << COUNT_VAR; \
if (COUNT_VAR != 0) { STREAM << " (after conversion: start index = " << std::setw(4) << offset << ", end index = " << (offset + COUNT_VAR) - 1 << ")"; } \
}

Definition at line 768 of file RigDef_SequentialImporter.cpp.

PartialToken::KEYWORD
@ KEYWORD