aboutsummaryrefslogtreecommitdiffstats
path: root/core/optimizer.hpp
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-09-11 10:16:41 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-09-11 10:16:41 +0000
commit18b6a5d898e798d53478b13e2b0c997eed626760 (patch)
tree02d716eba77f936d99d6ecc9b04b777420a6856b /core/optimizer.hpp
parent715792b078567650bc2d261e109d96cb2e356599 (diff)
downloadopt-utilities-18b6a5d898e798d53478b13e2b0c997eed626760.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@67 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'core/optimizer.hpp')
-rw-r--r--core/optimizer.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/core/optimizer.hpp b/core/optimizer.hpp
index 10cfce9..6380d66 100644
--- a/core/optimizer.hpp
+++ b/core/optimizer.hpp
@@ -12,6 +12,7 @@
#include "opt_exception.hpp"
#include <cstdlib>
#include <functional>
+#include <typeinfo>
#ifdef DEBUG
#include <iostream>
using namespace std;
@@ -59,6 +60,15 @@ namespace opt_utilities
delete this;
}
+ /**
+ \return the type name of self
+ */
+
+ virtual const char* do_get_type_name()const
+ {
+ return typeid(*this).name();
+ }
+
public:
/**
Interface function to perform the clone
@@ -77,6 +87,10 @@ namespace opt_utilities
do_destroy();
}
+ const char* get_type_name()const
+ {
+ return this->do_get_type_name();
+ }
/**
Makes the class object like a real function.
@@ -175,6 +189,15 @@ namespace opt_utilities
{
delete this;
}
+
+ /**
+ \return the type name of self
+ */
+
+ virtual const char* do_get_type_name()const
+ {
+ return typeid(*this).name();
+ }
public:
/**
Interface function for seting optimizer
@@ -287,6 +310,15 @@ namespace opt_utilities
}
/**
+ \return the type name of self
+ */
+
+ virtual const char* get_type_name()const
+ {
+ return this->do_get_type_name();
+ }
+
+ /**
deconstruct function
*/
virtual ~opt_method(){};