22 #ifndef _Polymorphic_hxx_
23 #define _Polymorphic_hxx_
49 template <
typename FactoryType>
66 mAdaptee = Factory::GetInstance().Create(concreteClassName);
76 if (mAdaptee)
delete mAdaptee;
86 CLAM_ASSERT(mAdaptee,
"Derreferencing a null polymorph pointer");
92 CLAM_ASSERT(mAdaptee,
"Derreferencing a null polymorph pointer");
103 return "Polymorphic";
125 std::string className = mAdaptee->GetClassName();
127 storage.
Store(typeAttribute);
128 mAdaptee->StoreOn(storage);
136 std::string className;
138 storage.
Load(typeAttribute);
139 mAdaptee = Factory::GetInstance().Create(className);
140 mAdaptee->LoadFrom(storage);
146 #endif//_Polymorphic_hxx_