- Timestamp:
- Aug 31, 2021, 1:49:09 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
- Children:
- 80ae121
- Parents:
- 4cc6c7d
- git-author:
- Jacob Prud'homme <jafprudhomme@…> (07/16/21 15:18:23)
- git-committer:
- Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:09)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/parseconfig.hfa
r4cc6c7d re54654e 5 5 void * variable; 6 6 bool (*parse)( const char *, void * ); 7 bool (*validate)( void * ); 7 8 }; 8 9 … … 14 15 this.variable = (void *)&variable; 15 16 this.parse = (bool (*)(const char *, void *))(bool (*)(const char *, T &))parse; 17 this.validate = 0p; 18 } 19 20 forall(T & | { bool parse( const char *, T & ); }) 21 static inline void ?{}( config_entry & this, const char * key, T & variable, bool (*validate)(T &) ) { 22 this.key = key; 23 this.variable = (void *)&variable; 24 this.parse = (bool (*)(const char *, void *))(bool (*)(const char *, T &))parse; 25 this.validate = (bool (*)(void *))(bool (*)(T &))validate; 16 26 } 17 27 … … 21 31 this.variable = (void *)&variable; 22 32 this.parse = (bool (*)(const char *, void *))(bool (*)(const char *, T &))parse; 33 this.validate = 0p; 34 } 35 36 forall(T &) 37 static inline void ?{}( config_entry & this, const char * key, T & variable, bool (*parse)(const char *, T &), bool (*validate)(T &) ) { 38 this.key = key; 39 this.variable = (void *)&variable; 40 this.parse = (bool (*)(const char *, void *))(bool (*)(const char *, T &))parse; 41 this.validate = (bool (*)(void *))(bool (*)(T &))validate; 23 42 } 24 43
Note: See TracChangeset
for help on using the changeset viewer.