Changeset 2005 for code/branches/objecthierarchy/src/core
- Timestamp:
- Oct 24, 2008, 1:08:58 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/core/CommandLine.h
r2003 r2005 47 47 namespace orxonox 48 48 { 49 /**50 @brief51 Template struct which creates a distinct type for every integer constant.52 @note53 This allows to select a different function depending on a boolean value54 when creating a new CommandLineArgument.55 From 'Modern C++ Design' (Alexandrescu 2001).56 */57 template <int v>58 struct Int2Type59 {60 enum { value = v };61 };62 63 49 /** 64 50 @brief … … 209 195 CommandLineArgument& CommandLine::addArgument(const std::string& name, T defaultValue) 210 196 { 211 std::map<std::string, CommandLineArgument*>::const_iterator it = _getInstance().cmdLineArgs_.find(name); 212 OrxAssert(it == _getInstance().cmdLineArgs_.end(), 197 OrxAssert(!_getInstance().existsArgument(name), 213 198 "Cannot add a command line argument with name '" + name + "' twice."); 214 199
Note: See TracChangeset
for help on using the changeset viewer.