#include <ParticleUniverseScriptSerializer.h>
|
| ParticleScriptSerializer (void) |
|
virtual | ~ParticleScriptSerializer (void) |
|
void | writeScript (const ParticleSystem *particleSystem, const String &fileName) |
|
const String & | writeScript (const ParticleSystem *particleSystem) |
|
void | writeLine (const String &s0, const String &s1, const String &s2, const String &s3, const String &s4, short indentation0=-1, short indentation1=-1, short indentation2=-1, short indentation3=-1, short indentation4=-1) |
|
void | writeLine (const String &s0, const String &s1, const String &s2, const String &s3, short indentation0=-1, short indentation1=-1, short indentation2=-1, short indentation3=-1) |
|
void | writeLine (const String &s0, const String &s1, const String &s2, short indentation0=-1, short indentation1=-1, short indentation2=-1) |
|
void | writeLine (const String &s0, const String &s1, short indentation0=-1, short indentation1=-1) |
|
void | writeLine (const String &s0, short indentation0=-1) |
|
void | setDefaultTabs (short tab0=0, short tab1=48, short tab2=52, short tab3=56, short tab4=60) |
|
void | setPath (const String &path) |
|
const short | getIndentation (void) const |
|
void | setIndentation (const short indentation) |
|
const String & | getKeyword (void) const |
|
void | setKeyword (const String &keyword) |
|
The ParticleScriptSerializer class is responsible for writing objects and attributes to a particle system script.
ParticleUniverse::ParticleScriptSerializer::ParticleScriptSerializer |
( |
void |
| ) |
|
virtual ParticleUniverse::ParticleScriptSerializer::~ParticleScriptSerializer |
( |
void |
| ) |
|
|
inlinevirtual |
void ParticleUniverse::ParticleScriptSerializer::_appendTabbedString |
( |
size_t |
index, |
|
|
String & |
base, |
|
|
const String & |
s, |
|
|
short |
indentation |
|
) |
| |
|
protected |
Concatenate base string and string 's', with the proper indentation.
void ParticleUniverse::ParticleScriptSerializer::_stream |
( |
const String & |
string | ) |
|
|
protected |
Writes to a file or to a string
const short ParticleUniverse::ParticleScriptSerializer::getIndentation |
( |
void |
| ) |
const |
Get/set the indentation. To be used in cases where it is unkown what the indentation is.
const String& ParticleUniverse::ParticleScriptSerializer::getKeyword |
( |
void |
| ) |
const |
Get/set the keyword. To be used in cases where it is unkown what the keyword is or in case serialisation is spread across multiple objects.
void ParticleUniverse::ParticleScriptSerializer::setDefaultTabs |
( |
short |
tab0 = 0 , |
|
|
short |
tab1 = 48 , |
|
|
short |
tab2 = 52 , |
|
|
short |
tab3 = 56 , |
|
|
short |
tab4 = 60 |
|
) |
| |
Set the default tab values. If a writeline doesn't contain any indentation value, the default tab values are used.
void ParticleUniverse::ParticleScriptSerializer::setIndentation |
( |
const short |
indentation | ) |
|
void ParticleUniverse::ParticleScriptSerializer::setKeyword |
( |
const String & |
keyword | ) |
|
void ParticleUniverse::ParticleScriptSerializer::setPath |
( |
const String & |
path | ) |
|
Set the directory to which files are serialized.
static String ParticleUniverse::ParticleScriptSerializer::toString |
( |
vector< Real > |
vector, |
|
|
bool |
applySqrt = false |
|
) |
| |
|
static |
Creates a string from a vector with Reals. This function contains an additional argument. If set to true, the square root is applied to all real values (don't ask!).
void ParticleUniverse::ParticleScriptSerializer::writeLine |
( |
const String & |
s0, |
|
|
const String & |
s1, |
|
|
const String & |
s2, |
|
|
const String & |
s3, |
|
|
const String & |
s4, |
|
|
short |
indentation0 = -1 , |
|
|
short |
indentation1 = -1 , |
|
|
short |
indentation2 = -1 , |
|
|
short |
indentation3 = -1 , |
|
|
short |
indentation4 = -1 |
|
) |
| |
Writes a line to a script file.
void ParticleUniverse::ParticleScriptSerializer::writeLine |
( |
const String & |
s0, |
|
|
const String & |
s1, |
|
|
const String & |
s2, |
|
|
const String & |
s3, |
|
|
short |
indentation0 = -1 , |
|
|
short |
indentation1 = -1 , |
|
|
short |
indentation2 = -1 , |
|
|
short |
indentation3 = -1 |
|
) |
| |
Writes a line to a script file.
void ParticleUniverse::ParticleScriptSerializer::writeLine |
( |
const String & |
s0, |
|
|
const String & |
s1, |
|
|
const String & |
s2, |
|
|
short |
indentation0 = -1 , |
|
|
short |
indentation1 = -1 , |
|
|
short |
indentation2 = -1 |
|
) |
| |
Writes a line to a script file.
void ParticleUniverse::ParticleScriptSerializer::writeLine |
( |
const String & |
s0, |
|
|
const String & |
s1, |
|
|
short |
indentation0 = -1 , |
|
|
short |
indentation1 = -1 |
|
) |
| |
Writes a line to a script file.
void ParticleUniverse::ParticleScriptSerializer::writeLine |
( |
const String & |
s0, |
|
|
short |
indentation0 = -1 |
|
) |
| |
Writes a line to a script file.
void ParticleUniverse::ParticleScriptSerializer::writeScript |
( |
const ParticleSystem * |
particleSystem, |
|
|
const String & |
fileName |
|
) |
| |
const String& ParticleUniverse::ParticleScriptSerializer::writeScript |
( |
const ParticleSystem * |
particleSystem | ) |
|
If no filename has been given, serialisation is done to a string.
Context ParticleUniverse::ParticleScriptSerializer::context |
short ParticleUniverse::ParticleScriptSerializer::mIndentation |
|
protected |
String ParticleUniverse::ParticleScriptSerializer::mKeyword |
|
protected |
String ParticleUniverse::ParticleScriptSerializer::mPath |
|
protected |
StringStream ParticleUniverse::ParticleScriptSerializer::mScript |
|
protected |
std::ofstream ParticleUniverse::ParticleScriptSerializer::mScriptFile |
|
protected |
String ParticleUniverse::ParticleScriptSerializer::mScriptString |
|
protected |
bool ParticleUniverse::ParticleScriptSerializer::mStreamToFile |
|
protected |
short ParticleUniverse::ParticleScriptSerializer::mTab[5] |
|
protected |
The documentation for this class was generated from the following file:
- ParticleUniverseScriptSerializer.h