Changeset 1634 for code/branches/gcc43/src/core
- Timestamp:
- Jun 29, 2008, 7:36:33 PM (17 years ago)
- Location:
- code/branches/gcc43/src/core
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gcc43/src/core/BaseObject.h
r1558 r1634 56 56 57 57 /** @brief Returns if the object was initialized (passed the object registration). @return True was the object is initialized */ 58 inlinebool isInitialized() const { return this->bInitialized_; }58 bool isInitialized() const { return this->bInitialized_; } 59 59 60 60 /** @brief Sets the name of the object. @param name The name */ 61 inlinevoid setName(const std::string& name) { this->name_ = name; this->changedName(); }61 void setName(const std::string& name) { this->name_ = name; this->changedName(); } 62 62 /** @brief Returns the name of the object. @return The name */ 63 inlineconst std::string& getName() const { return this->name_; }63 const std::string& getName() const { return this->name_; } 64 64 /** @brief This function gets called if the name of the object changes. */ 65 65 virtual void changedName() {} 66 66 67 67 /** @brief Sets the state of the objects activity. @param bActive True = active */ 68 inlinevoid setActivity(bool bActive) { this->bActive_ = bActive; this->changedActivity(); }68 void setActivity(bool bActive) { this->bActive_ = bActive; this->changedActivity(); } 69 69 /** @brief Returns the state of the objects activity. @return The state of the activity */ 70 inlinebool isActive() const { return this->bActive_; }70 bool isActive() const { return this->bActive_; } 71 71 /** @brief This function gets called if the activity of the object changes. */ 72 72 virtual void changedActivity() {} 73 73 74 74 /** @brief Sets the state of the objects visibility. @param bVisible True = visible */ 75 inlinevoid setVisibility(bool bVisible) { this->bVisible_ = bVisible; this->changedVisibility(); }75 void setVisibility(bool bVisible) { this->bVisible_ = bVisible; this->changedVisibility(); } 76 76 /** @brief Returns the state of the objects visibility. @return The state of the visibility */ 77 inlinebool isVisible() const { return this->bVisible_; }77 bool isVisible() const { return this->bVisible_; } 78 78 /** @brief This function gets called if the visibility of the object changes. */ 79 79 virtual void changedVisibility() {} 80 80 81 81 /** @brief Sets a pointer to the level that loaded this object. @param level The pointer to the level */ 82 inlinevoid setLevel(const Level* level) { this->level_ = level; }82 void setLevel(const Level* level) { this->level_ = level; } 83 83 /** @brief Returns a pointer to the level that loaded this object. @return The level */ 84 inlineconst Level* getLevel() const { return this->level_; }84 const Level* getLevel() const { return this->level_; } 85 85 const std::string& getLevelfile() const; 86 86 87 virtual inlinevoid setNamespace(Namespace* ns) { this->namespace_ = ns; }88 inlineNamespace* getNamespace() const { return this->namespace_; }87 virtual void setNamespace(Namespace* ns) { this->namespace_ = ns; } 88 Namespace* getNamespace() const { return this->namespace_; } 89 89 90 90 /** @brief Sets the indentation of the debug output in the Loader. @param indentation The indentation */ 91 inlinevoid setLoaderIndentation(const std::string& indentation) { this->loaderIndentation_ = indentation; }91 void setLoaderIndentation(const std::string& indentation) { this->loaderIndentation_ = indentation; } 92 92 /** @brief Returns the indentation of the debug output in the Loader. @return The indentation */ 93 inlineconst std::string& getLoaderIndentation() const { return this->loaderIndentation_; }93 const std::string& getLoaderIndentation() const { return this->loaderIndentation_; } 94 94 95 95 private: -
code/branches/gcc43/src/core/CommandEvaluation.h
r1505 r1634 69 69 bool isValid() const; 70 70 71 inlineConsoleCommand* getConsoleCommand() const71 ConsoleCommand* getConsoleCommand() const 72 72 { return this->function_; } 73 inlineconst std::string& getOriginalCommand() const73 const std::string& getOriginalCommand() const 74 74 { return this->originalCommand_; } 75 inlineconst std::string& getCommand() const75 const std::string& getCommand() const 76 76 { return this->command_; } 77 77 78 inlinevoid setAdditionalParameter(const std::string& param)78 void setAdditionalParameter(const std::string& param) 79 79 { this->additionalParameter_ = param; this->bEvaluatedParams_ = false; } 80 inlinestd::string getAdditionalParameter() const80 std::string getAdditionalParameter() const 81 81 { return (this->additionalParameter_ != "") ? (" " + this->additionalParameter_) : ""; } 82 82 -
code/branches/gcc43/src/core/ConfigFileManager.h
r1505 r1634 82 82 { 83 83 public: 84 inlineConfigFileEntryValue(const std::string& name, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : name_(name), value_(value), bString_(bString), additionalComment_(additionalComment) {}85 inlinevirtual ~ConfigFileEntryValue() {}86 87 inlinevirtual const std::string& getName() const84 ConfigFileEntryValue(const std::string& name, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : name_(name), value_(value), bString_(bString), additionalComment_(additionalComment) {} 85 virtual ~ConfigFileEntryValue() {} 86 87 virtual const std::string& getName() const 88 88 { return this->name_; } 89 89 90 inlinevirtual void setComment(const std::string& comment)90 virtual void setComment(const std::string& comment) 91 91 { this->additionalComment_ = comment; } 92 92 … … 94 94 virtual std::string getValue() const; 95 95 96 inlinebool isString() const96 bool isString() const 97 97 { return this->bString_; } 98 inlinevoid setString(bool bString)98 void setString(bool bString) 99 99 { this->bString_ = bString; } 100 100 … … 115 115 { 116 116 public: 117 inlineConfigFileEntryVectorValue(const std::string& name, unsigned int index, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : ConfigFileEntryValue(name, value, bString, additionalComment), index_(index) {}118 inlinevirtual ~ConfigFileEntryVectorValue() {}119 120 inlinevirtual unsigned int getIndex() const117 ConfigFileEntryVectorValue(const std::string& name, unsigned int index, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : ConfigFileEntryValue(name, value, bString, additionalComment), index_(index) {} 118 virtual ~ConfigFileEntryVectorValue() {} 119 120 virtual unsigned int getIndex() const 121 121 { return this->index_; } 122 122 … … 134 134 { 135 135 public: 136 inlineConfigFileEntryComment(const std::string& comment) : comment_(comment) {}137 inlinevirtual ~ConfigFileEntryComment() {}138 139 inlinevirtual const std::string& getName() const136 ConfigFileEntryComment(const std::string& comment) : comment_(comment) {} 137 virtual ~ConfigFileEntryComment() {} 138 139 virtual const std::string& getName() const 140 140 { return this->comment_; } 141 141 142 inlinevirtual void setComment(const std::string& comment)142 virtual void setComment(const std::string& comment) 143 143 { this->comment_ = comment; } 144 144 145 inlinevirtual void setValue(const std::string& value)145 virtual void setValue(const std::string& value) 146 146 {} 147 inlinevirtual std::string getValue() const147 virtual std::string getValue() const 148 148 { return this->comment_; } 149 149 150 inlinevoid setString(bool bString) {}151 152 inlinevirtual std::string getFileEntry() const150 void setString(bool bString) {} 151 152 virtual std::string getFileEntry() const 153 153 { return this->comment_; } 154 154 … … 166 166 167 167 public: 168 inlineConfigFileSection(const std::string& name, const std::string& additionalComment = "") : name_(name), additionalComment_(additionalComment), bUpdated_(false) {}168 ConfigFileSection(const std::string& name, const std::string& additionalComment = "") : name_(name), additionalComment_(additionalComment), bUpdated_(false) {} 169 169 ~ConfigFileSection(); 170 170 171 inlineconst std::string& getName() const171 const std::string& getName() const 172 172 { return this->name_; } 173 173 174 inlinevoid setComment(const std::string& comment)174 void setComment(const std::string& comment) 175 175 { this->additionalComment_ = comment; } 176 176 177 inlinevoid setValue(const std::string& name, const std::string& value, bool bString)177 void setValue(const std::string& name, const std::string& value, bool bString) 178 178 { this->getEntry(name, value, bString)->setValue(value); } 179 inlinestd::string getValue(const std::string& name, const std::string& fallback, bool bString)179 std::string getValue(const std::string& name, const std::string& fallback, bool bString) 180 180 { return this->getEntry(name, fallback, bString)->getValue(); } 181 181 182 inlinevoid setValue(const std::string& name, unsigned int index, const std::string& value, bool bString)182 void setValue(const std::string& name, unsigned int index, const std::string& value, bool bString) 183 183 { this->getEntry(name, index, value, bString)->setValue(value); } 184 inlinestd::string getValue(const std::string& name, unsigned int index, const std::string& fallback, bool bString)184 std::string getValue(const std::string& name, unsigned int index, const std::string& fallback, bool bString) 185 185 { return this->getEntry(name, index, fallback, bString)->getValue(); } 186 186 … … 201 201 std::list<ConfigFileEntry*>::iterator getEntryIterator(const std::string& name, unsigned int index, const std::string& fallback, bool bString); 202 202 203 inlineConfigFileEntry* getEntry(const std::string& name, const std::string& fallback, bool bString)203 ConfigFileEntry* getEntry(const std::string& name, const std::string& fallback, bool bString) 204 204 { return (*this->getEntryIterator(name, fallback, bString)); } 205 inlineConfigFileEntry* getEntry(const std::string& name, unsigned int index, const std::string& fallback, bool bString)205 ConfigFileEntry* getEntry(const std::string& name, unsigned int index, const std::string& fallback, bool bString) 206 206 { return (*this->getEntryIterator(name, index, fallback, bString)); } 207 207 … … 219 219 { 220 220 public: 221 inlineConfigFile(const std::string& filename) : filename_(filename), bUpdated_(false) {}221 ConfigFile(const std::string& filename) : filename_(filename), bUpdated_(false) {} 222 222 ~ConfigFile(); 223 223 … … 227 227 void clean(bool bCleanComments = false); 228 228 229 inlinevoid setValue(const std::string& section, const std::string& name, const std::string& value, bool bString)229 void setValue(const std::string& section, const std::string& name, const std::string& value, bool bString) 230 230 { this->getSection(section)->setValue(name, value, bString); this->save(); } 231 inlinestd::string getValue(const std::string& section, const std::string& name, const std::string& fallback, bool bString)231 std::string getValue(const std::string& section, const std::string& name, const std::string& fallback, bool bString) 232 232 { std::string output = this->getSection(section)->getValue(name, fallback, bString); this->saveIfUpdated(); return output; } 233 233 234 inlinevoid setValue(const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString)234 void setValue(const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString) 235 235 { this->getSection(section)->setValue(name, index, value, bString); this->save(); } 236 inlinestd::string getValue(const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString)236 std::string getValue(const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString) 237 237 { std::string output = this->getSection(section)->getValue(name, index, fallback, bString); this->saveIfUpdated(); return output; } 238 238 239 inlinevoid deleteVectorEntries(const std::string& section, const std::string& name, unsigned int startindex = 0)239 void deleteVectorEntries(const std::string& section, const std::string& name, unsigned int startindex = 0) 240 240 { this->getSection(section)->deleteVectorEntries(name, startindex); } 241 inlineunsigned int getVectorSize(const std::string& section, const std::string& name)241 unsigned int getVectorSize(const std::string& section, const std::string& name) 242 242 { return this->getSection(section)->getVectorSize(name); } 243 243 … … 271 271 void clean(ConfigFileType type, bool bCleanComments = false); 272 272 273 inlinevoid setValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& value, bool bString)273 void setValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& value, bool bString) 274 274 { this->getFile(type)->setValue(section, name, value, bString); } 275 inlinestd::string getValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& fallback, bool bString)275 std::string getValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& fallback, bool bString) 276 276 { return this->getFile(type)->getValue(section, name, fallback, bString); } 277 277 278 inlinevoid setValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString)278 void setValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString) 279 279 { this->getFile(type)->setValue(section, name, index, value, bString); } 280 inlinestd::string getValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString)280 std::string getValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString) 281 281 { return this->getFile(type)->getValue(section, name, index, fallback, bString); } 282 282 283 inlinevoid deleteVectorEntries(ConfigFileType type, const std::string& section, const std::string& name, unsigned int startindex = 0)283 void deleteVectorEntries(ConfigFileType type, const std::string& section, const std::string& name, unsigned int startindex = 0) 284 284 { this->getFile(type)->deleteVectorEntries(section, name, startindex); } 285 inlineunsigned int getVectorSize(ConfigFileType type, const std::string& section, const std::string& name)285 unsigned int getVectorSize(ConfigFileType type, const std::string& section, const std::string& name) 286 286 { return this->getFile(type)->getVectorSize(section, name); } 287 287 -
code/branches/gcc43/src/core/ConfigValueContainer.h
r1505 r1634 79 79 /** @brief Returns the configured value. @param value This is only needed to determine the right type. @return The value */ 80 80 template <typename T> 81 inlineConfigValueContainer& getValue(T* value)81 ConfigValueContainer& getValue(T* value) 82 82 { this->value_.getValue(value); return *this; } 83 83 template <typename T> 84 inlineConfigValueContainer& getValue(std::vector<T>* value)84 ConfigValueContainer& getValue(std::vector<T>* value) 85 85 { 86 86 value->clear(); … … 91 91 92 92 template <typename T> 93 inlinevoid setVectorType(const std::vector<T>& value)93 void setVectorType(const std::vector<T>& value) 94 94 { 95 95 this->value_ = T(); … … 97 97 } 98 98 99 inlineconst std::string& getName() const99 const std::string& getName() const 100 100 { return this->varname_; } 101 inlinebool isVector() const101 bool isVector() const 102 102 { return this->bIsVector_; } 103 inlineunsigned int getVectorSize() const103 unsigned int getVectorSize() const 104 104 { return this->valueVector_.size(); } 105 105 … … 119 119 120 120 /** @brief Converts the config-value to a string. @return The string */ 121 inlinestd::string toString() const121 std::string toString() const 122 122 { return this->value_.toString(); } 123 123 /** @brief Returns the typename of the assigned config-value. @return The typename */ 124 inlinestd::string getTypename() const124 std::string getTypename() const 125 125 { return this->value_.getTypename(); } 126 126 -
code/branches/gcc43/src/core/Identifier.h
r1581 r1634 100 100 public: 101 101 /** @brief Sets the Factory. @param factory The factory to assign */ 102 inlinevoid addFactory(BaseFactory* factory) { this->factory_ = factory; }102 void addFactory(BaseFactory* factory) { this->factory_ = factory; } 103 103 104 104 BaseObject* fabricate(); … … 115 115 116 116 /** @brief Returns the name of the class the Identifier belongs to. @return The name */ 117 inlineconst std::string& getName() const { return this->name_; }117 const std::string& getName() const { return this->name_; } 118 118 119 119 120 120 /** @brief Returns the parents of the class the Identifier belongs to. @return The list of all parents */ 121 inlineconst std::set<const Identifier*>& getParents() const { return this->parents_; }121 const std::set<const Identifier*>& getParents() const { return this->parents_; } 122 122 /** @brief Returns the begin-iterator of the parents-list. @return The begin-iterator */ 123 inlinestd::set<const Identifier*>::const_iterator getParentsBegin() const { return this->parents_.begin(); }123 std::set<const Identifier*>::const_iterator getParentsBegin() const { return this->parents_.begin(); } 124 124 /** @brief Returns the end-iterator of the parents-list. @return The end-iterator */ 125 inlinestd::set<const Identifier*>::const_iterator getParentsEnd() const { return this->parents_.end(); }125 std::set<const Identifier*>::const_iterator getParentsEnd() const { return this->parents_.end(); } 126 126 127 127 /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */ 128 inlineconst std::set<const Identifier*>& getChildren() const { return (*this->children_); }128 const std::set<const Identifier*>& getChildren() const { return (*this->children_); } 129 129 /** @brief Returns the begin-iterator of the children-list. @return The begin-iterator */ 130 inlinestd::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_->begin(); }130 std::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_->begin(); } 131 131 /** @brief Returns the end-iterator of the children-list. @return The end-iterator */ 132 inlinestd::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_->end(); }132 std::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_->end(); } 133 133 134 134 /** @brief Returns the direct parents of the class the Identifier belongs to. @return The list of all direct parents */ 135 inlineconst std::set<const Identifier*>& getDirectParents() const { return this->directParents_; }135 const std::set<const Identifier*>& getDirectParents() const { return this->directParents_; } 136 136 /** @brief Returns the begin-iterator of the direct-parents-list. @return The begin-iterator */ 137 inlinestd::set<const Identifier*>::const_iterator getDirectParentsBegin() const { return this->directParents_.begin(); }137 std::set<const Identifier*>::const_iterator getDirectParentsBegin() const { return this->directParents_.begin(); } 138 138 /** @brief Returns the end-iterator of the direct-parents-list. @return The end-iterator */ 139 inlinestd::set<const Identifier*>::const_iterator getDirectParentsEnd() const { return this->directParents_.end(); }139 std::set<const Identifier*>::const_iterator getDirectParentsEnd() const { return this->directParents_.end(); } 140 140 141 141 /** @brief Returns the direct children the class the Identifier belongs to. @return The list of all direct children */ 142 inlineconst std::set<const Identifier*>& getDirectChildren() const { return (*this->directChildren_); }142 const std::set<const Identifier*>& getDirectChildren() const { return (*this->directChildren_); } 143 143 /** @brief Returns the begin-iterator of the direct-children-list. @return The begin-iterator */ 144 inlinestd::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_->begin(); }144 std::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_->begin(); } 145 145 /** @brief Returns the end-iterator of the direct-children-list. @return The end-iterator */ 146 inlinestd::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_->end(); }146 std::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_->end(); } 147 147 148 148 149 149 /** @brief Returns the map that stores all Identifiers. @return The map */ 150 static inlineconst std::map<std::string, Identifier*>& getIdentifierMap() { return Identifier::getIdentifierMapIntern(); }150 static const std::map<std::string, Identifier*>& getIdentifierMap() { return Identifier::getIdentifierMapIntern(); } 151 151 /** @brief Returns a const_iterator to the beginning of the map that stores all Identifiers. @return The const_iterator */ 152 static inlinestd::map<std::string, Identifier*>::const_iterator getIdentifierMapBegin() { return Identifier::getIdentifierMap().begin(); }152 static std::map<std::string, Identifier*>::const_iterator getIdentifierMapBegin() { return Identifier::getIdentifierMap().begin(); } 153 153 /** @brief Returns a const_iterator to the end of the map that stores all Identifiers. @return The const_iterator */ 154 static inlinestd::map<std::string, Identifier*>::const_iterator getIdentifierMapEnd() { return Identifier::getIdentifierMap().end(); }154 static std::map<std::string, Identifier*>::const_iterator getIdentifierMapEnd() { return Identifier::getIdentifierMap().end(); } 155 155 156 156 /** @brief Returns the map that stores all Identifiers with their names in lowercase. @return The map */ 157 static inlineconst std::map<std::string, Identifier*>& getLowercaseIdentifierMap() { return Identifier::getLowercaseIdentifierMapIntern(); }157 static const std::map<std::string, Identifier*>& getLowercaseIdentifierMap() { return Identifier::getLowercaseIdentifierMapIntern(); } 158 158 /** @brief Returns a const_iterator to the beginning of the map that stores all Identifiers with their names in lowercase. @return The const_iterator */ 159 static inlinestd::map<std::string, Identifier*>::const_iterator getLowercaseIdentifierMapBegin() { return Identifier::getLowercaseIdentifierMap().begin(); }159 static std::map<std::string, Identifier*>::const_iterator getLowercaseIdentifierMapBegin() { return Identifier::getLowercaseIdentifierMap().begin(); } 160 160 /** @brief Returns a const_iterator to the end of the map that stores all Identifiers with their names in lowercase. @return The const_iterator */ 161 static inlinestd::map<std::string, Identifier*>::const_iterator getLowercaseIdentifierMapEnd() { return Identifier::getLowercaseIdentifierMap().end(); }161 static std::map<std::string, Identifier*>::const_iterator getLowercaseIdentifierMapEnd() { return Identifier::getLowercaseIdentifierMap().end(); } 162 162 163 163 164 164 /** @brief Returns the map that stores all config values. @return The const_iterator */ 165 inlineconst std::map<std::string, ConfigValueContainer*>& getConfigValueMap() const { return this->configValues_; }165 const std::map<std::string, ConfigValueContainer*>& getConfigValueMap() const { return this->configValues_; } 166 166 /** @brief Returns a const_iterator to the beginning of the map that stores all config values. @return The const_iterator */ 167 inlinestd::map<std::string, ConfigValueContainer*>::const_iterator getConfigValueMapBegin() const { return this->configValues_.begin(); }167 std::map<std::string, ConfigValueContainer*>::const_iterator getConfigValueMapBegin() const { return this->configValues_.begin(); } 168 168 /** @brief Returns a const_iterator to the end of the map that stores all config values. @return The const_iterator */ 169 inlinestd::map<std::string, ConfigValueContainer*>::const_iterator getConfigValueMapEnd() const { return this->configValues_.end(); }169 std::map<std::string, ConfigValueContainer*>::const_iterator getConfigValueMapEnd() const { return this->configValues_.end(); } 170 170 171 171 /** @brief Returns the map that stores all config values with their names in lowercase. @return The const_iterator */ 172 inlineconst std::map<std::string, ConfigValueContainer*>& getLowercaseConfigValueMap() const { return this->configValues_LC_; }172 const std::map<std::string, ConfigValueContainer*>& getLowercaseConfigValueMap() const { return this->configValues_LC_; } 173 173 /** @brief Returns a const_iterator to the beginning of the map that stores all config values with their names in lowercase. @return The const_iterator */ 174 inlinestd::map<std::string, ConfigValueContainer*>::const_iterator getLowercaseConfigValueMapBegin() const { return this->configValues_LC_.begin(); }174 std::map<std::string, ConfigValueContainer*>::const_iterator getLowercaseConfigValueMapBegin() const { return this->configValues_LC_.begin(); } 175 175 /** @brief Returns a const_iterator to the end of the map that stores all config values with their names in lowercase. @return The const_iterator */ 176 inlinestd::map<std::string, ConfigValueContainer*>::const_iterator getLowercaseConfigValueMapEnd() const { return this->configValues_LC_.end(); }176 std::map<std::string, ConfigValueContainer*>::const_iterator getLowercaseConfigValueMapEnd() const { return this->configValues_LC_.end(); } 177 177 178 178 179 179 /** @brief Returns the map that stores all console commands. @return The const_iterator */ 180 inlineconst std::map<std::string, ConsoleCommand*>& getConsoleCommandMap() const { return this->consoleCommands_; }180 const std::map<std::string, ConsoleCommand*>& getConsoleCommandMap() const { return this->consoleCommands_; } 181 181 /** @brief Returns a const_iterator to the beginning of the map that stores all console commands. @return The const_iterator */ 182 inlinestd::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapBegin() const { return this->consoleCommands_.begin(); }182 std::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapBegin() const { return this->consoleCommands_.begin(); } 183 183 /** @brief Returns a const_iterator to the end of the map that stores all console commands. @return The const_iterator */ 184 inlinestd::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapEnd() const { return this->consoleCommands_.end(); }184 std::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapEnd() const { return this->consoleCommands_.end(); } 185 185 186 186 /** @brief Returns the map that stores all console commands with their names in lowercase. @return The const_iterator */ 187 inlineconst std::map<std::string, ConsoleCommand*>& getLowercaseConsoleCommandMap() const { return this->consoleCommands_LC_; }187 const std::map<std::string, ConsoleCommand*>& getLowercaseConsoleCommandMap() const { return this->consoleCommands_LC_; } 188 188 /** @brief Returns a const_iterator to the beginning of the map that stores all console commands with their names in lowercase. @return The const_iterator */ 189 inlinestd::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapBegin() const { return this->consoleCommands_LC_.begin(); }189 std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapBegin() const { return this->consoleCommands_LC_.begin(); } 190 190 /** @brief Returns a const_iterator to the end of the map that stores all console commands with their names in lowercase. @return The const_iterator */ 191 inlinestd::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapEnd() const { return this->consoleCommands_LC_.end(); }191 std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapEnd() const { return this->consoleCommands_LC_.end(); } 192 192 193 193 194 194 /** @brief Returns true if this class has at least one config value. @return True if this class has at least one config value */ 195 inlinebool hasConfigValues() const { return this->bHasConfigValues_; }195 bool hasConfigValues() const { return this->bHasConfigValues_; } 196 196 /** @brief Returns true if this class has at least one console command. @return True if this class has at least one console command */ 197 inlinebool hasConsoleCommands() const { return this->bHasConsoleCommands_; }197 bool hasConsoleCommands() const { return this->bHasConsoleCommands_; } 198 198 199 199 /** @brief Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. @return The status of the class-hierarchy creation */ 200 inlinestatic bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }200 static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); } 201 201 202 202 /** @brief Returns the network ID to identify a class through the network. @return the network ID */ 203 inlineconst unsigned int getNetworkID() const { return this->classID_; }203 const unsigned int getNetworkID() const { return this->classID_; } 204 204 205 205 /** @brief Sets the network ID to a new value. @param id The new value */ … … 233 233 234 234 /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */ 235 inlinestd::set<const Identifier*>& getChildrenIntern() const { return (*this->children_); }235 std::set<const Identifier*>& getChildrenIntern() const { return (*this->children_); } 236 236 /** @brief Returns the direct children of the class the Identifier belongs to. @return The list of all direct children */ 237 inlinestd::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }237 std::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); } 238 238 239 239 /** 240 240 @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents. 241 241 */ 242 inlinestatic void startCreatingHierarchy()242 static void startCreatingHierarchy() 243 243 { 244 244 hierarchyCreatingCounter_s++; … … 249 249 @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents. 250 250 */ 251 inlinestatic void stopCreatingHierarchy()251 static void stopCreatingHierarchy() 252 252 { 253 253 hierarchyCreatingCounter_s--; … … 302 302 void setName(const std::string& name); 303 303 /** @brief Returns the list of all existing objects of this class. @return The list */ 304 inlineObjectList<T>* getObjects() const { return this->objects_; }304 ObjectList<T>* getObjects() const { return this->objects_; } 305 305 /** @brief Returns a list of all existing objects of this class. @return The list */ 306 inlineObjectList<BaseObject>* getObjectList() const { return (ObjectList<BaseObject>*)this->objects_; }306 ObjectList<BaseObject>* getObjectList() const { return (ObjectList<BaseObject>*)this->objects_; } 307 307 308 308 void updateConfigValues() const; … … 586 586 587 587 /** @brief Returns the assigned identifier. @return The identifier */ 588 inlineconst Identifier* getIdentifier() const588 const Identifier* getIdentifier() const 589 589 { return this->identifier_; } 590 590 591 591 /** @brief Returns true, if the assigned identifier is at least of the given type. @param identifier The identifier to compare with */ 592 inlinebool isA(const Identifier* identifier) const592 bool isA(const Identifier* identifier) const 593 593 { return this->identifier_->isA(identifier); } 594 594 595 595 /** @brief Returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */ 596 inlinebool isExactlyA(const Identifier* identifier) const596 bool isExactlyA(const Identifier* identifier) const 597 597 { return this->identifier_->isExactlyA(identifier); } 598 598 599 599 /** @brief Returns true, if the assigned identifier is a child of the given identifier. @param identifier The identifier to compare with */ 600 inlinebool isChildOf(const Identifier* identifier) const600 bool isChildOf(const Identifier* identifier) const 601 601 { return this->identifier_->isChildOf(identifier); } 602 602 603 603 /** @brief Returns true, if the assigned identifier is a direct child of the given identifier. @param identifier The identifier to compare with */ 604 inlinebool isDirectChildOf(const Identifier* identifier) const604 bool isDirectChildOf(const Identifier* identifier) const 605 605 { return this->identifier_->isDirectChildOf(identifier); } 606 606 607 607 /** @brief Returns true, if the assigned identifier is a parent of the given identifier. @param identifier The identifier to compare with */ 608 inlinebool isParentOf(const Identifier* identifier) const608 bool isParentOf(const Identifier* identifier) const 609 609 { return this->identifier_->isParentOf(identifier); } 610 610 611 611 /** @brief Returns true, if the assigned identifier is a direct parent of the given identifier. @param identifier The identifier to compare with */ 612 inlinebool isDirectParentOf(const Identifier* identifier) const612 bool isDirectParentOf(const Identifier* identifier) const 613 613 { return this->identifier_->isDirectParentOf(identifier); } 614 614 -
code/branches/gcc43/src/core/Language.h
r1535 r1634 75 75 @return The translated entry 76 76 */ 77 inlineconst std::string& getLocalisation()77 const std::string& getLocalisation() 78 78 { return this->localisedEntry_; } 79 79 … … 82 82 @return The default entry 83 83 */ 84 inlineconst std::string& getDefault()84 const std::string& getDefault() 85 85 { return this->fallbackEntry_; } 86 86 … … 89 89 @param label The label 90 90 */ 91 inlinevoid setLabel(const LanguageEntryLabel& label)91 void setLabel(const LanguageEntryLabel& label) 92 92 { this->label_ = label; } 93 93 … … 96 96 @return The label 97 97 */ 98 inlineconst LanguageEntryLabel& getLabel() const98 const LanguageEntryLabel& getLabel() const 99 99 { return this->label_; } 100 100 -
code/branches/gcc43/src/core/ObjectList.h
r1543 r1634 94 94 95 95 /** @brief Returns the first element in the list. @return The first element */ 96 inlinestatic Iterator<T> start()96 static Iterator<T> start() 97 97 { return Iterator<T>(ClassIdentifier<T>::getIdentifier()->getObjects()->first_); } 98 98 99 99 /** @brief Returns the first element in the list. @return The first element */ 100 inlinestatic Iterator<T> begin()100 static Iterator<T> begin() 101 101 { return Iterator<T>(ClassIdentifier<T>::getIdentifier()->getObjects()->first_); } 102 102 103 103 /** @brief Returns the last element in the list. @return The last element */ 104 inlinestatic Iterator<T> end()104 static Iterator<T> end() 105 105 { return Iterator<T>(ClassIdentifier<T>::getIdentifier()->getObjects()->last_); } 106 106 107 inlinevoid registerIterator(Iterator<T>* iterator)107 void registerIterator(Iterator<T>* iterator) 108 108 { this->iterators_.insert(this->iterators_.end(), (void*)iterator); } 109 inlinevoid unregisterIterator(Iterator<T>* iterator)109 void unregisterIterator(Iterator<T>* iterator) 110 110 { this->iterators_.erase((void*)iterator); } 111 111 void notifyIterators(ObjectListElement<T>* element); -
code/branches/gcc43/src/core/OrxonoxClass.h
r1505 r1634 60 60 61 61 /** @brief Returns the Identifier of the object. @return The Identifier */ 62 inlineIdentifier* getIdentifier() const { return this->identifier_; }62 Identifier* getIdentifier() const { return this->identifier_; } 63 63 64 64 /** @brief Sets the Identifier of the object. Used by the RegisterObject-macro. */ 65 inlinevoid setIdentifier(Identifier* identifier) { this->identifier_ = identifier; }65 void setIdentifier(Identifier* identifier) { this->identifier_ = identifier; } 66 66 67 67 /** @brief Returns the list of all parents of the object. @return The list */ 68 inlinestd::set<const Identifier*>* getParents() const { return this->parents_; }68 std::set<const Identifier*>* getParents() const { return this->parents_; } 69 69 70 70 /** @brief Creates the parents-list. */ 71 inlinevoid createParents() { this->parents_ = new std::set<const Identifier*>(); }71 void createParents() { this->parents_ = new std::set<const Identifier*>(); } 72 72 73 73 /** @brief Returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. @return The list */ 74 inlineMetaObjectList& getMetaList() { return (*this->metaList_); }74 MetaObjectList& getMetaList() { return (*this->metaList_); } 75 75 76 76 -
code/branches/gcc43/src/core/OutputBuffer.h
r1505 r1634 56 56 57 57 template <class T> 58 inlineOutputBuffer& operator<<(T object)58 OutputBuffer& operator<<(T object) 59 59 { 60 60 this->stream_ << object; … … 68 68 69 69 template <class T> 70 inlinevoid add(T object)70 void add(T object) 71 71 { 72 72 this->stream_ << object; … … 75 75 76 76 template <class T> 77 inlinevoid addLine(T object)77 void addLine(T object) 78 78 { 79 79 this->stream_ << object << std::endl; … … 81 81 } 82 82 83 inlinevoid newline()83 void newline() 84 84 { 85 85 this->stream_ << std::endl; … … 87 87 } 88 88 89 inlinevoid flush()89 void flush() 90 90 { 91 91 this->stream_.flush(); -
code/branches/gcc43/src/core/OutputHandler.h
r1505 r1634 63 63 64 64 /** @brief Puts some text on the outstream. @param text The text */ 65 static inlinestd::string log(const std::string& text)65 static std::string log(const std::string& text) 66 66 { OutputHandler::getOutStream().setOutputLevel(0); OutputHandler::getOutStream().output(text + "\n"); return text; } 67 67 68 68 /** @brief Puts an error on the outstream. @param text The text */ 69 static inlinestd::string error(const std::string& text)69 static std::string error(const std::string& text) 70 70 { OutputHandler::getOutStream().setOutputLevel(1); OutputHandler::getOutStream().output(text + "\n"); return text; } 71 71 72 72 /** @brief Puts a warning on the outstream. @param text The text */ 73 static inlinestd::string warning(const std::string& text)73 static std::string warning(const std::string& text) 74 74 { OutputHandler::getOutStream().setOutputLevel(2); OutputHandler::getOutStream().output(text + "\n"); return text; } 75 75 76 76 /** @brief Puts an info on the outstream. @param text The text */ 77 static inlinestd::string info(const std::string& text)77 static std::string info(const std::string& text) 78 78 { OutputHandler::getOutStream().setOutputLevel(3); OutputHandler::getOutStream().output(text + "\n"); return text; } 79 79 80 80 /** @brief Puts some debug output on the outstream. @param text The text */ 81 static inlinestd::string debug(const std::string& text)81 static std::string debug(const std::string& text) 82 82 { OutputHandler::getOutStream().setOutputLevel(4); OutputHandler::getOutStream().output(text + "\n"); return text; } 83 83 84 84 /** @brief Returns a reference to the logfile. @return The logfile */ 85 inlinestd::ofstream& getLogfile()85 std::ofstream& getLogfile() 86 86 { return this->logfile_; } 87 87 88 88 /** @brief Sets the level of the incoming output. @param level The level of the incoming output @return The OutputHandler itself */ 89 inlineOutputHandler& setOutputLevel(int level)89 OutputHandler& setOutputLevel(int level) 90 90 { this->outputLevel_ = level; return *this; } 91 91 92 92 /** @brief Returns the level of the incoming output. @return The level */ 93 in line int getOutputLevel() const93 int getOutputLevel() const 94 94 { return this->outputLevel_; } 95 95 … … 102 102 103 103 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 104 inlineOutputHandler& operator<<(unsigned char val) { return this->output(val); }104 OutputHandler& operator<<(unsigned char val) { return this->output(val); } 105 105 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 106 inlineOutputHandler& operator<<(short val) { return this->output(val); }106 OutputHandler& operator<<(short val) { return this->output(val); } 107 107 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 108 inlineOutputHandler& operator<<(unsigned short val) { return this->output(val); }108 OutputHandler& operator<<(unsigned short val) { return this->output(val); } 109 109 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 110 inlineOutputHandler& operator<<(int val) { return this->output(val); }110 OutputHandler& operator<<(int val) { return this->output(val); } 111 111 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 112 inlineOutputHandler& operator<<(unsigned int val) { return this->output(val); }112 OutputHandler& operator<<(unsigned int val) { return this->output(val); } 113 113 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 114 inlineOutputHandler& operator<<(long val) { return this->output(val); }114 OutputHandler& operator<<(long val) { return this->output(val); } 115 115 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 116 inlineOutputHandler& operator<<(unsigned long val) { return this->output(val); }116 OutputHandler& operator<<(unsigned long val) { return this->output(val); } 117 117 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 118 inlineOutputHandler& operator<<(float val) { return this->output(val); }118 OutputHandler& operator<<(float val) { return this->output(val); } 119 119 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 120 inlineOutputHandler& operator<<(double val) { return this->output(val); }120 OutputHandler& operator<<(double val) { return this->output(val); } 121 121 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 122 inlineOutputHandler& operator<<(long double val) { return this->output(val); }122 OutputHandler& operator<<(long double val) { return this->output(val); } 123 123 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 124 inlineOutputHandler& operator<<(const void* val) { return this->output(val); }124 OutputHandler& operator<<(const void* val) { return this->output(val); } 125 125 /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */ 126 inlineOutputHandler& operator<<(bool val) { return this->output(val); }126 OutputHandler& operator<<(bool val) { return this->output(val); } 127 127 128 128 OutputHandler& operator<<(std::streambuf* sb); -
code/branches/gcc43/src/core/Script.h
r1505 r1634 56 56 57 57 public: 58 inlinestatic Script* getInstance() { if (!Script::singletonRef) Script::singletonRef = new Script(); return Script::singletonRef; } // tolua_export59 inline~Script() { Script::singletonRef = NULL; };58 static Script* getInstance() { if (!Script::singletonRef) Script::singletonRef = new Script(); return Script::singletonRef; } // tolua_export 59 ~Script() { Script::singletonRef = NULL; }; 60 60 61 61 void loadFile(std::string filename, bool luaTags); … … 69 69 #endif 70 70 71 inlinelua_State* getLuaState() { return luaState_; };72 inlinestd::string getLuaOutput() { return output_; };73 // inlinestd::string* getFileString() { return &fileString_; };71 lua_State* getLuaState() { return luaState_; }; 72 std::string getLuaOutput() { return output_; }; 73 //std::string* getFileString() { return &fileString_; }; 74 74 75 75 unsigned int getNextQuote(const std::string& text, unsigned int start); -
code/branches/gcc43/src/core/Script_clean.h
r1505 r1634 51 51 { // tolua_export 52 52 public: 53 inlinestatic Script* getInstance() { if (!Script::singletonRef) Script::singletonRef = new Script(); return Script::singletonRef; } // tolua_export54 inline~Script() { Script::singletonRef = NULL; };53 static Script* getInstance() { if (!Script::singletonRef) Script::singletonRef = new Script(); return Script::singletonRef; } // tolua_export 54 ~Script() { Script::singletonRef = NULL; }; 55 55 56 56 void loadFile(std::string filename, bool luaTags); … … 61 61 62 62 #if LUA_VERSION_NUM != 501 63 inlinestatic const char * lua_Chunkreader(lua_State *L, void *data, size_t *size) { return NULL;};63 static const char * lua_Chunkreader(lua_State *L, void *data, size_t *size) { return NULL;}; 64 64 #endif 65 65 66 inlinelua_State* getLuaState() { return luaState_; };67 inlinestd::string getLuaOutput() { return output_; };68 // inlinestd::string* getFileString() { return &fileString_; };66 lua_State* getLuaState() { return luaState_; }; 67 std::string getLuaOutput() { return output_; }; 68 //std::string* getFileString() { return &fileString_; }; 69 69 70 70 unsigned int getNextQuote(const std::string& text, unsigned int start); -
code/branches/gcc43/src/core/Shell.h
r1535 r1634 72 72 73 73 void setInputBuffer(InputBuffer* buffer); 74 inlineInputBuffer& getInputBuffer()74 InputBuffer& getInputBuffer() 75 75 { return (*this->inputBuffer_); } 76 inlineOutputBuffer& getOutputBuffer()76 OutputBuffer& getOutputBuffer() 77 77 { return this->outputBuffer_; } 78 78 79 79 void setCursorPosition(unsigned int cursor); 80 inlineunsigned int getCursorPosition() const80 unsigned int getCursorPosition() const 81 81 { return this->inputBuffer_->getCursorPosition(); } 82 82 83 83 void setInput(const std::string& input); 84 84 85 inlinevoid clearInput()85 void clearInput() 86 86 { this->setInput(""); } 87 inlinestd::string getInput() const87 std::string getInput() const 88 88 { return this->inputBuffer_->get(); } 89 89 … … 94 94 void clearLines(); 95 95 96 inlineunsigned int getNumLines() const96 unsigned int getNumLines() const 97 97 { return this->lines_.size(); } 98 inlineunsigned int getScrollPosition() const98 unsigned int getScrollPosition() const 99 99 { return this->scrollPosition_; } 100 100 101 inlinevoid addOutputLevel(bool bAddOutputLevel)101 void addOutputLevel(bool bAddOutputLevel) 102 102 { this->bAddOutputLevel_ = bAddOutputLevel; } 103 103 -
code/branches/gcc43/src/core/SignalHandler.h
r1505 r1634 66 66 SignalHandler(); 67 67 public: 68 inlinestatic SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; }68 static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; } 69 69 ~SignalHandler(){ SignalHandler::singletonRef = NULL; } 70 70 … … 96 96 { 97 97 public: 98 inlinestatic SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; };98 static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; }; 99 99 void doCatch( const std::string & appName, const std::string & fileName ) {}; 100 100 void dontCatch() {}; -
code/branches/gcc43/src/core/XMLPort.h
r1505 r1634 96 96 virtual ~XMLPortParamContainer() {} 97 97 98 inlineconst std::string& getName() const98 const std::string& getName() const 99 99 { return this->paramname_; } 100 100 … … 243 243 virtual ~XMLPortObjectContainer() {} 244 244 245 inlineconst std::string& getName() const245 const std::string& getName() const 246 246 { return this->sectionname_; } 247 247 -
code/branches/gcc43/src/core/input/InputBuffer.h
r1535 r1634 144 144 void updated(const char& update, bool bSingleInput); 145 145 146 inlinestd::string get() const146 std::string get() const 147 147 { return this->buffer_; } 148 inlineunsigned int getSize() const148 unsigned int getSize() const 149 149 { return this->buffer_.size(); } 150 150 151 inlineunsigned int getCursorPosition() const151 unsigned int getCursorPosition() const 152 152 { return this->cursor_; } 153 inlinevoid setCursorPosition(unsigned int cursor)153 void setCursorPosition(unsigned int cursor) 154 154 { if (cursor <= this->buffer_.size()) { this->cursor_ = cursor; } } 155 inlinevoid setCursorToEnd()155 void setCursorToEnd() 156 156 { this->cursor_ = this->buffer_.size(); } 157 inlinevoid setCursorToBegin()157 void setCursorToBegin() 158 158 { this->cursor_ = 0; } 159 inlinevoid increaseCursor()159 void increaseCursor() 160 160 { if (this->cursor_ < this->buffer_.size()) { ++this->cursor_; } } 161 inlinevoid decreaseCursor()161 void decreaseCursor() 162 162 { if (this->cursor_ > 0) { --this->cursor_; } } 163 163
Note: See TracChangeset
for help on using the changeset viewer.