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

VCF::DefaultTreeModel Class Reference

#include <vcf/ApplicationKit/DefaultTreeModel.h>

Inheritance diagram for VCF::DefaultTreeModel:

VCF::TreeModel VCF::Model VCF::Component VCF::ObjectWithCallbacks VCF::Object VCF::TreeListModel List of all members.

Public Member Functions

 DefaultTreeModel ()
virtual ~DefaultTreeModel ()
virtual void empty ()
 clears out the model's data
virtual VariantData get (const Key &key)
virtual bool getChildren (const Key &key, std::vector< Key > &children)
virtual Key getParent (const Key &key)
virtual Key getNextSibling (const Key &key)
virtual Key getPrevSibling (const Key &key)
virtual Key getFirstChild (const Key &key)
virtual bool isLeaf (const Key &key)
virtual uint32 getCount ()
 Returns the number of keys in this model.
virtual uint32 getChildCount (const Key &key)
virtual uint64 sizeOf () const
 Returns the size of this instance.

Protected Types

typedef std::map< TreeModel::Key,
TreeValRef
DataMap
typedef std::multimap< TreeModel::Key,
TreeModel::Key
HierarchyMap
typedef std::pair< HierarchyMap::iterator,
HierarchyMap::iterator > 
HierarchyRange
typedef HierarchyMap::value_type HierarchyValue

Protected Member Functions

virtual Key doInsert (const VariantData &value, const Key &parentKey=RootKey)
virtual Key doRemove (const Key &key)
virtual bool doSet (const Key &key, const VariantData &value)
virtual Key doMove (const Key &srcKey, const Key &destParentKey)
virtual bool doClearChildren (const Key &key)
TreeModel::Key removeFromHierarchy (TreeModel::Key key)
void insertRef (TreeValRef &ref, TreeModel::Key parentKey)

Protected Attributes

DataMap data_
HierarchyMap hierarchy_
uint32 lastKey_

Classes

struct  TreeValRef

Member Typedef Documentation

typedef std::map<TreeModel::Key, TreeValRef> VCF::DefaultTreeModel::DataMap [protected]
 

typedef std::multimap<TreeModel::Key,TreeModel::Key> VCF::DefaultTreeModel::HierarchyMap [protected]
 

typedef std::pair<HierarchyMap::iterator,HierarchyMap::iterator> VCF::DefaultTreeModel::HierarchyRange [protected]
 

typedef HierarchyMap::value_type VCF::DefaultTreeModel::HierarchyValue [protected]
 


Constructor & Destructor Documentation

VCF::DefaultTreeModel::DefaultTreeModel  ) 
 

virtual VCF::DefaultTreeModel::~DefaultTreeModel  )  [virtual]
 


Member Function Documentation

virtual bool VCF::DefaultTreeModel::doClearChildren const Key key  )  [protected, virtual]
 

virtual Key VCF::DefaultTreeModel::doInsert const VariantData value,
const Key parentKey = RootKey
[protected, virtual]
 

virtual Key VCF::DefaultTreeModel::doMove const Key srcKey,
const Key destParentKey
[protected, virtual]
 

virtual Key VCF::DefaultTreeModel::doRemove const Key key  )  [protected, virtual]
 

virtual bool VCF::DefaultTreeModel::doSet const Key key,
const VariantData value
[protected, virtual]
 

virtual void VCF::DefaultTreeModel::empty  )  [virtual]
 

clears out the model's data

Reimplemented from VCF::Model.

Reimplemented in VCF::TreeListModel.

virtual VariantData VCF::DefaultTreeModel::get const Key key  )  [virtual]
 

virtual uint32 VCF::DefaultTreeModel::getChildCount const Key key  )  [virtual]
 

virtual bool VCF::DefaultTreeModel::getChildren const Key key,
std::vector< Key > &  children
[virtual]
 

virtual uint32 VCF::DefaultTreeModel::getCount  )  [virtual]
 

Returns the number of keys in this model.

Implements VCF::TreeModel.

virtual Key VCF::DefaultTreeModel::getFirstChild const Key key  )  [virtual]
 

virtual Key VCF::DefaultTreeModel::getNextSibling const Key key  )  [virtual]
 

virtual Key VCF::DefaultTreeModel::getParent const Key key  )  [virtual]
 

virtual Key VCF::DefaultTreeModel::getPrevSibling const Key key  )  [virtual]
 

void VCF::DefaultTreeModel::insertRef TreeValRef ref,
TreeModel::Key  parentKey
[protected]
 

virtual bool VCF::DefaultTreeModel::isLeaf const Key key  )  [virtual]
 

TreeModel::Key VCF::DefaultTreeModel::removeFromHierarchy TreeModel::Key  key  )  [protected]
 

virtual uint64 VCF::DefaultTreeModel::sizeOf  )  const [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 from VCF::Object.


Member Data Documentation

DataMap VCF::DefaultTreeModel::data_ [protected]
 

HierarchyMap VCF::DefaultTreeModel::hierarchy_ [protected]
 

uint32 VCF::DefaultTreeModel::lastKey_ [protected]
 


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