API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IACTORCONTEXT_CREATECACHECONTAINER()

Brew Release
Brew MP 1.0.2
See Also
IVFSCONTAINER_MaxItems() IVFSCONTAINER_SetMaxItems() IVFSCONTAINER_ItemsInUse()
Description
This function creates a new 'standard' container object with an IVfsCacheContainer interface. The object can cache up to a given number of child nodes, taken from a set of indefinite size.
Params
po
[]:
pointer to the IActorContext interface object
name
[]:
The name to give to the new IVfsNode object
items
[]:
The maximum number of children to be contained by this node
parent
[]:
The container which is to contain the new IVfsNode object
flags
[]:
Options for the node - see "Flags values for the CreateXxx calls" above
pN
[]:
[out] Address at which to store a pointer to the new node.
Interface
  • IACTORCONTEXT
Prototype
  •    int IACTORCONTEXT_CreateStructContainer(IActorContext * po,VfsPathElement name,uint16 items,IVfsContainer * parent,uint32 flags,IVfsCacheContainer ** pN)
    
Return
  •    SUCCESS, or standard BREW error code.
    
Side Effect
  • None
Comments
Cache containers require an IVfsCacheModel to be set before they can be used. The new node needs to be added to its parent container after creation. Unless ACTORCONTEXT_CREATE_PRIVATE_VTABLE is specified in the flags argument, the node shares its VTable with other nodes created using this method; therefore the VTable may NOT be modified. Note that it is possible to create a node with no cache slots, and then to use IVFSNODE_SetMaxItems() to set the required number of slots. The IActorContext COPIES the name into the new node (so name may be a local variable).