Changeset 704 for code/branches/FICN/src/orxonox/core
- Timestamp:
- Dec 28, 2007, 12:56:17 AM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox/core
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/CMakeLists.txt
r684 r704 13 13 DebugLevel.cc 14 14 OutputHandler.cc 15 Language.cc 15 16 ) 16 17 -
code/branches/FICN/src/orxonox/core/ClassFactory.h
r694 r704 60 60 ClassFactory() {} // Don't create 61 61 ClassFactory(const ClassFactory& factory) {} // Don't copy 62 ~ClassFactory() {}// Don't delete62 virtual ~ClassFactory() {} // Don't delete 63 63 64 64 static T* createNewObject(); -
code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc
r703 r704 647 647 648 648 /** 649 @brief Sets the value of the variable back to the default value .649 @brief Sets the value of the variable back to the default value and resets the config-file entry. 650 650 */ 651 651 void ConfigValueContainer::resetConfigValue() 652 652 { 653 parseSting(this->defvalueString_); 653 this->parseSting(this->defvalueString_); 654 this->resetConfigFileEntry(); 654 655 } 655 656 … … 854 855 void ConfigValueContainer::readConfigFile(const std::string& filename) 855 856 { 856 ConfigValueContainer::finishedReadingConfigFile(true);857 858 857 // This creates the file if it's not existing 859 858 std::ofstream createFile; … … 865 864 file.open(filename.c_str(), std::fstream::in); 866 865 866 if (!file.is_open()) 867 { 868 COUT(1) << "Error: Couldn't open config-file " << filename << " to read the config values!" << std::endl; 869 return; 870 } 871 867 872 char line[1024]; 868 873 … … 887 892 888 893 file.close(); 894 895 ConfigValueContainer::finishedReadingConfigFile(true); 889 896 } 890 897 … … 903 910 file.open(filename.c_str(), std::fstream::out); 904 911 912 if (!file.is_open()) 913 { 914 COUT(1) << "Error: Couldn't open config-file " << filename << " to write the config values!" << std::endl; 915 return; 916 } 917 905 918 // Iterate through the list an write the lines into the file 906 919 std::list<std::string>::iterator it; 907 for (it = ConfigValueContainer::getConfigFileLines().begin(); it != ConfigValueContainer::getConfigFileLines().end(); ++it)920 for (it = ConfigValueContainer::getConfigFileLines().begin(); it != ConfigValueContainer::getConfigFileLines().end(); ++it) 908 921 { 909 922 file << (*it) << std::endl; -
code/branches/FICN/src/orxonox/core/ConfigValueContainer.h
r703 r704 135 135 void resetConfigValue(); 136 136 137 static std::string getStrippedLine(const std::string& line); 138 static bool isEmpty(const std::string& line); 139 static bool isComment(const std::string& line); 140 137 141 private: 138 142 bool parseSting(const std::string& input, int defvalue); … … 155 159 std::string parseValueString(bool bStripped = true); 156 160 157 static std::string getStrippedLine(const std::string& line);158 static bool isEmpty(const std::string& line);159 static bool isComment(const std::string& line);160 161 static void readConfigFile(const std::string& filename); 161 162 static void writeConfigFile(const std::string& filename); -
code/branches/FICN/src/orxonox/core/CoreIncludes.h
r703 r704 144 144 145 145 /** 146 @brief Sets the variable back to the previously defined default-value.146 @brief Sets the variable and the config-file entry back to the previously defined default-value. 147 147 @param varname The name of the variable 148 148 */ … … 152 152 { \ 153 153 container##varname##reset->resetConfigValue(); \ 154 varname = container##varname ->getValue(varname); \154 varname = container##varname##reset->getValue(varname); \ 155 155 } \ 156 156 else \ -
code/branches/FICN/src/orxonox/core/DebugLevel.h
r699 r704 53 53 explicit DebugLevel(bool& bReturnSoftDebugLevel); 54 54 DebugLevel(const DebugLevel& dl) {} // don't copy 55 ~DebugLevel() {}// don't delete55 virtual ~DebugLevel() {} // don't delete 56 56 57 57 int softDebugLevel_; //!< The debug level -
code/branches/FICN/src/orxonox/core/MetaObjectList.h
r682 r704 65 65 public: 66 66 MetaObjectListElement(ObjectList<T>* list, ObjectListElement<T>* element); 67 ~MetaObjectListElement();67 virtual ~MetaObjectListElement(); 68 68 69 69 ObjectListElement<T>* element_; //!< The list element, containing the object -
code/branches/FICN/src/orxonox/core/OutputHandler.h
r699 r704 110 110 explicit OutputHandler(const std::string& logfilename); 111 111 OutputHandler(const OutputHandler& oh) {}; // don't copy 112 ~OutputHandler();112 virtual ~OutputHandler(); 113 113 std::ofstream logfile_; //!< The logfile where the output is logged 114 114 std::string logfilename_; //!< The name of the logfile
Note: See TracChangeset
for help on using the changeset viewer.