File: plugins.txt

package info (click to toggle)
ray 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,128 kB
  • ctags: 6,125
  • sloc: cpp: 49,973; sh: 325; makefile: 278; python: 168
file content (74 lines) | stat: -rw-r--r-- 2,662 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

The application programming interface for plugins is all in the class ComputeCore.

## Relationships:

CorePlugin  <--->  MasterModeHandler (an adapter)  <---> ComputeCore
CorePlugin  <--->  SlaveModeHandler (an adapter)  <---> ComputeCore
CorePlugin  <--->  MessageTagHandler (an adapter)  <---> ComputeCore

see RayPlatform/core/ComputeCore.h

Macros can be used to push adapters on the ComputeCore instance.
Otherwise, the code must be written for adapters (declaration, implementation, binding).


## in the .h file of a plugin, before the class declaration

__DeclarePlugin(PluginExample)	->	declares a plugin. this is required because adapters need a forward declaration

__DeclareMasterModeAdapter(PluginExample,MASTER_MODE_EXAMPLE)	->	declares a master mode adapter for a plugin

__DeclareSlaveModeAdapter(PluginExample,SLAVE_MODE_EXAMPLE)	->	declares a slave mode adapter for a plugin

__DeclareMessageTagAdapter(PluginExample,MESSAGE_TAG_EXAMPLE)	->	declares a message tag adapter for a plugin


## in the .h file of a plugin, inside the class declaration

__AddAdapter(PluginExample,MASTER_MODE_EXAMPLE)

__AddAdapter(PluginExample,SLAVE_MODE_EXAMPLE)

__AddAdapter(PluginExample,MESSAGE_TAG_EXAMPLE)


## in the .cpp file of a plugin, before the first method implementation

__CreatePlugin(PluginExample)  -> this is used when mini-ranks are not enabled.

__CreateMasterModeAdapter(PluginExample,MASTER_MODE_EXAMPLE)	->	creates the actual code for a master mode adapter

__CreateSlaveModeAdapter(PluginExample,SLAVE_MODE_EXAMPLE)	->	creates the actual code for a slave mode adapter

__CreateSlaveModeAdapter(PluginExample,MESSAGE_TAG_EXAMPLE)	->	creates the actual code for a message tag adapter


## in the .cpp file of a plugin, inside registerPlugin or resolveSymbols

__GetAdapter(PluginExample,MASTER_MODE_EXAMPLE)	->	gets the reference to an adapter

__GetAdapter(PluginExample,SLAVE_MODE_EXAMPLE)	->	gets the reference to an adapter

__GetAdapter(PluginExample,MESSAGE_TAG_EXAMPLE)	->	gets the reference to an adapter

__BindPlugin(PluginExample)	-> binds a plugin

__BindAdapter(PluginExample,MASTER_MODE_EXAMPLE)	->	binds a adapter

__BindAdapter(PluginExample,SLAVE_MODE_EXAMPLE)	->	binds a adapter

__BindAdapter(PluginExample,MESSAGE_TAG_EXAMPLE)	->	binds a adapter



## Simplified API

It is possible to use only a single API call to configure a given handler.


__ConfigureMasterModeHandler(PluginExample, MASTER_MODE_EXAMPLE);  -> configure a handler

__ConfigureSlaveModeHandler(PluginExample, SLAVE_MODE_EXAMPLE);    -> configure a handler

__ConfigureMessageTagHandler(PluginExample, MESSAGE_TAG_EXAMPLE);  -> configure a handler