se_core::String Class Reference

Simple string container. More...

#include <String.hpp>

List of all members.

Public Member Functions

 String ()
 String (const char *data)
 String (char *data)
 String (const char *data, int toPos)
 ~String ()
void set (const char *data)
void set (char *data)
void reset ()
void copy (const char *data)
void copy (const char *data, int toPos)
 toPos of zero or negative is from end of string
const char * get () const
const char * ext (char delimiter, bool mustFind=true) const
char * copyValue () const
bool isEmpty () const
int len () const
void append (const char *s)
int compare (const String &s) const
int compare (const char *s) const
bool equals (const String &s) const
bool equals (const char *s) const


Detailed Description

Simple string container.

Contains a C-style string (char array) and stores a flag which signifies wether the contained string should be destroyed when a new value is set or the String object itself is destroyed.

The destruction flag is useful when mixing hardcoded constant strings, strings located in ROM and dynamically created strings for the same purpose.

Definition at line 36 of file String.hpp.


Constructor & Destructor Documentation

se_core::String::String  ) 
 

Definition at line 28 of file String.cpp.

se_core::String::String const char *  data  ) 
 

Definition at line 32 of file String.cpp.

se_core::String::String char *  data  ) 
 

Definition at line 36 of file String.cpp.

se_core::String::String const char *  data,
int  toPos
 

Definition at line 41 of file String.cpp.

se_core::String::~String  ) 
 

Definition at line 46 of file String.cpp.


Member Function Documentation

void se_core::String::append const char *  s  ) 
 

Definition at line 132 of file String.cpp.

int se_core::String::compare const char *  s  )  const
 

Definition at line 153 of file String.cpp.

int se_core::String::compare const String s  )  const
 

Definition at line 141 of file String.cpp.

References get().

Referenced by se_ogre::ThingMOManager::addFactory(), se_ogre::ThingMOManager::addInfoList(), se_ogre::ThingMOManager::factoryIndex(), and se_ogre::ThingMOManager::infoIndex().

void se_core::String::copy const char *  data,
int  toPos
 

toPos of zero or negative is from end of string

Definition at line 84 of file String.cpp.

void se_core::String::copy const char *  data  ) 
 

Definition at line 74 of file String.cpp.

char * se_core::String::copyValue  )  const
 

Definition at line 118 of file String.cpp.

Referenced by se_basic::WangAreaGrid::addDefinition(), se_basic::SimpleAreaFactory::create(), se_basic::NavMeshAreaFactory::create(), and se_client::LanguageParser::parse().

bool se_core::String::equals const char *  s  )  const
 

Definition at line 171 of file String.cpp.

bool se_core::String::equals const String s  )  const
 

Definition at line 165 of file String.cpp.

Referenced by se_basic::SimpleActorParser::parse().

const char * se_core::String::ext char  delimiter,
bool  mustFind = true
const
 

Definition at line 104 of file String.cpp.

References AssertFatal.

const char* se_core::String::get  )  const [inline]
 

Definition at line 51 of file String.hpp.

Referenced by se_client::Phrase::addPhrase(), compare(), se_ogre::ThingMOManager::create(), se_err::Log::operator<<(), se_core::DictionaryParser::parse(), se_core::CutsceneParser::parse(), se_core::CompositeParser::parse(), se_core::StatComponentParser::parse(), se_core::ScriptComponentParser::parse(), se_core::PhysicsComponentParser::parse(), se_ogre::O3dThingParser::parse(), se_ogre::O3dConfigParser::parse(), se_client::PlayerParser::parse(), se_basic::WangAreaGridParser::parse(), se_basic::SimpleAreaThingParser::parse(), se_basic::SimpleAreaParser::parse(), se_basic::SignalComponentParser::parse(), se_basic::SimpleActorParser::parse(), se_ogre::O3dThingParser::parseThingInfo(), se_core::Property::Property(), se_core::TextInputStream::readDictionaryWord(), se_core::CutsceneParser::readMultiArea(), se_core::CutsceneParser::readMultiMember(), se_core::CutsceneParser::readMultiOwner(), se_core::CutsceneParser::readMultiQuest(), se_core::CutsceneParser::readScript(), and se_ogre::ThingEntity::setAnimation().

bool se_core::String::isEmpty  )  const
 

Definition at line 126 of file String.cpp.

Referenced by se_ogre::O3dThingParser::parseThingInfo(), and se_ogre::ThingEntity::setAnimation().

int se_core::String::len  )  const
 

Definition at line 176 of file String.cpp.

void se_core::String::reset  ) 
 

Definition at line 67 of file String.cpp.

void se_core::String::set char *  data  ) 
 

Definition at line 51 of file String.cpp.

void se_core::String::set const char *  data  ) 
 

Definition at line 59 of file String.cpp.

Referenced by se_basic::SimpleAreaFactory::create(), se_ogre::O3dThingParser::parse(), and se_ogre::O3dThingParser::parseThingInfo().


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

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:30 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo