RigsofRods
Soft-body Physics Simulation
Public Member Functions | Protected Member Functions | Protected Attributes
RigDef::Serializer Class Reference

Serializes the RigDef::Document data structure to file. More...

#include <RigDef_Serializer.h>

Public Member Functions

 Serializer (RigDef::DocumentPtr rig_def, Ogre::String const &file_path)
 
virtual ~Serializer ()
 
void Serialize ()
 

Protected Member Functions

void ProcessAuthors (Document::Module *module)
 
void ProcessGlobals (Document::Module *module)
 
void ProcessDescription (Document::Module *module)
 
void ProcessGuid (Document::Module *module)
 
void ProcessFileinfo (Document::Module *module)
 
void WriteFlags ()
 
void ProcessHelp (Document::Module *module)
 
void ProcessCinecam (Document::Module *)
 
void ProcessNodes (Document::Module *)
 
void ProcessNode (Node &node)
 
void ProcessNodeDefaults (NodeDefaults *node_defaults)
 
void ProcessNodeOptions (unsigned int options)
 
void ProcessBeams (Document::Module *)
 
void ProcessBeamDefaults (BeamDefaults *beam_defaults, const char *prefix="")
 
void ProcessBeam (Beam &beam)
 
void ProcessShocks (Document::Module *)
 
void ProcessShocks2 (Document::Module *)
 
void ProcessShocks3 (Document::Module *)
 
void ProcessShock (Shock &def)
 
void ProcessShock2 (Shock2 &def)
 
void ProcessShock3 (Shock3 &def)
 
void ProcessHydros (Document::Module *)
 
void ProcessHydro (Hydro &def)
 
void ProcessRotators (Document::Module *module)
 
void ProcessRotators2 (Document::Module *module)
 
void ProcessCommands2 (Document::Module *)
 
void ProcessCommand2 (Command2 &def)
 
void ProcessSlideNodes (Document::Module *module)
 
void ProcessRopes (Document::Module *module)
 
void ProcessFixes (Document::Module *module)
 
void ProcessTies (Document::Module *module)
 
void ProcessEngine (Document::Module *module)
 
void ProcessEngoption (Document::Module *module)
 
void ProcessBrakes (Document::Module *module)
 
void ProcessAntiLockBrakes (Document::Module *module)
 
void ProcessTractionControl (Document::Module *module)
 
void ProcessTorqueCurve (Document::Module *module)
 
void ProcessCruiseControl (Document::Module *module)
 
void ProcessSpeedLimiter (Document::Module *module)
 
void ProcessAxles (Document::Module *module)
 
void ProcessTransferCase (Document::Module *module)
 
void ProcessInterAxles (Document::Module *module)
 
void ProcessMeshWheels (Document::Module *module)
 
void ProcessMeshWheels2 (Document::Module *module)
 
void ProcessWheels (Document::Module *module)
 
void ProcessWheels2 (Document::Module *module)
 
void ProcessFlexBodyWheels (Document::Module *module)
 
void ProcessAnimators (Document::Module *module)
 
void ProcessContacters (Document::Module *module)
 
void ProcessTriggers (Document::Module *module)
 
void ProcessLockgroups (Document::Module *module)
 
void ProcessHooks (Document::Module *module)
 
void ProcessRailGroups (Document::Module *module)
 
void ProcessRopables (Document::Module *module)
 
void ProcessParticles (Document::Module *module)
 
void ProcessCollisionBoxes (Document::Module *module)
 
void ProcessManagedMaterialsAndOptions (Document::Module *module)
 
void ProcessFlares2 (Document::Module *module)
 
void ProcessMaterialFlareBindings (Document::Module *module)
 
void ProcessPropsAndAnimations (Document::Module *module)
 
void ProcessFlexbodies (Document::Module *module)
 
void ProcessDirectiveAddAnimation (RigDef::Animation &anim)
 
void ProcessSubmesh (Document::Module *module)
 
void ProcessSubmeshGroundmodel (Document::Module *module)
 
void ProcessExhausts (Document::Module *module)
 
void ProcessGuiSettings (Document::Module *module)
 
void ProcessSetSkeletonSettings (Document::Module *module)
 
void ProcessVideocamera (Document::Module *module)
 
void ProcessExtCamera (Document::Module *module)
 
void ProcessSoundsources (Document::Module *module)
 
void ProcessSoundsources2 (Document::Module *module)
 
void ProcessWings (Document::Module *module)
 
void ProcessAirbrakes (Document::Module *module)
 
void ProcessTurboprops (Document::Module *module)
 
void ProcessFusedrag (Document::Module *module)
 
void ProcessTurbojets (Document::Module *module)
 
void ProcessPistonprops (Document::Module *module)
 
void ProcessScrewprops (Document::Module *module)
 
void ExportBaseMeshWheel (BaseMeshWheel &def)
 

Protected Attributes

std::ofstream m_stream
 
Ogre::String m_file_path
 
RigDef::DocumentPtr m_rig_def
 
int m_float_precision
 
int m_float_width
 
int m_bool_width
 
int m_node_id_width
 
int m_command_key_width
 
int m_inertia_function_width
 

Detailed Description

Serializes the RigDef::Document data structure to file.

Author
Petr Ohlidal

Definition at line 39 of file RigDef_Serializer.h.

Constructor & Destructor Documentation

◆ Serializer()

Serializer::Serializer ( RigDef::DocumentPtr  rig_def,
Ogre::String const &  file_path 
)

Definition at line 39 of file RigDef_Serializer.cpp.

◆ ~Serializer()

Serializer::~Serializer ( )
virtual

Definition at line 50 of file RigDef_Serializer.cpp.

Member Function Documentation

◆ ExportBaseMeshWheel()

void Serializer::ExportBaseMeshWheel ( BaseMeshWheel def)
protected

Definition at line 1641 of file RigDef_Serializer.cpp.

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

◆ ProcessAirbrakes()

void Serializer::ProcessAirbrakes ( Document::Module module)
protected

Definition at line 263 of file RigDef_Serializer.cpp.

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

◆ ProcessAnimators()

void Serializer::ProcessAnimators ( Document::Module module)
protected

Definition at line 1251 of file RigDef_Serializer.cpp.

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

◆ ProcessAntiLockBrakes()

void Serializer::ProcessAntiLockBrakes ( Document::Module module)
protected

Definition at line 1478 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessAuthors()

void Serializer::ProcessAuthors ( Document::Module module)
protected

Definition at line 2588 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessAxles()

void Serializer::ProcessAxles ( Document::Module module)
protected

Definition at line 824 of file RigDef_Serializer.cpp.

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

◆ ProcessBeam()

void Serializer::ProcessBeam ( Beam beam)
protected

Definition at line 2291 of file RigDef_Serializer.cpp.

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

◆ ProcessBeamDefaults()

void Serializer::ProcessBeamDefaults ( BeamDefaults beam_defaults,
const char *  prefix = "" 
)
protected

Definition at line 2266 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessBeams()

void Serializer::ProcessBeams ( Document::Module module)
protected

Definition at line 1723 of file RigDef_Serializer.cpp.

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

◆ ProcessBrakes()

void Serializer::ProcessBrakes ( Document::Module module)
protected

Definition at line 1469 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessCinecam()

void Serializer::ProcessCinecam ( Document::Module module)
protected

Definition at line 1691 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessCollisionBoxes()

void Serializer::ProcessCollisionBoxes ( Document::Module module)
protected

Definition at line 800 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessCommand2()

void Serializer::ProcessCommand2 ( Command2 def)
protected

Definition at line 2053 of file RigDef_Serializer.cpp.

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

◆ ProcessCommands2()

void Serializer::ProcessCommands2 ( Document::Module module)
protected

Definition at line 1998 of file RigDef_Serializer.cpp.

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

◆ ProcessContacters()

void Serializer::ProcessContacters ( Document::Module module)
protected

Definition at line 1312 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessCruiseControl()

void Serializer::ProcessCruiseControl ( Document::Module module)
protected

Definition at line 902 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessDescription()

void Serializer::ProcessDescription ( Document::Module module)
protected

Definition at line 2574 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessDirectiveAddAnimation()

void Serializer::ProcessDirectiveAddAnimation ( RigDef::Animation anim)
protected

Definition at line 536 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessEngine()

void Serializer::ProcessEngine ( Document::Module module)
protected

Definition at line 1493 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessEngoption()

void Serializer::ProcessEngoption ( Document::Module module)
protected

Definition at line 1527 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessExhausts()

void Serializer::ProcessExhausts ( Document::Module module)
protected

Definition at line 452 of file RigDef_Serializer.cpp.

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

◆ ProcessExtCamera()

void Serializer::ProcessExtCamera ( Document::Module module)
protected

Definition at line 368 of file RigDef_Serializer.cpp.

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

◆ ProcessFileinfo()

void Serializer::ProcessFileinfo ( Document::Module module)
protected

Definition at line 2551 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessFixes()

void Serializer::ProcessFixes ( Document::Module module)
protected

Definition at line 1016 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessFlares2()

void Serializer::ProcessFlares2 ( Document::Module module)
protected

Definition at line 720 of file RigDef_Serializer.cpp.

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

◆ ProcessFlexbodies()

void Serializer::ProcessFlexbodies ( Document::Module module)
protected

Definition at line 599 of file RigDef_Serializer.cpp.

+ Here is the call graph for this function:

◆ ProcessFlexBodyWheels()

void Serializer::ProcessFlexBodyWheels ( Document::Module module)
protected

Definition at line 1420 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessFusedrag()

void Serializer::ProcessFusedrag ( Document::Module module)
protected

Definition at line 231 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessGlobals()

void Serializer::ProcessGlobals ( Document::Module module)
protected

Definition at line 2607 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessGuid()

void Serializer::ProcessGuid ( Document::Module module)
protected

Definition at line 2566 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessGuiSettings()

void Serializer::ProcessGuiSettings ( Document::Module module)
protected

Definition at line 438 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessHelp()

void Serializer::ProcessHelp ( Document::Module module)
protected

Definition at line 1565 of file RigDef_Serializer.cpp.

◆ ProcessHooks()

void Serializer::ProcessHooks ( Document::Module module)
protected

Definition at line 1137 of file RigDef_Serializer.cpp.

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

◆ ProcessHydro()

void Serializer::ProcessHydro ( Hydro def)
protected

Definition at line 2091 of file RigDef_Serializer.cpp.

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

◆ ProcessHydros()

void Serializer::ProcessHydros ( Document::Module module)
protected

Definition at line 1943 of file RigDef_Serializer.cpp.

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

◆ ProcessInterAxles()

void Serializer::ProcessInterAxles ( Document::Module module)
protected

Definition at line 853 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessLockgroups()

void Serializer::ProcessLockgroups ( Document::Module module)
protected

Definition at line 1171 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessManagedMaterialsAndOptions()

void Serializer::ProcessManagedMaterialsAndOptions ( Document::Module module)
protected

Definition at line 746 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessMaterialFlareBindings()

void Serializer::ProcessMaterialFlareBindings ( Document::Module module)
protected

Definition at line 704 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessMeshWheels()

void Serializer::ProcessMeshWheels ( Document::Module module)
protected

Definition at line 1663 of file RigDef_Serializer.cpp.

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

◆ ProcessMeshWheels2()

void Serializer::ProcessMeshWheels2 ( Document::Module module)
protected

Definition at line 1677 of file RigDef_Serializer.cpp.

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

◆ ProcessNode()

void Serializer::ProcessNode ( Node node)
protected

Definition at line 2492 of file RigDef_Serializer.cpp.

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

◆ ProcessNodeDefaults()

void Serializer::ProcessNodeDefaults ( NodeDefaults node_defaults)
protected

Definition at line 2429 of file RigDef_Serializer.cpp.

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

◆ ProcessNodeOptions()

void Serializer::ProcessNodeOptions ( unsigned int  options)
protected

Definition at line 2449 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessNodes()

void Serializer::ProcessNodes ( Document::Module module)
protected

Definition at line 2326 of file RigDef_Serializer.cpp.

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

◆ ProcessParticles()

void Serializer::ProcessParticles ( Document::Module module)
protected

Definition at line 952 of file RigDef_Serializer.cpp.

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

◆ ProcessPistonprops()

void Serializer::ProcessPistonprops ( Document::Module module)
protected

Definition at line 160 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessPropsAndAnimations()

void Serializer::ProcessPropsAndAnimations ( Document::Module module)
protected

Definition at line 648 of file RigDef_Serializer.cpp.

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

◆ ProcessRailGroups()

void Serializer::ProcessRailGroups ( Document::Module module)
protected

Definition at line 1062 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessRopables()

void Serializer::ProcessRopables ( Document::Module module)
protected

Definition at line 972 of file RigDef_Serializer.cpp.

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

◆ ProcessRopes()

void Serializer::ProcessRopes ( Document::Module module)
protected

Definition at line 1031 of file RigDef_Serializer.cpp.

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

◆ ProcessRotators()

void Serializer::ProcessRotators ( Document::Module module)
protected

Definition at line 1326 of file RigDef_Serializer.cpp.

+ Here is the call graph for this function:

◆ ProcessRotators2()

void Serializer::ProcessRotators2 ( Document::Module module)
protected

Definition at line 1370 of file RigDef_Serializer.cpp.

+ Here is the call graph for this function:

◆ ProcessScrewprops()

void Serializer::ProcessScrewprops ( Document::Module module)
protected

Definition at line 211 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessSetSkeletonSettings()

void Serializer::ProcessSetSkeletonSettings ( Document::Module module)
protected

Definition at line 432 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessShock()

void Serializer::ProcessShock ( Shock def)
protected

Definition at line 2130 of file RigDef_Serializer.cpp.

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

◆ ProcessShock2()

void Serializer::ProcessShock2 ( Shock2 def)
protected

Definition at line 2170 of file RigDef_Serializer.cpp.

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

◆ ProcessShock3()

void Serializer::ProcessShock3 ( Shock3 def)
protected

Definition at line 2219 of file RigDef_Serializer.cpp.

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

◆ ProcessShocks()

void Serializer::ProcessShocks ( Document::Module module)
protected

Definition at line 1778 of file RigDef_Serializer.cpp.

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

◆ ProcessShocks2()

void Serializer::ProcessShocks2 ( Document::Module module)
protected

Definition at line 1833 of file RigDef_Serializer.cpp.

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

◆ ProcessShocks3()

void Serializer::ProcessShocks3 ( Document::Module module)
protected

Definition at line 1888 of file RigDef_Serializer.cpp.

+ Here is the call graph for this function:

◆ ProcessSlideNodes()

void Serializer::ProcessSlideNodes ( Document::Module module)
protected

Definition at line 1088 of file RigDef_Serializer.cpp.

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

◆ ProcessSoundsources()

void Serializer::ProcessSoundsources ( Document::Module module)
protected

Definition at line 332 of file RigDef_Serializer.cpp.

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

◆ ProcessSoundsources2()

void Serializer::ProcessSoundsources2 ( Document::Module module)
protected

Definition at line 349 of file RigDef_Serializer.cpp.

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

◆ ProcessSpeedLimiter()

void Serializer::ProcessSpeedLimiter ( Document::Module module)
protected

Definition at line 918 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessSubmesh()

void Serializer::ProcessSubmesh ( Document::Module module)
protected

Definition at line 477 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessSubmeshGroundmodel()

void Serializer::ProcessSubmeshGroundmodel ( Document::Module module)
protected

Definition at line 471 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessTies()

void Serializer::ProcessTies ( Document::Module module)
protected

Definition at line 991 of file RigDef_Serializer.cpp.

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

◆ ProcessTorqueCurve()

void Serializer::ProcessTorqueCurve ( Document::Module module)
protected

Definition at line 929 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessTractionControl()

void Serializer::ProcessTractionControl ( Document::Module module)
protected

Definition at line 1453 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessTransferCase()

void Serializer::ProcessTransferCase ( Document::Module module)
protected

Definition at line 882 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessTriggers()

void Serializer::ProcessTriggers ( Document::Module module)
protected

Definition at line 1193 of file RigDef_Serializer.cpp.

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

◆ ProcessTurbojets()

void Serializer::ProcessTurbojets ( Document::Module module)
protected

Definition at line 186 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessTurboprops()

void Serializer::ProcessTurboprops ( Document::Module module)
protected

Definition at line 239 of file RigDef_Serializer.cpp.

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

◆ ProcessVideocamera()

void Serializer::ProcessVideocamera ( Document::Module module)
protected

Definition at line 393 of file RigDef_Serializer.cpp.

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

◆ ProcessWheels()

void Serializer::ProcessWheels ( Document::Module module)
protected

Definition at line 1609 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessWheels2()

void Serializer::ProcessWheels2 ( Document::Module module)
protected

Definition at line 1574 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

◆ ProcessWings()

void Serializer::ProcessWings ( Document::Module module)
protected

Definition at line 294 of file RigDef_Serializer.cpp.

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

◆ Serialize()

void Serializer::Serialize ( )

Definition at line 53 of file RigDef_Serializer.cpp.

+ Here is the call graph for this function:

◆ WriteFlags()

void Serializer::WriteFlags ( )
protected

Definition at line 2511 of file RigDef_Serializer.cpp.

+ Here is the caller graph for this function:

Field Documentation

◆ m_bool_width

int RigDef::Serializer::m_bool_width
protected

Definition at line 165 of file RigDef_Serializer.h.

◆ m_command_key_width

int RigDef::Serializer::m_command_key_width
protected

Definition at line 167 of file RigDef_Serializer.h.

◆ m_file_path

Ogre::String RigDef::Serializer::m_file_path
protected

Definition at line 161 of file RigDef_Serializer.h.

◆ m_float_precision

int RigDef::Serializer::m_float_precision
protected

Definition at line 163 of file RigDef_Serializer.h.

◆ m_float_width

int RigDef::Serializer::m_float_width
protected

Definition at line 164 of file RigDef_Serializer.h.

◆ m_inertia_function_width

int RigDef::Serializer::m_inertia_function_width
protected

Definition at line 168 of file RigDef_Serializer.h.

◆ m_node_id_width

int RigDef::Serializer::m_node_id_width
protected

Definition at line 166 of file RigDef_Serializer.h.

◆ m_rig_def

RigDef::DocumentPtr RigDef::Serializer::m_rig_def
protected

Definition at line 162 of file RigDef_Serializer.h.

◆ m_stream

std::ofstream RigDef::Serializer::m_stream
protected

Definition at line 160 of file RigDef_Serializer.h.


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