• Main Page
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

/export/development/ViennaData/release/ViennaData-1.0.1/viennadata/config/object_identifier.hpp

Go to the documentation of this file.
00001 /* =======================================================================
00002    Copyright (c) 2010, Institute for Microelectronics, TU Vienna.
00003    http://www.iue.tuwien.ac.at
00004                              -----------------
00005                      ViennaData - The Vienna Data Storage Library
00006                              -----------------
00007 
00008    authors:    Karl Rupp                          rupp@iue.tuwien.ac.at
00009 
00010    license:    MIT (X11), see file LICENSE in the ViennaData base directory
00011 ======================================================================= */
00012 
00013 #ifndef VIENNADATA_CONFIG_OBJECT_IDENTIFIER_HPP
00014 #define VIENNADATA_CONFIG_OBJECT_IDENTIFIER_HPP
00015 
00016 #include "viennadata/forwards.h"
00017 
00023 namespace viennadata
00024 {
00025   namespace config
00026   {
00048     template <typename ObjectType>
00049     struct object_identifier
00050     {
00051       typedef pointer_based_id        tag;
00052       typedef const ObjectType *      id_type;
00053       
00055       static id_type get(ObjectType const & obj) { return &obj; }
00056     };
00057 
00058     //add here some custom element identifier
00059   }
00060 } //namespace viennadata
00061 
00062 
00063 #endif
00064 

Generated on Wed Sep 14 2011 18:17:05 for ViennaData - The Vienna Data Storage Library by  doxygen 1.7.1