RigsofRods
Soft-body Physics Simulation
Namespaces | Macros
RigDef_Validator.cpp File Reference
#include "RigDef_Validator.h"
#include "Actor.h"
#include "SimConstants.h"
#include "Application.h"
#include "Console.h"
+ Include dependency graph for RigDef_Validator.cpp:

Go to the source code of this file.

Namespaces

 RigDef
 

Macros

#define CHECK_SECTION_IN_ALL_MODULES(_CLASS_, _FIELD_, _FUNCTION_)
 

Detailed Description

Author
Petr Ohlidal
Date
12/2013

Definition in file RigDef_Validator.cpp.

Macro Definition Documentation

◆ CHECK_SECTION_IN_ALL_MODULES

#define CHECK_SECTION_IN_ALL_MODULES (   _CLASS_,
  _FIELD_,
  _FUNCTION_ 
)
Value:
{ \
std::list<std::shared_ptr<RigDef::Document::Module>>::iterator module_itor = m_selected_modules.begin(); \
for (; module_itor != m_selected_modules.end(); module_itor++) \
{ \
std::vector<_CLASS_>::iterator section_itor = module_itor->get()->_FIELD_.begin(); \
for (; section_itor != module_itor->get()->_FIELD_.end(); section_itor++) \
{ \
if (! _FUNCTION_(*section_itor))\
{ \
section_itor = module_itor->get()->_FIELD_.erase(section_itor); \
if (section_itor == module_itor->get()->_FIELD_.end()) \
{ \
break; \
} \
} \
} \
} \
}

Definition at line 33 of file RigDef_Validator.cpp.