Dillo v3.1.1-117-gc0464026
|
This is the base class for many other classes, which defines very common virtual methods. More...
#include <object.hh>
Public Member Functions | |
virtual | ~Object () |
The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. | |
virtual bool | equals (Object *other) |
Returns, whether two objects are equal. | |
virtual int | hashValue () |
Return a hash value for the object. | |
virtual Object * | clone () |
Return an exact copy of the object. | |
virtual void | intoStringBuffer (misc::StringBuffer *sb) |
Store a textual representation of the object in a misc::StringBuffer. | |
const char * | toString () |
Use object::Object::intoStringBuffer to return a textual representation of the object. | |
virtual size_t | sizeOf () |
Return the number of bytes, this object totally uses. | |
This is the base class for many other classes, which defines very common virtual methods.
For convenience, none of them are abstract, but they must be defined, when they are needed, especially for containers.
|
virtual |
|
virtual |
Return an exact copy of the object.
Reimplemented in dw::core::EmptyIterator, dw::core::DeepIterator, dw::core::CharIterator, dw::Table::TableIterator, dw::Textblock::TextblockIterator, and dw::SimpleContainer::SimpleContainerIterator.
Definition at line 69 of file object.cc.
References lout::misc::assertNotReached().
Referenced by dw::core::Iterator::cloneIterator().
|
virtual |
Returns, whether two objects are equal.
The caller should ensure, that this and the object have the same class; this makes casting of "other" safe. Typically, an implementation should check this == other first, the caller can assume a fast implementation.
Reimplemented in dw::core::style::StyleAttrs, dw::core::style::FontAttrs, dw::core::style::ColorAttrs, CssStyleSheet::RuleList, dw::core::Iterator, lout::container::untyped::List, lout::container::typed::Collection< T >, lout::container::typed::Collection< dw::core::Rectangle >, lout::container::typed::Collection< dw::core::style::ColorAttrs >, lout::container::typed::Collection< dw::core::style::FontAttrs >, lout::container::typed::Collection< dw::core::style::StyleAttrs >, lout::container::typed::Collection< dw::core::Widget >, lout::container::typed::Collection< dw::fltk::FltkImgbuf >, lout::container::typed::Collection< dw::fltk::FltkImgbuf::GammaCorrectionTable >, lout::container::typed::Collection< dw::fltk::FltkPlatform::IdleFunc >, lout::container::typed::Collection< dw::fltk::ui::FltkRadioButtonResource >, lout::container::typed::Collection< dw::fltk::ui::FltkResource >, lout::container::typed::Collection< dw::ImageMapsList::ImageMap::ShapeAndLink >, lout::container::typed::Collection< dw::oof::OOFFloatsMgr::Float >, lout::container::typed::Collection< dw::oof::OOFFloatsMgr::TBInfo >, lout::container::typed::Collection< dw::oof::OOFPositionedMgr::Child >, lout::container::typed::Collection< Float >, lout::container::typed::Collection< form::Form::FormClickedReceiver >, lout::container::typed::Collection< form::Form::ResourceDecorator >, lout::container::typed::Collection< Iterator >, lout::container::typed::Collection< K >, lout::container::typed::Collection< lout::identity::IdentifiableObject::Class >, lout::container::typed::Collection< lout::object::ConstString >, lout::container::typed::Collection< lout::object::Object >, lout::container::typed::Collection< lout::object::String >, lout::container::typed::Collection< lout::object::TypedPointer< dw::core::ImgRenderer > >, lout::container::typed::Collection< lout::object::TypedPointer< dw::core::Widget > >, lout::container::typed::Collection< lout::object::TypedPointer< dw::oof::OOFAwareWidget > >, lout::container::typed::Collection< lout::object::TypedPointer< Fl_Widget > >, lout::container::typed::Collection< lout::signal::Emitter >, lout::container::typed::Collection< lout::signal::Receiver >, lout::object::Pointer, lout::object::Integer, lout::object::Boolean, lout::object::ConstString, and lout::object::PairBase.
Definition at line 51 of file object.cc.
References lout::misc::assertNotReached().
Referenced by lout::container::untyped::HashSet::contains(), lout::container::untyped::List::equals(), lout::container::typed::Collection< T >::equals(), lout::object::PairBase::equals(), lout::container::untyped::HashSet::findNode(), lout::container::untyped::HashSet::remove(), and lout::container::untyped::List::remove0().
|
virtual |
Return a hash value for the object.
Reimplemented in dw::core::style::StyleAttrs, dw::core::style::FontAttrs, dw::core::style::ColorAttrs, lout::container::untyped::List, lout::container::typed::Collection< T >, lout::container::typed::Collection< dw::core::Rectangle >, lout::container::typed::Collection< dw::core::style::ColorAttrs >, lout::container::typed::Collection< dw::core::style::FontAttrs >, lout::container::typed::Collection< dw::core::style::StyleAttrs >, lout::container::typed::Collection< dw::core::Widget >, lout::container::typed::Collection< dw::fltk::FltkImgbuf >, lout::container::typed::Collection< dw::fltk::FltkImgbuf::GammaCorrectionTable >, lout::container::typed::Collection< dw::fltk::FltkPlatform::IdleFunc >, lout::container::typed::Collection< dw::fltk::ui::FltkRadioButtonResource >, lout::container::typed::Collection< dw::fltk::ui::FltkResource >, lout::container::typed::Collection< dw::ImageMapsList::ImageMap::ShapeAndLink >, lout::container::typed::Collection< dw::oof::OOFFloatsMgr::Float >, lout::container::typed::Collection< dw::oof::OOFFloatsMgr::TBInfo >, lout::container::typed::Collection< dw::oof::OOFPositionedMgr::Child >, lout::container::typed::Collection< Float >, lout::container::typed::Collection< form::Form::FormClickedReceiver >, lout::container::typed::Collection< form::Form::ResourceDecorator >, lout::container::typed::Collection< Iterator >, lout::container::typed::Collection< K >, lout::container::typed::Collection< lout::identity::IdentifiableObject::Class >, lout::container::typed::Collection< lout::object::ConstString >, lout::container::typed::Collection< lout::object::Object >, lout::container::typed::Collection< lout::object::String >, lout::container::typed::Collection< lout::object::TypedPointer< dw::core::ImgRenderer > >, lout::container::typed::Collection< lout::object::TypedPointer< dw::core::Widget > >, lout::container::typed::Collection< lout::object::TypedPointer< dw::oof::OOFAwareWidget > >, lout::container::typed::Collection< lout::object::TypedPointer< Fl_Widget > >, lout::container::typed::Collection< lout::signal::Emitter >, lout::container::typed::Collection< lout::signal::Receiver >, lout::object::Pointer, lout::object::Integer, lout::object::Boolean, lout::object::ConstString, lout::object::PairBase, and CssStyleSheet::RuleList.
Definition at line 60 of file object.cc.
Referenced by lout::container::untyped::HashSet::calcHashValue(), lout::container::untyped::List::hashValue(), lout::container::typed::Collection< T >::hashValue(), and lout::object::PairBase::hashValue().
|
virtual |
Store a textual representation of the object in a misc::StringBuffer.
This is used by object::Object::toString.
Reimplemented in dw::core::Iterator, dw::oof::OOFAwareWidget::OOFAwareWidgetIterator, dw::oof::OOFFloatsMgr::Float, lout::container::untyped::Collection, lout::container::untyped::HashTable, lout::container::typed::Collection< T >, lout::container::typed::Collection< dw::core::Rectangle >, lout::container::typed::Collection< dw::core::style::ColorAttrs >, lout::container::typed::Collection< dw::core::style::FontAttrs >, lout::container::typed::Collection< dw::core::style::StyleAttrs >, lout::container::typed::Collection< dw::core::Widget >, lout::container::typed::Collection< dw::fltk::FltkImgbuf >, lout::container::typed::Collection< dw::fltk::FltkImgbuf::GammaCorrectionTable >, lout::container::typed::Collection< dw::fltk::FltkPlatform::IdleFunc >, lout::container::typed::Collection< dw::fltk::ui::FltkRadioButtonResource >, lout::container::typed::Collection< dw::fltk::ui::FltkResource >, lout::container::typed::Collection< dw::ImageMapsList::ImageMap::ShapeAndLink >, lout::container::typed::Collection< dw::oof::OOFFloatsMgr::Float >, lout::container::typed::Collection< dw::oof::OOFFloatsMgr::TBInfo >, lout::container::typed::Collection< dw::oof::OOFPositionedMgr::Child >, lout::container::typed::Collection< Float >, lout::container::typed::Collection< form::Form::FormClickedReceiver >, lout::container::typed::Collection< form::Form::ResourceDecorator >, lout::container::typed::Collection< Iterator >, lout::container::typed::Collection< K >, lout::container::typed::Collection< lout::identity::IdentifiableObject::Class >, lout::container::typed::Collection< lout::object::ConstString >, lout::container::typed::Collection< lout::object::Object >, lout::container::typed::Collection< lout::object::String >, lout::container::typed::Collection< lout::object::TypedPointer< dw::core::ImgRenderer > >, lout::container::typed::Collection< lout::object::TypedPointer< dw::core::Widget > >, lout::container::typed::Collection< lout::object::TypedPointer< dw::oof::OOFAwareWidget > >, lout::container::typed::Collection< lout::object::TypedPointer< Fl_Widget > >, lout::container::typed::Collection< lout::signal::Emitter >, lout::container::typed::Collection< lout::signal::Receiver >, lout::identity::IdentifiableObject::Class, lout::identity::IdentifiableObject, lout::object::Pointer, lout::object::Integer, lout::object::Boolean, lout::object::ConstString, lout::object::PairBase, lout::signal::Emitter, and lout::signal::Receiver.
Definition at line 96 of file object.cc.
References lout::misc::StringBuffer::append(), and lout::misc::StringBuffer::appendPointer().
Referenced by lout::container::untyped::HashTable::intoStringBuffer(), lout::object::PairBase::intoStringBuffer(), and toString().
|
virtual |
Return the number of bytes, this object totally uses.
Reimplemented in lout::object::PairBase.
Definition at line 106 of file object.cc.
Referenced by lout::object::PairBase::sizeOf().
const char * lout::object::Object::toString | ( | ) |
Use object::Object::intoStringBuffer to return a textual representation of the object.
The caller does not have to free the memory, object::Object is responsible for this.
Definition at line 82 of file object.cc.
References dStrdup(), lout::misc::StringBuffer::getChars(), and intoStringBuffer().
Referenced by lout::container::untyped::HashSet::clearNode(), lout::container::untyped::HashTable::clearNode(), testHashSet(), testHashTable(), testVector1(), testVector2(), lout::container::untyped::HashSet::~HashSet(), and lout::container::untyped::HashTable::~HashTable().