#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. | |
For convenience, none of them are abstract, but they must be defined, when they are needed, especially for containers.
| lout::object::Object::~Object | ( | ) | [virtual] |
The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly.
| Object * lout::object::Object::clone | ( | ) | [virtual] |
Return an exact copy of the object.
Reimplemented in dw::core::EmptyIterator, dw::core::DeepIterator, dw::core::CharIterator, dw::Table::TableIterator, and dw::Textblock::TextblockIterator.
References lout::misc::assertNotReached().
Referenced by dw::core::Iterator::cloneIterator().
| bool lout::object::Object::equals | ( | Object * | other | ) | [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, lout::object::Pointer, lout::object::Integer, lout::object::ConstString, and lout::object::PairBase.
References lout::misc::assertNotReached().
Referenced by lout::container::untyped::HashTable::contains(), lout::object::PairBase::equals(), lout::container::untyped::HashTable::get(), lout::container::untyped::HashTable::getKey(), lout::container::untyped::HashTable::remove(), and lout::container::untyped::List::remove0().
| int lout::object::Object::hashValue | ( | ) | [virtual] |
Return a hash value for the object.
Reimplemented in dw::core::style::StyleAttrs, dw::core::style::FontAttrs, dw::core::style::ColorAttrs, lout::object::Pointer, lout::object::Integer, lout::object::ConstString, and lout::object::PairBase.
Referenced by lout::container::untyped::HashTable::calcHashValue(), and lout::object::PairBase::hashValue().
| void lout::object::Object::intoStringBuffer | ( | misc::StringBuffer * | sb | ) | [virtual] |
Store a textual representation of the object in a misc::StringBuffer.
This is used by object::Object::toString.
Reimplemented in lout::container::untyped::Collection, lout::container::untyped::HashTable, lout::container::typed::Collection< T >, lout::identity::IdentifiableObject, lout::object::Pointer, lout::object::Integer, lout::object::ConstString, lout::object::PairBase, lout::signal::Emitter, lout::signal::Receiver, lout::container::typed::Collection< FltkRadioButtonResource >, lout::container::typed::Collection< Class >, lout::container::typed::Collection< ui::FltkResource >, lout::container::typed::Collection< FltkImgbuf >, lout::container::typed::Collection< dw::core::style::ColorAttrs >, lout::container::typed::Collection< Receiver >, lout::container::typed::Collection< lout::object::Object >, lout::container::typed::Collection< T >, lout::container::typed::Collection< lout::object::TypedPointer< Fl_Widget > >, lout::container::typed::Collection< Emitter >, lout::container::typed::Collection< dw::core::style::FontAttrs >, lout::container::typed::Collection< ShapeAndLink >, lout::container::typed::Collection< lout::object::ConstString >, lout::container::typed::Collection< IdleFunc >, lout::container::typed::Collection< StyleAttrs >, lout::container::typed::Collection< K >, lout::container::typed::Collection< Rectangle >, lout::container::typed::Collection< object::ConstString >, lout::container::typed::Collection< lout::object::String >, and lout::container::typed::Collection< Iterator >.
References lout::misc::StringBuffer::append().
Referenced by lout::object::PairBase::intoStringBuffer(), and toString().
| size_t lout::object::Object::sizeOf | ( | ) | [virtual] |
Return the number of bytes, this object totally uses.
Reimplemented in lout::object::PairBase.
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.
References lout::misc::StringBuffer::getChars(), and intoStringBuffer().
1.5.9