Changeset 692 for mylib/trunk/rconfig/rconfig.h
- Timestamp:
- 01/07/08 18:28:27 (2 years ago)
- Files:
-
- 1 modified
-
mylib/trunk/rconfig/rconfig.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mylib/trunk/rconfig/rconfig.h
r691 r692 67 67 void rcfile_tell(const char* name, unsigned &ref, const char* context = 0); 68 68 void rcfile_tell(const char* name, std::string &ref, const char* context = 0); 69 void rcfile_tellstr(const char* name, std::string &ref, const char* defval = 0, const char* context = 0); 69 70 //void rcfile_tell(const char* name, std::vector<bool> &ref); 70 71 void rcfile_tell(const char* name, std::vector<int> &ref, const char* context = 0); … … 75 76 //@} 76 77 77 template<class T >78 T rcfile_initwrap(const char* name, T& ref, const T& initval, const char* context = 0) {79 ref = initval; 78 template<class T, class V> 79 T rcfile_initwrap(const char* name, T& ref, const V& initval, const char* context = 0) { 80 ref = initval; //this only works for primitive types 80 81 rcfile_tell(name, ref, context); 82 return initval; 83 } 84 85 template<class V> 86 std::string rcfile_initwrap(const char* name, std::string& ref, const V& initval, const char* context = 0) { 87 rcfile_tellstr(name, ref, initval, context); 81 88 return initval; 82 89 }
