MAK Legion API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Typedefs | Functions
c_view.h File Reference

Go to the source code of this file.

Typedefs

typedef void(* C_InstanceCallback )(void *usr, const InstanceHandle *instances, UInt32 count)
 The C_InstanceCallback function prototype The callback functions are executed when new instance get added or an existing instance get removed. More...
 
typedef void(* C_InstanceUpdateCallback )(void *usr, const LEG_InstanceUpdateData *instances, UInt32 count, int cbIndex)
 The C_InstanceUpdateCallback function prototype The callback functions are executed when an existing instance is updated. More...
 
typedef int(* C_PredicateCallback )(void *usr, InstanceHandle instance)
 The C_PredicateCallback function prototype The predicate callback are executes to check whether the instance passes the user defined predicate. More...
 

Functions

LEGIONRUNTIME_DLL LEG_ReturnCode legion_viewManager_createView (ViewManagerHandle managerHandle, AttributeSetId setType, LEG_Scope scope, const char *name, ViewHandle *view)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_viewManager_destoryView (ViewManagerHandle managerHandle, ViewHandle view)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_initialize (ViewHandle view)
 
LEGIONRUNTIME_DLL const char * legion_view_name (ViewHandle view)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_scope (ViewHandle view, LEG_Scope *scope)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_attributeSet (ViewHandle view, AttributeSetId *setType)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_count (ViewHandle view, UInt32 *count)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_instances (ViewHandle view, InstanceHandle **instances, UInt32 *count)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_reset (ViewHandle view, UInt32 *size)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_addInstanceAddedCallback (ViewHandle view, C_InstanceCallback func, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_removeInstanceAddedCallback (ViewHandle view, C_InstanceCallback cb, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_addInstanceMovedCallback (ViewHandle view, C_InstanceCallback cb, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_removeInstanceMovedCallback (ViewHandle view, C_InstanceCallback cb, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_addInstanceRemovedCallback (ViewHandle view, C_InstanceCallback cb, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_removeInstanceRemovedCallback (ViewHandle view, C_InstanceCallback cb, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_addInstanceUpdatedCallback (ViewHandle view, C_InstanceUpdateCallback cb, const int *cbFilterList, const int cbFilterListCount, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_removeInstanceUpdatedCallback (ViewHandle view, C_InstanceUpdateCallback cb, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_addPredicate (ViewHandle view, C_PredicateCallback cb, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_removePredicate (ViewHandle view, C_PredicateCallback cb, void *usr)
 

Typedef Documentation

typedef void(* C_InstanceCallback)(void *usr, const InstanceHandle *instances, UInt32 count)

The C_InstanceCallback function prototype The callback functions are executed when new instance get added or an existing instance get removed.

typedef void(* C_InstanceUpdateCallback)(void *usr, const LEG_InstanceUpdateData *instances, UInt32 count, int cbIndex)

The C_InstanceUpdateCallback function prototype The callback functions are executed when an existing instance is updated.

typedef int(* C_PredicateCallback)(void *usr, InstanceHandle instance)

The C_PredicateCallback function prototype The predicate callback are executes to check whether the instance passes the user defined predicate.

Function Documentation

LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_addInstanceAddedCallback ( ViewHandle  view,
C_InstanceCallback  func,
void *  usr 
)

Add and register callback function to be called whenever new instances are added

Parameters
[in]viewThe view handle
[in]funcApplication's callback function
[in]usrUser data passed to the callback function
See Also
C_InstanceCallback
Returns
LEG_ReturnCode, 0 indicates success, non 0 error code indicates failure

Referenced by Legion::SetView< SET_TYPE >::SetView().

LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_addInstanceMovedCallback ( ViewHandle  view,
C_InstanceCallback  cb,
void *  usr 
)

Add and register the callback function to be called whenever an instance is moved

Parameters
[in]viewThe view handle
[in]funcApplication's callback function
[in]usrUser data passed to the callback function
See Also
C_InstanceCallback
Returns
LEG_ReturnCode, 0 indicates success, non 0 error code indicates failure

Referenced by Legion::SetView< SET_TYPE >::SetView().

LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_addInstanceRemovedCallback ( ViewHandle  view,
C_InstanceCallback  cb,
void *  usr 
)

Add and register instance removed callback. Executed user provided function whenever an instance is removed

Parameters
[in]viewThe view handle
[in]funcApplication's callback function
[in]usrUser data passed to the callback function
See Also
C_InstanceCallback
Returns
LEG_ReturnCode, 0 indicates success, non 0 error code indicates failure

Referenced by Legion::SetView< SET_TYPE >::SetView().

LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_addInstanceUpdatedCallback ( ViewHandle  view,
C_InstanceUpdateCallback  cb,
const int *  cbFilterList,
const int  cbFilterListCount,
void *  usr 
)

Add and register instance update callback. Executed user provided function whenever an instance is updated

Parameters
[in]viewThe view handle
[in]funcApplication's callback function
[in]usrUser data passed to the callback function
See Also
C_InstanceUpdateCallback
Returns
LEG_ReturnCode, 0 indicates success, non 0 error code indicates failure

Referenced by Legion::SetView< SET_TYPE >::addInstanceUpdatedCallback().

LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_addPredicate ( ViewHandle  view,
C_PredicateCallback  cb,
void *  usr 
)

Add and register predicate callback. Executed user provided function to check if an instance is passed the user defined predicate

Parameters
[in]viewThe view handle
[in]funcApplication's callback function
[in]usrUser data passed to the callback function
See Also
C_PredicateCallback
Returns
LEG_ReturnCode, 0 indicates success, non 0 error code indicates failure

Referenced by Legion::SetView< SET_TYPE >::SetView().

LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_attributeSet ( ViewHandle  view,
AttributeSetId setType 
)

Get the attributeSet identifier from a view

Parameters
[in]viewThe view handle
[out]setTypeReturn the attributeSet identifier
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_count ( ViewHandle  view,
UInt32 count 
)

Get instance count of a view

Parameters
[in]viewThe view handle
[out]countReturn the instance count
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_initialize ( ViewHandle  view)

Initialize a view object

Parameters
[in]viewPass in the view handle to initialize the view
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_instances ( ViewHandle  view,
InstanceHandle **  instances,
UInt32 count 
)

Get instances of a view

Parameters
[in]viewThe view handle
[out]instancesReturn the instance handles
[out]countReturn the count of instance handles
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure

Referenced by Legion::SetView< SET_TYPE >::rebuildInstanceList().

LEGIONRUNTIME_DLL const char* legion_view_name ( ViewHandle  view)

Get the view name from view handle

LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_removeInstanceAddedCallback ( ViewHandle  view,
C_InstanceCallback  cb,
void *  usr 
)

Remove and unregister the instance added callback function Do not executed user provided function whenever new instances are added

Parameters
[in]viewThe view handle
[in]funcApplication's callback function
[in]usrUser data passed to the callback function
Returns
LEG_ReturnCode, 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_removeInstanceMovedCallback ( ViewHandle  view,
C_InstanceCallback  cb,
void *  usr 
)

Remove and unregister instance move callback. Do not executed user provided function whenever an instance is moved

Parameters
[in]viewThe view handle
[in]funcApplication's callback function
[in]usrUser data passed to the callback function
Returns
LEG_ReturnCode, 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_removeInstanceRemovedCallback ( ViewHandle  view,
C_InstanceCallback  cb,
void *  usr 
)

Remove and unregister instance removed callback. Do not executed user provided function whenever an instance is removed

Parameters
[in]viewThe view handle
[in]funcApplication's callback function
[in]usrUser data passed to the callback function
Returns
LEG_ReturnCode, 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_removeInstanceUpdatedCallback ( ViewHandle  view,
C_InstanceUpdateCallback  cb,
void *  usr 
)

Remove and unregister instance updated callback. Do not executed user provided function whenever an instance is ipdated

Parameters
[in]viewThe view handle
[in]funcApplication's callback function
[in]usrUser data passed to the callback function
Returns
LEG_ReturnCode, 0 indicates success, non 0 error code indicates failure

Referenced by Legion::SetView< SET_TYPE >::removeInstanceUpdatedCallback().

LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_removePredicate ( ViewHandle  view,
C_PredicateCallback  cb,
void *  usr 
)

Remove and unregister predicate callback. Do not executed user provided function to check against user defined predicate

Parameters
[in]viewThe view handle
[in]funcApplication's callback function
[in]usrUser data passed to the callback function
Returns
LEG_ReturnCode, 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_reset ( ViewHandle  view,
UInt32 size 
)

Rebuild and reset the view

Parameters
[in]viewThe view handle
[out]sizeReturn the number of instances after reset
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_view_scope ( ViewHandle  view,
LEG_Scope scope 
)

Get the scope info from a view

Parameters
[in]viewThe view handle
[out]scopeReturn the scope of the view
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_viewManager_createView ( ViewManagerHandle  managerHandle,
AttributeSetId  setType,
LEG_Scope  scope,
const char *  name,
ViewHandle view 
)

Creates a view object

Parameters
[in]managerHandleThe handle of view manager
[in]setTypeThe attributeSet type indentifier
[in]scopeThe scope of view, one of localView, remoteView, and all views
[out]viewReturn the view handle created
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure

Referenced by Legion::ViewManager::createSetView().

LEGIONRUNTIME_DLL LEG_ReturnCode legion_viewManager_destoryView ( ViewManagerHandle  managerHandle,
ViewHandle  view 
)

Delete a view object

Parameters
[in]managerHandleThe handle of view manager
[in]viewThe view handle to be deleted
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure

Document ID: Generated on Mon Mar 8 15:11:30 EST 2021 from SVN revision 225633
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)