ACDK_DECL_CLASS(TestClass);
class ACDK_XML_PUBLIC TestClass
: extends ::acdk::lang::Object
{
// need meta information for serialisation
ACDK_WITH_METAINFO
public:
/// just a few dummy data elements
RString _astring;
/// ACDK-containes can be serialized
RHashMap _map;
int _ival;
public:
/** needed for de-serialisation */
static RObject create_instance() { return new TestClass(); }
TestClass()
: Object(),
_astring(new String("Hallo")),
_map(new HashMap()),
_ival(42)
{
_map->put(new String("Kommer"), new String("Roger Rene"));
_map->put(new String("Reinhard"), new String("Kai"));
}
virtual bool equals(RObject o)
{
if (instanceof(o, TestClass) == false)
return false;
RTestClass other = (RTestClass)o;
if (_astring->equals(other->_astring) == false)
return false;
if (_map->equals(other->_map) == false)
return false;
if (_ival != other->_ival)
return false;
return true;
}
};
|