Changeset 282 for trunk/nv/interface/mesh_loader.hh
- Timestamp:
- 07/10/14 00:29:34 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/interface/mesh_loader.hh
r241 r282 26 26 { 27 27 28 // TODO: change to generic nodes! 28 29 class tag_map 29 30 { 30 31 public: 31 typedef std::unordered_map< std::string, transform_vector> map;32 typedef std::unordered_map< std::string, key_raw_channel* > map; 32 33 33 34 tag_map () {} 34 map& get_map() { return m_map; } 35 const map& get_map() const { return m_map; } 36 const transform_vector* get_tag( const std::string& key ) const 35 36 const transform* get_tag( const std::string& key ) const 37 37 { 38 auto it = m_map.find( key ); 39 return ( it != m_map.end() ? &(it->second) : nullptr ); 38 key_raw_channel* channel = m_map.at( key ); 39 return ((transform*)(channel->data)); 40 } 41 void insert( const std::string& key, key_raw_channel* chan ) 42 { 43 m_map[ key ] = chan; 44 } 45 ~tag_map() 46 { 47 for ( auto t : m_map ) 48 delete t.second; 40 49 } 41 50 private:
Note: See TracChangeset
for help on using the changeset viewer.