00001 #ifndef OPENTISSUE_UTILITY_UTILITY_RUNTIME_TYPE_H 00002 #define OPENTISSUE_UTILITY_UTILITY_RUNTIME_TYPE_H 00003 // 00004 // OpenTissue Template Library 00005 // - A generic toolbox for physics-based modeling and simulation. 00006 // Copyright (C) 2008 Department of Computer Science, University of Copenhagen. 00007 // 00008 // OTTL is licensed under zlib: http://opensource.org/licenses/zlib-license.php 00009 // 00010 #include <OpenTissue/configuration.h> 00011 00012 namespace OpenTissue 00013 { 00014 namespace utility 00015 { 00020 template < typename Type > 00021 struct RuntimeType 00022 { 00023 typedef Type type; 00024 RuntimeType(){} 00025 RuntimeType(const RuntimeType& rhs):m_value(rhs.m_value){} 00026 RuntimeType& operator = (const type& rhs) {m_value=rhs; return *this;} 00027 operator const type& () const {return m_value;} 00028 protected: 00029 type m_value; 00030 }; 00031 00032 } // namespace utility 00033 00034 } // namespace OpenTissue 00035 00036 // OPENTISSUE_UTILITY_UTILITY_RUNTIME_TYPE_H 00037 #endif