Changeset 82
- Timestamp:
- 06/02/13 10:02:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/types.hh
r81 r82 16 16 #include <vector> 17 17 #include <string> 18 #include <cstddef> 18 19 19 20 namespace nv … … 230 231 struct type_entry 231 232 { 232 233 234 235 236 233 // Function types for the constructor and destructor of registered types 234 typedef void (*constructor_func)(void*); 235 typedef void (*destructor_func)(void*); 236 237 // Parent type database 237 238 class type_database* type_db; 238 239 … … 247 248 size_t size; 248 249 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 250 // Base type 251 type_entry* base_type; 252 253 // Field list 254 std::vector<type_field> field_list; 255 256 // Enum list 257 std::vector<type_enum> enum_list; 258 259 template <int TYPE> 260 type_entry& base() 261 { 262 base_type = type_db->get_type( typeid(TYPE) ); 263 } 264 265 template <int SIZE> 266 type_entry& fields( type_field (&init_fields)[SIZE] ) 267 { 267 268 for (int i = 0; i < SIZE; i++) 268 269 { … … 323 324 } 324 325 325 type_entry* get_type( const type_info& t )326 type_entry* get_type( const std::type_info& t ) 326 327 { 327 328 type_info_map::iterator it = m_idx_types.find( std::type_index(t) ); … … 334 335 private: 335 336 struct compare_type_info { 336 bool operator ()(const type_info* a, consttype_info* b) const {337 bool operator ()(const std::type_info* a, const std::type_info* b) const { 337 338 return a->before(*b); 338 339 }
Note: See TracChangeset
for help on using the changeset viewer.