00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef COH_TYPED_BARREN_CLASS_HPP
00017 #define COH_TYPED_BARREN_CLASS_HPP
00018
00019 #include "coherence/lang/compatibility.hpp"
00020
00021 #include "coherence/lang/AbstractTypedClass.hpp"
00022 #include "coherence/lang/Class.hpp"
00023 #include "coherence/lang/Object.hpp"
00024 #include "coherence/lang/String.hpp"
00025 #include "coherence/lang/UnsupportedOperationException.hpp"
00026
00027
00028 #include <typeinfo>
00029
00030 COH_OPEN_NAMESPACE2(coherence,lang)
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 template<class T> class TypedBarrenClass
00043 : public class_spec<TypedBarrenClass<T>,
00044 extends<AbstractTypedClass<T> > >
00045 {
00046 friend class factory<TypedBarrenClass<T> >;
00047
00048
00049
00050 public:
00051
00052
00053
00054 typedef T Type;
00055
00056
00057
00058
00059 protected:
00060
00061
00062
00063 TypedBarrenClass<T>()
00064 {
00065 }
00066
00067 private:
00068
00069
00070
00071 TypedBarrenClass<T>(const TypedBarrenClass<T>&);
00072
00073
00074
00075
00076 public:
00077
00078
00079
00080
00081
00082 virtual Object::Handle newInstance(ObjectArray::View ) const
00083 {
00084 if (true)
00085 {
00086 COH_THROW (UnsupportedOperationException::create(Class::getName()));
00087 }
00088 return NULL;
00089 }
00090
00091
00092
00093
00094 public:
00095
00096
00097
00098 virtual TypedHandle<const String> toString() const
00099 {
00100 return COH_TO_STRING("TypedBarrenClass<" << Class::getName() << ">");
00101 }
00102 };
00103
00104 COH_CLOSE_NAMESPACE2
00105
00106 #endif // COH_TYPED_BARREN_CLASS_HPP