dillo  3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
  Fossies Dox: dillo-3.0.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

lout::object::Object Class Reference

This is the base class for many other classes, which defines very common virtual methods. More...

#include <object.hh>

Inheritance diagram for lout::object::Object:
[legend]

Public Member Functions

virtual ~Object ()
 The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. More...
 
virtual bool equals (Object *other)
 Returns, whether two objects are equal. More...
 
virtual int hashValue ()
 Return a hash value for the object. More...
 
virtual Objectclone ()
 Return an exact copy of the object. More...
 
virtual void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer. More...
 
const char * toString ()
 Use object::Object::intoStringBuffer to return a textual representation of the object. More...
 
virtual size_t sizeOf ()
 Return the number of bytes, this object totally uses. More...
 

Detailed Description

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.

Definition at line 24 of file object.hh.

Constructor & Destructor Documentation

◆ ~Object()

lout::object::Object::~Object ( )
virtual

The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly.

Definition at line 39 of file object.cc.

Member Function Documentation

◆ clone()

Object * lout::object::Object::clone ( )
virtual

◆ equals()

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 lout::object::PairBase, lout::object::ConstString, lout::object::Integer, lout::object::Pointer, dw::core::Iterator, dw::core::style::ColorAttrs, dw::core::style::FontAttrs, dw::core::style::StyleAttrs, and CssStyleSheet::RuleList.

Definition at line 50 of file object.cc.

References lout::misc::assertNotReached().

Referenced by lout::container::untyped::HashSet::contains(), lout::object::PairBase::equals(), lout::container::untyped::HashSet::findNode(), lout::container::untyped::HashSet::remove(), and lout::container::untyped::List::remove0().

◆ hashValue()

◆ intoStringBuffer()

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::typed::Collection< T >, lout::container::typed::Collection< dw::core::style::StyleAttrs >, lout::container::typed::Collection< dw::fltk::FltkImgbuf >, lout::container::typed::Collection< dw::core::Rectangle >, lout::container::typed::Collection< lout::object::String >, lout::container::typed::Collection< dw::ImageMapsList::ImageMap::ShapeAndLink >, lout::container::typed::Collection< lout::signal::Receiver >, lout::container::typed::Collection< lout::object::Object >, lout::container::typed::Collection< lout::signal::Emitter >, lout::container::typed::Collection< dw::core::style::ColorAttrs >, lout::container::typed::Collection< dw::fltk::FltkPlatform::IdleFunc >, lout::container::typed::Collection< dw::core::style::FontAttrs >, lout::container::typed::Collection< dw::fltk::ui::FltkResource >, lout::container::typed::Collection< dw::fltk::ui::FltkRadioButtonResource >, lout::container::typed::Collection< Iterator >, lout::container::typed::Collection< lout::object::TypedPointer< dw::core::ImgRenderer > >, lout::container::typed::Collection< lout::identity::IdentifiableObject::Class >, lout::container::typed::Collection< dw::fltk::FltkImgbuf::GammaCorrectionTable >, lout::container::typed::Collection< K >, lout::container::typed::Collection< lout::object::ConstString >, lout::container::typed::Collection< lout::object::TypedPointer< Fl_Widget > >, lout::container::untyped::HashTable, lout::signal::Receiver, lout::signal::Emitter, lout::object::PairBase, lout::identity::IdentifiableObject, lout::object::ConstString, lout::object::Integer, lout::container::untyped::Collection, and lout::object::Pointer.

Definition at line 95 of file object.cc.

References lout::misc::StringBuffer::append().

Referenced by lout::object::PairBase::intoStringBuffer(), lout::container::untyped::HashTable::intoStringBuffer(), and toString().

◆ sizeOf()

size_t lout::object::Object::sizeOf ( )
virtual

Return the number of bytes, this object totally uses.

Reimplemented in lout::object::PairBase.

Definition at line 103 of file object.cc.

Referenced by lout::object::PairBase::sizeOf().

◆ toString()

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.

Todo:
garbage!

Definition at line 81 of file object.cc.

References lout::misc::StringBuffer::getChars(), and intoStringBuffer().

Referenced by lout::container::untyped::HashSet::clearNode(), lout::container::untyped::HashTable::clearNode(), lout::container::untyped::HashSet::~HashSet(), and lout::container::untyped::HashTable::~HashTable().


The documentation for this class was generated from the following files: