1994-09-19 09:50:07 +00:00
|
|
|
#define __OBJECT_CPP
|
|
|
|
|
|
|
|
#include <object.h>
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
// Object
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
const char* TObject::class_name() const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return "Object"; }
|
1994-09-19 09:50:07 +00:00
|
|
|
|
|
|
|
word TObject::class_id() const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return CLASS_OBJECT; }
|
1994-09-19 09:50:07 +00:00
|
|
|
|
1996-05-08 11:09:13 +00:00
|
|
|
bool TObject::is_kind_of(word cid) const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return cid == CLASS_OBJECT; }
|
1994-09-19 09:50:07 +00:00
|
|
|
|
|
|
|
bool TObject::ok() const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return true; }
|
1994-09-19 09:50:07 +00:00
|
|
|
|
|
|
|
TObject* TObject::dup() const
|
|
|
|
{
|
2010-02-15 12:11:55 +00:00
|
|
|
CHECK(false, "Can't duplicate an Object");
|
1994-09-28 10:36:08 +00:00
|
|
|
return 0L;
|
1994-09-19 09:50:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void TObject::print_on(ostream& out) const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ out << class_name(); }
|
1994-09-19 09:50:07 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
// Error Object
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
const char* TError_Object::class_name() const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return "Error_Object"; }
|
1994-09-19 09:50:07 +00:00
|
|
|
|
|
|
|
word TError_Object::class_id() const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return CLASS_ERROR; }
|
1994-09-19 09:50:07 +00:00
|
|
|
|
1996-05-08 11:09:13 +00:00
|
|
|
bool TError_Object::is_kind_of(word cid) const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return cid == CLASS_ERROR || TObject::is_kind_of(cid); }
|
1996-05-08 11:09:13 +00:00
|
|
|
|
1994-09-19 09:50:07 +00:00
|
|
|
bool TError_Object::ok() const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return false; }
|
1994-09-19 09:50:07 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
// Sortable
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
const char* TSortable::class_name() const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return "Sortable"; }
|
1994-09-19 09:50:07 +00:00
|
|
|
|
|
|
|
word TSortable::class_id() const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return CLASS_SORTABLE; }
|
1994-09-19 09:50:07 +00:00
|
|
|
|
1998-02-24 10:37:28 +00:00
|
|
|
bool TSortable::is_kind_of(word cid) const
|
2010-02-15 12:11:55 +00:00
|
|
|
{ return cid == CLASS_SORTABLE || TObject::is_kind_of(cid); }
|