ComponentInterfaceCache Class Reference

#include <componentInterface.h>

List of all members.


Detailed Description

This class is just designed to isolate the functionality of querying for, and managing interfaces.


Public Member Functions

virtual bool add (const char *type, const char *name, const SimComponent *owner, ComponentInterface *cinterface)
 Add an interface to the cache.
virtual void clear ()
 Clear the interface cache.
virtual U32 enumerate (ComponentInterfaceList *list, const char *type=NULL, const char *name=NULL, const SimComponent *owner=NULL, bool notOwner=false) const
 Query the list for all of the interfaces it stores references to that match the 'type' and 'name' parameters.

Private Types

typedef Vector< _InterfaceEntry
>::const_iterator 
_InterfaceEntryItr

Private Attributes

Vector< _InterfaceEntrymInterfaceList

Classes

struct  _InterfaceEntry


Member Typedef Documentation


Member Function Documentation

virtual bool ComponentInterfaceCache::add ( const char *  type,
const char *  name,
const SimComponent owner,
ComponentInterface cinterface 
) [virtual]

Add an interface to the cache.

This function will return true if the interface is added successfully. An interface will not be added successfully if an entry in the list with the same values for 'type' and 'name' is present in the list.

Parameters:
type Type of the interface being added. If NULL is passed, it will match any type string queried.
name Name of interface being added. If NULL is passed, it will match any name string queried.
owner The owner of the ComponentInterface being cached
cinterface The ComponentInterface being cached

virtual void ComponentInterfaceCache::clear (  )  [virtual]

Clear the interface cache.

This does not perform any operations on the contents of the list.

virtual U32 ComponentInterfaceCache::enumerate ( ComponentInterfaceList list,
const char *  type = NULL,
const char *  name = NULL,
const SimComponent owner = NULL,
bool  notOwner = false 
) const [virtual]

Query the list for all of the interfaces it stores references to that match the 'type' and 'name' parameters.

The results of the query will be appended to the list specified. Pattern matching is done using core/findMatch.h; for more information on matching, see that code/header pair. Passing NULL for one of these fields will match all values for that field. The return value for the method will be the number of interfaces which match the query.

Parameters:
list The list that this method will append search results on to. It is possible to pass NULL here and just receive the return value.
type An expression which the 'type' field on an added object must match to be included in results
name An expression which the 'name' field on an added object must match to be included in results
owner Limit results to components owned/not-owned by this SimComponent (see next param)
notOwner If set to true, this will enumerate only interfaces NOT owned by 'owner'


Member Data Documentation