[Classes] [Prev] [Next] [Methods]

CResourceItems

Methods Index

Heritage
Description
Usage
Protected Data Members
Public Methods
Constructor and Destructor
Copy and Assignment
Resource Item Methods

CResourceItems


Heritage

Superclass: CNotifier

Subclasses: None


Description

CResourceItems is a convenience class which automatically takes care of holding and releasing the resource it is associated with.

To use this convenience class, a resource must already be registered with CResourceMgr. If the resource has not been created (therefore registered with CResourceMgr), CResourceItems constructor will assert.


Usage

// Get resource (will hold and release accordingly):
CResourceItems theRes(theMenu);
theRes.First(); // reset iteratation

// Traverse through menubar and add submenu
// accordingly:
long theMenuId;
while (theMenuId = theRes.Next()) {
CSubmenu theSubmenu;
theRes.IObject(theMenuId, &theSubmenu);
// creates nested items/submenus
AppendSubmenu(theSubmenu);
}

Protected Data Members

CResource* itsResource The associated resource


Public Methods

Constructor and Destructor

CResourceItems(long theId);
virtual ~CResourceItems(void);

Copy and Assignment

CResourceItems(const CResourceItems &theResource);
CResourceItems & operator = (
const CResourceItems &theResource);

Resource Item Methods

virtual long First(void);
virtual long Next(void);
virtual long GetType(long theId);
virtual BOOLEAN IObject(long theId, 
CObjectRWC *theObject);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.