Changeset 10520 for code/branches/core7/src/libraries/core
- Timestamp:
 - May 31, 2015, 11:54:06 AM (10 years ago)
 - Location:
 - code/branches/core7/src/libraries/core
 - Files:
 - 
          
- 12 edited
 
- 
          Core.cc (modified) (1 diff)
 - 
          CoreIncludes.h (modified) (1 diff)
 - 
          class/IdentifierManager.cc (modified) (1 diff)
 - 
          class/IdentifierManager.h (modified) (1 diff)
 - 
          command/ConsoleCommand.cc (modified) (1 diff)
 - 
          command/ConsoleCommandIncludes.h (modified) (1 diff)
 - 
          command/ConsoleCommandManager.cc (modified) (1 diff)
 - 
          command/ConsoleCommandManager.h (modified) (1 diff)
 - 
          commandline/CommandLineIncludes.h (modified) (1 diff)
 - 
          commandline/CommandLineParser.cc (modified) (2 diffs)
 - 
          commandline/CommandLineParser.h (modified) (1 diff)
 - 
          singleton/ScopedSingletonIncludes.h (modified) (1 diff)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
        
code/branches/core7/src/libraries/core/Core.cc
r10518 r10520 241 241 safeObjectDelete(&languageInstance_); 242 242 safeObjectDelete(&configFileManager_); 243 ConsoleCommandManager::getInstance().destroyAll();244 243 Context::setRootContext(NULL); 245 IdentifierManager::getInstance().destroyAllIdentifiers();246 244 safeObjectDelete(&signalHandler_); 247 245 // if (this->rootModule_)  - 
        
code/branches/core7/src/libraries/core/CoreIncludes.h
r10512 r10520 226 226 public: 227 227 StaticallyInitializedIdentifier(Identifier* identifier) : identifier_(identifier) {} 228 ~StaticallyInitializedIdentifier() { delete identifier_; } 228 229 229 230 virtual void load()  - 
        
code/branches/core7/src/libraries/core/class/IdentifierManager.cc
r10519 r10520 277 277 this->identifierByNetworkId_.clear(); 278 278 } 279 280 /**281 @brief Destroys all Identifiers. Called when exiting the program.282 */283 void IdentifierManager::destroyAllIdentifiers()284 {285 for (std::set<Identifier*>::iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)286 delete (*it);287 288 this->identifiers_.clear();289 this->identifierByString_.clear();290 this->identifierByLowercaseString_.clear();291 this->identifierByNetworkId_.clear();292 }293 279 }  - 
        
code/branches/core7/src/libraries/core/class/IdentifierManager.h
r10519 r10520 87 87 { return this->identifierByNetworkId_; } 88 88 89 void destroyAllIdentifiers();90 91 89 private: 92 90 IdentifierManager();  - 
        
code/branches/core7/src/libraries/core/command/ConsoleCommand.cc
r10484 r10520 92 92 ConsoleCommand::~ConsoleCommand() 93 93 { 94 ConsoleCommandManager::getInstance().unregisterCommand(this);95 94 } 96 95  - 
        
code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h
r10484 r10520 311 311 public: 312 312 StaticallyInitializedConsoleCommand(ConsoleCommand* command) : command_(command) {} 313 ~StaticallyInitializedConsoleCommand() { delete command_; } 313 314 314 315 virtual void load();  - 
        
code/branches/core7/src/libraries/core/command/ConsoleCommandManager.cc
r10484 r10520 191 191 } 192 192 } 193 194 /**195 @brief Deletes all commands196 */197 void ConsoleCommandManager::destroyAll()198 {199 // delete entries until the map is empty200 while (!this->commandMap_.empty() && !this->commandMap_.begin()->second.empty())201 delete this->commandMap_.begin()->second.begin()->second;202 }203 193 }  - 
        
code/branches/core7/src/libraries/core/command/ConsoleCommandManager.h
r10484 r10520 68 68 ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false); 69 69 70 void destroyAll();71 72 70 private: 73 71 std::map<std::string, std::map<std::string, ConsoleCommand*> > commandMap_;  - 
        
code/branches/core7/src/libraries/core/commandline/CommandLineIncludes.h
r10404 r10520 59 59 public: 60 60 StaticallyInitializedCommandLineArgument(CommandLineArgument* argument) : argument_(argument) {} 61 ~StaticallyInitializedCommandLineArgument() { delete argument_; } 61 62 62 63 virtual void load()  - 
        
code/branches/core7/src/libraries/core/commandline/CommandLineParser.cc
r10509 r10520 85 85 CommandLineParser::~CommandLineParser() 86 86 { 87 CommandLineParser::destroyAllArguments();88 87 } 89 88 … … 96 95 static CommandLineParser instance; 97 96 return instance; 98 }99 100 /**101 @brief102 Destroys all command line arguments. This should be called at the end103 of main. Do not use before that.104 */105 void CommandLineParser::destroyAllArguments()106 {107 for (std::map<std::string, CommandLineArgument*>::const_iterator it = _getInstance().cmdLineArgs_.begin();108 it != _getInstance().cmdLineArgs_.end(); ++it)109 delete it->second;110 _getInstance().cmdLineArgs_.clear();111 97 } 112 98  - 
        
code/branches/core7/src/libraries/core/commandline/CommandLineParser.h
r10404 r10520 161 161 } 162 162 163 static void destroyAllArguments();164 165 163 static void generateDoc(std::ofstream& file); 166 164  - 
        
code/branches/core7/src/libraries/core/singleton/ScopedSingletonIncludes.h
r10514 r10520 84 84 , scope_(scope) 85 85 {} 86 ~StaticallyInitializedScopedSingletonWrapper() { delete wrapper_; } 86 87 87 88 virtual void load();  
Note: See TracChangeset
          for help on using the changeset viewer.
      


            






