Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::Object Class Reference

Base class for the entire Visual Component Framework. More...

#include <vcf/FoundationKit/Object.h>

Inheritance diagram for VCF::Object:

VCF::AbstractCommand VCF::AbstractComponentEditor VCF::AbstractImage VCF::AsyncResult VCF::BasicFill VCF::BasicRectangle VCF::BasicStroke VCF::BezierCurve VCF::BinaryPersistable VCF::BMPLoader VCF::CallBack VCF::Clipboard VCF::Color VCF::CommandLine VCF::ComponentEditorManager VCF::ComponentInfo VCF::ComponentSetting VCF::Condition VCF::Cursor VCF::CursorManager VCF::DataObject VCF::DateTime VCF::Dictionary VCF::Directory::Finder VCF::DockManager VCF::DragSource VCF::Ellipse VCF::Enum VCF::ErrorLog VCF::Event VCF::File VCF::FileStreamBase VCF::Font VCF::Frame::State VCF::GradientFill VCF::GraphicsContext VCF::GraphicsToolkit VCF::IPAddress VCF::JavaScriptEngine VCF::JPEGLoader VCF::Library VCF::LightweightComponent VCF::LinuxFilePeer VCF::LinuxProcessIORedirector VCF::LinuxRegistry VCF::LinuxResourceBundle VCF::LinuxSemaphorePeer VCF::Locale VCF::Lock VCF::Matrix2D VCF::Mutex VCF::ObjectWithCallbacks VCF::OSXApplicationPeer VCF::OSXColorDialog VCF::OSXConditionPeer VCF::OSXContext VCF::OSXCursorPeer VCF::OSXDesktopPeer VCF::OSXDragDropPeer VCF::OSXDropTargetPeer VCF::OSXFileOpenDialog VCF::OSXFilePeer VCF::OSXFileSaveDialog VCF::OSXFolderBrowseDialog VCF::OSXFont VCF::OSXLightweightControl VCF::OSXPopupMenu VCF::OSXRegistry VCF::OSXResourceBundle VCF::OSXScrollPeer VCF::OSXWindow VCF::PNGLoader VCF::Point VCF::PrintSession VCF::Process VCF::ProcessWithRedirectedIO VCF::ProgramInfo VCF::PropertyEditorManager VCF::Rect VCF::Registry VCF::RegistryValueInfo VCF::Resource VCF::ResourceBundle VCF::Semaphore VCF::ShadowFill VCF::Size VCF::Socket VCF::StringTokenizer VCF::Thread VCF::UIMetricsManager VCF::UIShell VCF::URL VCF::VariantArray VCF::VFFInputStream VCF::VFFOutputStream VCF::VFFParser VCF::Win32Application VCF::Win32ColorDialog VCF::Win32Condition VCF::Win32Context VCF::Win32CursorPeer VCF::Win32DragDropPeer VCF::Win32DropTargetPeer VCF::Win32FileOpenDialog VCF::Win32FilePeer VCF::Win32FileSaveDialog VCF::Win32FolderBrowseDialog VCF::Win32FontDialog VCF::Win32FontHandle VCF::Win32FontManager VCF::Win32Mutex VCF::Win32PopupMenu VCF::Win32PrintDialog VCF::Win32PrintSession VCF::Win32ProcessIORedirector VCF::Win32Registry VCF::Win32ResourceBundle VCF::Win32ScrollPeer VCF::Win32SystemTrayPeer VCF::Win32UIShell VCF::XMLAttr VCF::XmlDocument VCF::XMLNode VCF::XmlNode VCFCOM::DataRendering List of all members.

Public Member Functions

 Object ()
 Object (const Object &obj)
virtual ~Object ()
virtual long addRef (Object *owner=NULL)
 increments the reference count of the object
virtual long release (Object *owner=NULL)
 decrements the reference count of the object
long getRefCount () const
 returns the number of outstanding references for this object
virtual String toString () const
 returns a string representation of the object
virtual void setFromString (const String &val)
 provides a simple to initialize the object from a string.
String getClassName () const
 returns the class name of the object.
virtual bool isEqual (Object *object) const
 This determines if object is equal to this the equivalent of operator ==().
virtual void copy (Object *source)
 Copies the data from source to this object.
virtual Objectclone (bool deep=false) const
 Makes a complete clone of this object.
Objectoperator= (const Object &rhs)
ClassgetClass () const
 returns the RTTI Class instance associated object of this type
virtual uintptr hash () const
 returns a hash value that represents the object instance
virtual uint64 sizeOf () const
 Returns the size of this instance.
uint32 totalAllocatedObjectMemory ()

Static Public Member Functions

static void trackDebugMemory (const bool &trackMemory)
 indicates whether or not debug memory should be tracked.
static bool isDebugMemoryTracked ()
 returns whether or not debug memory tracking is on
static uint32 objectAllocationCount ()
 returns the total number of objects currently allocated.

Protected Attributes

AtomicCount refCount_

Detailed Description

Base class for the entire Visual Component Framework.


Constructor & Destructor Documentation

VCF::Object::Object  ) 
 

VCF::Object::Object const Object obj  ) 
 

virtual VCF::Object::~Object  )  [virtual]
 


Member Function Documentation

virtual long VCF::Object::addRef Object owner = NULL  )  [virtual]
 

increments the reference count of the object

Parameters:
Object* the optional owner of the new referenced object for use in future, more sophisticated refcounting schemes
Returns:
long the current reference count of the object

virtual Object* VCF::Object::clone bool  deep = false  )  const [inline, virtual]
 

Makes a complete clone of this object.

A typical implementation might be:

    virtual Object* clone( bool deep ) {
        return new MyObject( this );
    }
In which the implementer simply creates a new instance on the heap and calls the copy constructor. Objects which support cloning should also have a copy constructor defined as well.

Parameters:
bool deep if deep is true then any object instances that this object owns should probably be cloned as well, with full new copies made. Otherwise it would be acceptable to simply copy the pointer values. The default value is for deep cloning to be false.
Returns:
Object a new instance that should be an copy of this. If the object doesn't support cloning the return will value will be NULL.

Reimplemented in VCF::ComponentEvent, VCF::Dictionary, VCF::Event, VCF::OutputReadyEvent, VCF::PropertyChangeEvent, VCF::ThreadEvent, VCF::DefaultMenuItem, VCF::XmlNode, and VCF::XmlDocument.

virtual void VCF::Object::copy Object source  )  [inline, virtual]
 

Copies the data from source to this object.

This is the equivalent of operator=()

Reimplemented in VCF::Color, VCF::Font, and VCF::Matrix2D.

Class* VCF::Object::getClass  )  const
 

returns the RTTI Class instance associated object of this type

String VCF::Object::getClassName  )  const
 

returns the class name of the object.

long VCF::Object::getRefCount  )  const [inline]
 

returns the number of outstanding references for this object

virtual uintptr VCF::Object::hash  )  const [virtual]
 

returns a hash value that represents the object instance

static bool VCF::Object::isDebugMemoryTracked  )  [static]
 

returns whether or not debug memory tracking is on

Returns:
bool true if debug memory tracking is turned on, otherwise false

virtual bool VCF::Object::isEqual Object object  )  const [inline, virtual]
 

This determines if object is equal to this the equivalent of operator ==().

Reimplemented in VCF::Matrix2D.

static uint32 VCF::Object::objectAllocationCount  )  [static]
 

returns the total number of objects currently allocated.

Only meaningful for _DEBUG builds with memory tracking turned on.

Returns:
uint32 if debug memory tracking is turned on, and the _DEBUG symbol is defined, then this value will be the total count of object instances that are currently allocated. For any other conditions it will return 0.

Object& VCF::Object::operator= const Object rhs  )  [inline]
 

virtual long VCF::Object::release Object owner = NULL  )  [virtual]
 

decrements the reference count of the object

Parameters:
Object* the optional owner of the new referenced object for use in future, more sophisticated refcounting schemes when the refCount_ drops to 0 the object is destroyed

virtual void VCF::Object::setFromString const String val  )  [inline, virtual]
 

provides a simple to initialize the object from a string.

Reimplemented in VCF::Enum, and VCF::Color.

virtual uint64 VCF::Object::sizeOf  )  const [inline, virtual]
 

Returns the size of this instance.

This may be signifigantly bigger than, say, sizeof(Object). For example, if your class derives from Object, and has list of other objects, (such as a Component), and various other bits, then these may not all show up in the value returned by sizeof(). Take a vector, a vector of ints or a vector of Object uses up 16 bytes, as reported by sizeof(). But the actual memory used will be quite different, partially dependent on how many items are in the vector. Hence the existence of this function, which allows people to implement something that does a better job of reporting how much memory the object in quest is actually using. The default implementation simply returns sizeof(Object).

Reimplemented in VCF::DefaultTreeModel, VCF::TreeControl, and VCF::TreeItem.

virtual String VCF::Object::toString  )  const [virtual]
 

returns a string representation of the object

Reimplemented in VCF::DateTime, VCF::PropertyListing, VCF::XMLAttr, VCF::XMLNode, VCF::Color, VCF::Point, VCF::Rect, VCF::Size, VCFCOM::DataRendering, VCF::XmlNode, and VCF::XmlDocument.

uint32 VCF::Object::totalAllocatedObjectMemory  ) 
 

static void VCF::Object::trackDebugMemory const bool &  trackMemory  )  [static]
 

indicates whether or not debug memory should be tracked.

Note that debug memory is tracked only in debug builds (meaning the VCF has been compiled with the _DEBUG symbol defined). Memory tracking is turned off for release builds.

Parameters:
bool if this is true, then memory will be tracked, and when the FoundationKit::terminate() is called, the system will check how many outstanding objects (i.e. any class instance that derives from VCF::Object directly or indirectly) there are. It will then perform a diagnostic dump, displaying the memory address and the class name of the object instance


Member Data Documentation

AtomicCount VCF::Object::refCount_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information