RigsofRods
Soft-body Physics Simulation
Public Member Functions | Data Fields | Static Public Attributes
RoR::GenericDocument Struct Reference

#include <GenericFileFormat.h>

+ Inheritance diagram for RoR::GenericDocument:
+ Collaboration diagram for RoR::GenericDocument:

Public Member Functions

virtual ~GenericDocument ()
 
virtual void loadFromDataStream (Ogre::DataStreamPtr datastream, BitMask_t options=0)
 
virtual void saveToDataStream (Ogre::DataStreamPtr datastream)
 
virtual bool loadFromResource (std::string resource_name, std::string resource_group_name, BitMask_t options=0)
 
virtual bool saveToResource (std::string resource_name, std::string resource_group_name)
 
- Public Member Functions inherited from RefCountingObject< GenericDocument >
 RefCountingObject ()
 
virtual ~RefCountingObject ()
 
void AddRef ()
 
void Release ()
 

Data Fields

std::vector< char > string_pool
 
std::vector< Tokentokens
 
- Data Fields inherited from RefCountingObject< GenericDocument >
int m_refcount
 
std::mutex m_refcount_mtx
 

Static Public Attributes

static const BitMask_t OPTION_ALLOW_NAKED_STRINGS = BITMASK(1)
 Allow strings without quotes, for backwards compatibility. More...
 
static const BitMask_t OPTION_ALLOW_SLASH_COMMENTS = BITMASK(2)
 Allow comments starting with //. More...
 
static const BitMask_t OPTION_FIRST_LINE_IS_TITLE = BITMASK(3)
 First non-empty & non-comment line is a naked string with spaces. More...
 
static const BitMask_t OPTION_ALLOW_SEPARATOR_COLON = BITMASK(4)
 Allow ':' as separator between tokens. More...
 
static const BitMask_t OPTION_PARENTHESES_CAPTURE_SPACES = BITMASK(5)
 If non-empty NAKED string encounters '(', following spaces will be captured until matching ')' is found. More...
 
static const BitMask_t OPTION_ALLOW_BRACED_KEYWORDS = BITMASK(6)
 Allow INI-like '[keyword]' tokens. More...
 
static const BitMask_t OPTION_ALLOW_SEPARATOR_EQUALS = BITMASK(7)
 Allow '=' as separator between tokens. More...
 
static const BitMask_t OPTION_ALLOW_HASH_COMMENTS = BITMASK(8)
 Allow comments starting with #. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from RefCountingObject< GenericDocument >
static void RegisterRefCountingObject (AS_NAMESPACE_QUALIFIER asIScriptEngine *engine, const char *name)
 

Detailed Description

Definition at line 65 of file GenericFileFormat.h.

Constructor & Destructor Documentation

◆ ~GenericDocument()

virtual RoR::GenericDocument::~GenericDocument ( )
inlinevirtual

Definition at line 76 of file GenericFileFormat.h.

Member Function Documentation

◆ loadFromDataStream()

void GenericDocument::loadFromDataStream ( Ogre::DataStreamPtr  datastream,
BitMask_t  options = 0 
)
virtual

Definition at line 1000 of file GenericFileFormat.cpp.

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

◆ loadFromResource()

bool GenericDocument::loadFromResource ( std::string  resource_name,
std::string  resource_group_name,
BitMask_t  options = 0 
)
virtual

Definition at line 1083 of file GenericFileFormat.cpp.

+ Here is the call graph for this function:

◆ saveToDataStream()

void GenericDocument::saveToDataStream ( Ogre::DataStreamPtr  datastream)
virtual

Definition at line 1031 of file GenericFileFormat.cpp.

◆ saveToResource()

bool GenericDocument::saveToResource ( std::string  resource_name,
std::string  resource_group_name 
)
virtual

Definition at line 1099 of file GenericFileFormat.cpp.

+ Here is the call graph for this function:

Field Documentation

◆ OPTION_ALLOW_BRACED_KEYWORDS

const BitMask_t RoR::GenericDocument::OPTION_ALLOW_BRACED_KEYWORDS = BITMASK(6)
static

Allow INI-like '[keyword]' tokens.

Definition at line 72 of file GenericFileFormat.h.

◆ OPTION_ALLOW_HASH_COMMENTS

const BitMask_t RoR::GenericDocument::OPTION_ALLOW_HASH_COMMENTS = BITMASK(8)
static

Allow comments starting with #.

Definition at line 74 of file GenericFileFormat.h.

◆ OPTION_ALLOW_NAKED_STRINGS

const BitMask_t RoR::GenericDocument::OPTION_ALLOW_NAKED_STRINGS = BITMASK(1)
static

Allow strings without quotes, for backwards compatibility.

Definition at line 67 of file GenericFileFormat.h.

◆ OPTION_ALLOW_SEPARATOR_COLON

const BitMask_t RoR::GenericDocument::OPTION_ALLOW_SEPARATOR_COLON = BITMASK(4)
static

Allow ':' as separator between tokens.

Definition at line 70 of file GenericFileFormat.h.

◆ OPTION_ALLOW_SEPARATOR_EQUALS

const BitMask_t RoR::GenericDocument::OPTION_ALLOW_SEPARATOR_EQUALS = BITMASK(7)
static

Allow '=' as separator between tokens.

Definition at line 73 of file GenericFileFormat.h.

◆ OPTION_ALLOW_SLASH_COMMENTS

const BitMask_t RoR::GenericDocument::OPTION_ALLOW_SLASH_COMMENTS = BITMASK(2)
static

Allow comments starting with //.

Definition at line 68 of file GenericFileFormat.h.

◆ OPTION_FIRST_LINE_IS_TITLE

const BitMask_t RoR::GenericDocument::OPTION_FIRST_LINE_IS_TITLE = BITMASK(3)
static

First non-empty & non-comment line is a naked string with spaces.

Definition at line 69 of file GenericFileFormat.h.

◆ OPTION_PARENTHESES_CAPTURE_SPACES

const BitMask_t RoR::GenericDocument::OPTION_PARENTHESES_CAPTURE_SPACES = BITMASK(5)
static

If non-empty NAKED string encounters '(', following spaces will be captured until matching ')' is found.

Definition at line 71 of file GenericFileFormat.h.

◆ string_pool

std::vector<char> RoR::GenericDocument::string_pool

Definition at line 76 of file GenericFileFormat.h.

◆ tokens

std::vector<Token> RoR::GenericDocument::tokens

Definition at line 79 of file GenericFileFormat.h.


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