DumontEXE 0.0.1
Public Slots | Signals | Public Member Functions | Private Attributes
cmcObjects Class Reference

Collection Manager. More...

#include <cmcObjects.h>

Inheritance diagram for cmcObjects:

List of all members.

Public Slots

virtual long add (cmcObject *object)
 Add an item to the collection.
virtual bool contains (const QString &name)
 Check children for a named item.
virtual long count (void)
 Number of items in the collection.
cmcObjectget (const long index)
 Get an item by index number.
cmcObjectget (const QString &name)
 Get an item by item name.
virtual long indexOf (const QString &name)
 Return the index of an item.
virtual QStringList list (void)
 String List of all children.
void on_objectDestroyed (QObject *object)
 Signal when an object is destroyed.
virtual long remove (cmcObject *object)
 Remove an item from the collection.

Signals

void objectAdded (cmcObject *object)
 Inticate when an object has been added.
void objectRemoved (cmcObject *object)
 Indicate when an object has been removed.

Public Member Functions

 cmcObjects (cmcObject *parent=NULL)
 Basic Constructor.
 cmcObjects (const QString &objectName, cmcApplication *application, cmcObject *parent)
 Application Constructor.

Private Attributes

QList< cmcObject * > m_objects
 the object collection

Detailed Description

Collection Manager.

Definition at line 41 of file cmcObjects.h.


Constructor & Destructor Documentation

cmcObjects ( cmcObject parent = NULL)

Basic Constructor.

Definition at line 37 of file cmcObjects.cpp.

cmcObjects ( const QString &  objectName,
cmcApplication application,
cmcObject parent 
)

Application Constructor.

Definition at line 42 of file cmcObjects.cpp.


Member Function Documentation

long add ( cmcObject object) [virtual, slot]

Add an item to the collection.

Definition at line 59 of file cmcObjects.cpp.

bool contains ( const QString &  name) [virtual, slot]

Check children for a named item.

Reimplemented in cmcConnectionDefs.

Definition at line 170 of file cmcObjects.cpp.

long count ( void  ) [virtual, slot]

Number of items in the collection.

Reimplemented in cmcCategoryDefs, cmcConnectionDefs, cmcCursors, cmcFieldDefs, cmcFormDefs, cmcForms, and cmcViewDefs.

Definition at line 52 of file cmcObjects.cpp.

cmcObject * get ( const long  index) [slot]

Get an item by index number.

Reimplemented in cmcCategoryDefs, cmcConnectionDefs, cmcCursors, cmcFieldDefs, cmcFormDefs, cmcForms, and cmcViewDefs.

Definition at line 121 of file cmcObjects.cpp.

cmcObject * get ( const QString &  name) [slot]

Get an item by item name.

Bug:
This function searches, first, the object names to find a match for an item. If an item could not be found, then it searches for an item by its alias name. This, however, is a problem, because upon requesting the alias name, some of the xml code starts to run. The problem with this is, this xml code is running before we have the object document fully initialized. Therefore, we have split the search for the object name vs the alias name up into two separate searches. This way, when the object is first initializing we can pretty much count on that we are going to request an item NOT by its alias name, and that this request is going to come at the point of object initialization. This is safe. The object gets constructed, the document gets loaded, and the world is fine. After the object is loaded then regular alias searches can proceed without any trouble. Ideally, however, we would prefer that the xml system didn't suffer from this sort of anomoly, since we're really not sure why its a problem to request dom stuff before the document is loaded. It might be because we are caching dom elements and then ruining the cached items by reloading the document. Need to work on this. It is probably going to cause a problem in the system when dumont is used on an application that is not CDA Readyness.

Reimplemented in cmcCategoryDefs, cmcConnectionDefs, cmcCursors, cmcFieldDefs, cmcFormDefs, cmcForms, and cmcViewDefs.

Definition at line 155 of file cmcObjects.cpp.

long indexOf ( const QString &  name) [virtual, slot]

Return the index of an item.

Bug:
There are some problems with this indexOf function. It is scanning children() for items, and returning index values of them, but all of the children might not be loaded yet. They really need to get loaded. The objects collection really needs to be upgraded to a dynamic-cache sort of operation.

Definition at line 183 of file cmcObjects.cpp.

QStringList list ( void  ) [virtual, slot]

String List of all children.

Definition at line 165 of file cmcObjects.cpp.

void objectAdded ( cmcObject object) [signal]

Inticate when an object has been added.

This is an internal function for use by the cmcDatabaseApi

When objects are added to this collection, a signal is emitted with a reference to the object. Interested clients can receive this signal and respond to changes in the collection.

void objectRemoved ( cmcObject object) [signal]

Indicate when an object has been removed.

This is an internal function for use by the cmcDatabaseApi

When objects are removed from this collection, a signal is emitted with a reference to the object. Interested clients can receive this signal and respond to changes in the collection.

void on_objectDestroyed ( QObject *  object) [slot]

Signal when an object is destroyed.

This is an internal function for use by the cmcDatabaseApi

In the cmcDatabaseApi framework, when an object is destroyed, by any process or function, that object emits a signal that indicates the destruction of itself. If the object is part of one or more collections (like this one) a signal is sent here, to this function. This function takes care of removing the reference to that object from this collection.

Definition at line 212 of file cmcObjects.cpp.

long remove ( cmcObject object) [virtual, slot]

Remove an item from the collection.

Definition at line 91 of file cmcObjects.cpp.


Member Data Documentation

QList<cmcObject*> m_objects [private]

the object collection

Definition at line 182 of file cmcObjects.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com