RigsofRods
Soft-body Physics Simulation
Data Structures | Public Member Functions | Private Member Functions | Private Attributes
RigDef::Validator Class Reference

Performs a formal validation of the file (missing required parts, conflicts of modules, etc...) More...

#include <RigDef_Validator.h>

Data Structures

struct  Message
 

Public Member Functions

void Setup (RigDef::DocumentPtr file)
 Prepares the validation. More...
 
bool AddModule (Ogre::String const &module_name)
 Adds a vehicle module to the validated configuration. More...
 
bool Validate ()
 
void SetCheckBeams (bool check_beams)
 

Private Member Functions

bool CheckSectionSubmeshGroundmodel ()
 Inline-ection 'submesh_groundmodel', unique across all modules. More...
 
bool CheckGearbox ()
 Checks there's at least 1 forward gear. More...
 
void AddMessage (Validator::Message::Type type, Ogre::String const &text)
 
bool CheckShock2 (RigDef::Shock2 &shock2)
 
bool CheckShock3 (RigDef::Shock3 &shock3)
 
bool CheckAnimator (RigDef::Animator &def)
 
bool CheckCommand (RigDef::Command2 &def)
 
bool CheckTrigger (RigDef::Trigger &def)
 
bool CheckVideoCamera (RigDef::VideoCamera &def)
 Section 'videocamera'. More...
 
bool CheckFlare2 (RigDef::Flare2 &def)
 

Private Attributes

RigDef::DocumentPtr m_file
 The parsed input file. More...
 
std::list< std::shared_ptr< RigDef::Document::Module > > m_selected_modules
 
bool m_check_beams
 

Detailed Description

Performs a formal validation of the file (missing required parts, conflicts of modules, etc...)

Definition at line 47 of file RigDef_Validator.h.

Member Function Documentation

◆ AddMessage()

void RigDef::Validator::AddMessage ( Validator::Message::Type  type,
Ogre::String const &  text 
)
private

Definition at line 92 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddModule()

bool RigDef::Validator::AddModule ( Ogre::String const &  module_name)

Adds a vehicle module to the validated configuration.

Parameters
module_nameA module from the validated rig-def file.

Definition at line 141 of file RigDef_Validator.cpp.

◆ CheckAnimator()

bool RigDef::Validator::CheckAnimator ( RigDef::Animator def)
private

Definition at line 323 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckCommand()

bool RigDef::Validator::CheckCommand ( RigDef::Command2 def)
private

Definition at line 342 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckFlare2()

bool RigDef::Validator::CheckFlare2 ( RigDef::Flare2 def)
private

Definition at line 369 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckGearbox()

bool RigDef::Validator::CheckGearbox ( )
private

Checks there's at least 1 forward gear.

Definition at line 154 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckSectionSubmeshGroundmodel()

bool RigDef::Validator::CheckSectionSubmeshGroundmodel ( )
private

Inline-ection 'submesh_groundmodel', unique across all modules.

Definition at line 114 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckShock2()

bool RigDef::Validator::CheckShock2 ( RigDef::Shock2 shock2)
private

Definition at line 177 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckShock3()

bool RigDef::Validator::CheckShock3 ( RigDef::Shock3 shock3)
private

Definition at line 246 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckTrigger()

bool RigDef::Validator::CheckTrigger ( RigDef::Trigger def)
private

Definition at line 392 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckVideoCamera()

bool RigDef::Validator::CheckVideoCamera ( RigDef::VideoCamera def)
private

Section 'videocamera'.

Definition at line 454 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:

◆ SetCheckBeams()

void RigDef::Validator::SetCheckBeams ( bool  check_beams)
inline

Definition at line 77 of file RigDef_Validator.h.

+ Here is the caller graph for this function:

◆ Setup()

void RigDef::Validator::Setup ( RigDef::DocumentPtr  file)

Prepares the validation.

Definition at line 85 of file RigDef_Validator.cpp.

+ Here is the caller graph for this function:

◆ Validate()

bool RigDef::Validator::Validate ( )

Definition at line 56 of file RigDef_Validator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ m_check_beams

bool RigDef::Validator::m_check_beams
private

Definition at line 123 of file RigDef_Validator.h.

◆ m_file

RigDef::DocumentPtr RigDef::Validator::m_file
private

The parsed input file.

Definition at line 121 of file RigDef_Validator.h.

◆ m_selected_modules

std::list<std::shared_ptr<RigDef::Document::Module> > RigDef::Validator::m_selected_modules
private

Definition at line 122 of file RigDef_Validator.h.


The documentation for this class was generated from the following files: