Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Function Class Reference

A Function object corresponds to a function member of a window. More...

#include <Function.h>

Collaboration diagram for Function:

Public Types

enum  { MAX_NUMARG =14 }
 
enum  { F_FUNC, C_FUNC, CPP_MEMBER }
 

Public Member Functions

Constructors
 Function ()
 Default constructor. More...
 
 Function (Func_ptr p, const std::string &s, const int *t, Attribute *a, bool b=false)
 Create a function object with physical address p. More...
 
 Function (Member_func_ptr p, const std::string &s, const int *t, Attribute *a)
 
Access methods
Func_ptr pointer ()
 Get physical address of the function. More...
 
int num_of_args () const
 Get the number of arguments. More...
 
bool is_input (int i) const
 Check whether the ith argument is for input. More...
 
bool is_output (int i) const
 Check whether the ith argument is for output. More...
 
bool is_literal (int i) const
 Check whether the ith argument is literal type. More...
 
bool is_optional (int i) const
 Check whether the ith argument is optional. More...
 
bool is_rawdata (int i) const
 Check whether the ith argument is raw. More...
 
bool is_metadata (int i) const
 Check whether the ith argument is meta. More...
 
bool is_fortran () const
 
COM_Type data_type (int i) const
 
char intent (int i) const
 
void set_communicator (MPI_Comm c)
 
MPI_Comm communicator () const
 
Attributeattribute ()
 
Invocation
void operator() ()
 
void operator() (void *a1)
 
void operator() (void *a1, void *a2)
 
void operator() (void *a1, void *a2, void *a3)
 
void operator() (void *a1, void *a2, void *a3, void *a4)
 
void operator() (void *a1, void *a2, void *a3, void *a4, void *a5)
 
void operator() (void *a1, void *a2, void *a3, void *a4, void *a5, void *a6)
 
void operator() (void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7)
 
void operator() (void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8)
 
void operator() (void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9)
 
void operator() (void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9, void *a10)
 
void operator() (void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9, void *a10, void *a11)
 
void operator() (void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9, void *a10, void *a11, void *a12)
 
void operator() (void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9, void *a10, void *a11, void *a12, void *a13)
 
void operator() (void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9, void *a10, void *a11, void *a12, void *a13, void *a14)
 
void operator() (int n, void **ps) throw (COM_exception)
 invoke with an array of arguments More...
 

Private Member Functions

void validate_object (void *a1)
 

Private Attributes

union {
   Func_ptr   _ptr
 Pointer to a regular function. More...
 
   Member_func_ptr   _mem_ptr
 Pointer to a member function. More...
 
}; 
 
std::string _intents
 Intention of the argument. More...
 
std::vector< COM_Type_types
 Data type of the arguments. More...
 
Attribute_attr
 Member function. More...
 
MPI_Comm _comm
 
int _ftype
 Indicate the type of the function. More...
 

Detailed Description

A Function object corresponds to a function member of a window.

It can take up to MAX_NUMARG arguments of void* type (excluding the implicit arguments) and return no value.

Definition at line 49 of file Function.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MAX_NUMARG 

Definition at line 51 of file Function.h.

anonymous enum
Enumerator
F_FUNC 
C_FUNC 
CPP_MEMBER 

Definition at line 52 of file Function.h.

Constructor & Destructor Documentation

Function ( )
inline

Default constructor.

Definition at line 58 of file Function.h.

58  : _ptr(NULL), _attr(NULL), _comm(MPI_COMM_NULL),
59  _ftype(C_FUNC) {}
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Attribute * _attr
Member function.
Definition: Function.h:401
MPI_Comm _comm
Definition: Function.h:402
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
Function ( Func_ptr  p,
const std::string &  s,
const int *  t,
Attribute a,
bool  b = false 
)
inline

Create a function object with physical address p.

Parameters
pphysical address of the function.
sthe intentions of the arguments. Its length indicates the number of arguments. Each entry indicates the intention of its corresponding argument: 'i'/'I' for input-only; 'o'/'O' for output-only; 'b'/'B' for input and output. Uppercase indicates optional arguments.
tthe data types of the arguments. If it is COM_METADATA, then the argument should be a pointer to an attribute. If it is COM_RAWDATA, then argument should be the physical address of the values of an attribute. Otherwise, it is literal type and the argument should be a pointer to corresponding data type.
aattribute with which a member functions is associated.
bwhether the function is a Fortran subroutine

Definition at line 77 of file Function.h.

79  : _ptr(p), _intents(s), _types( t, t+s.size()), _attr(a),
80  _comm(MPI_COMM_NULL), _ftype( b?F_FUNC:C_FUNC) {}
double s
Definition: blastest.C:80
std::string _intents
Intention of the argument.
Definition: Function.h:398
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Attribute * _attr
Member function.
Definition: Function.h:401
MPI_Comm _comm
Definition: Function.h:402
std::vector< COM_Type > _types
Data type of the arguments.
Definition: Function.h:400
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
Function ( Member_func_ptr  p,
const std::string &  s,
const int *  t,
Attribute a 
)
inline

Definition at line 81 of file Function.h.

83  : _mem_ptr(p), _intents(s), _types( t, t+s.size()), _attr(a),
84  _comm(MPI_COMM_NULL),_ftype(CPP_MEMBER) {}
double s
Definition: blastest.C:80
std::string _intents
Intention of the argument.
Definition: Function.h:398
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Attribute * _attr
Member function.
Definition: Function.h:401
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
MPI_Comm _comm
Definition: Function.h:402
std::vector< COM_Type > _types
Data type of the arguments.
Definition: Function.h:400

Member Function Documentation

Attribute* attribute ( )
inline

Definition at line 121 of file Function.h.

References _attr.

Referenced by Roccom_base::call_function().

121 { return _attr; }
Attribute * _attr
Member function.
Definition: Function.h:401

Here is the caller graph for this function:

COM_Type data_type ( int  i) const
inline

Definition at line 115 of file Function.h.

References _types, and i.

Referenced by Roccom_base::call_function().

115 { return _types[i]; }
blockLoc i
Definition: read.cpp:79
std::vector< COM_Type > _types
Data type of the arguments.
Definition: Function.h:400

Here is the caller graph for this function:

char intent ( int  i) const
inline

Definition at line 116 of file Function.h.

References _intents, and i.

Referenced by Roccom_base::call_function().

116 { return _intents[i]; }
std::string _intents
Intention of the argument.
Definition: Function.h:398
blockLoc i
Definition: read.cpp:79

Here is the caller graph for this function:

bool is_fortran ( ) const
inline

Definition at line 114 of file Function.h.

References _ftype, and F_FUNC.

Referenced by Roccom_base::call_function().

114 { return _ftype==F_FUNC; }
int _ftype
Indicate the type of the function.
Definition: Function.h:403

Here is the caller graph for this function:

bool is_input ( int  i) const
inline

Check whether the ith argument is for input.

Definition at line 95 of file Function.h.

References _intents, and i.

96  { return _intents[i]!='o' && _intents[i]!='O'; }
std::string _intents
Intention of the argument.
Definition: Function.h:398
blockLoc i
Definition: read.cpp:79
bool is_literal ( int  i) const
inline

Check whether the ith argument is literal type.

Definition at line 101 of file Function.h.

References _types, COM_F90POINTER, COM_METADATA, COM_RAWDATA, and i.

Referenced by Roccom_base::call_function().

102  { return _types[i] != COM_RAWDATA && _types[i] != COM_F90POINTER &&
103  _types[i] != COM_METADATA; }
blockLoc i
Definition: read.cpp:79
std::vector< COM_Type > _types
Data type of the arguments.
Definition: Function.h:400

Here is the caller graph for this function:

bool is_metadata ( int  i) const
inline

Check whether the ith argument is meta.

Definition at line 111 of file Function.h.

References _types, COM_METADATA, and i.

112  { return _types[i] == COM_METADATA; }
blockLoc i
Definition: read.cpp:79
std::vector< COM_Type > _types
Data type of the arguments.
Definition: Function.h:400
bool is_optional ( int  i) const
inline

Check whether the ith argument is optional.

Definition at line 105 of file Function.h.

References _intents, and i.

Referenced by Roccom_base::call_function().

106  { return _intents[i]>='A' && _intents[i]<='Z'; }
std::string _intents
Intention of the argument.
Definition: Function.h:398
blockLoc i
Definition: read.cpp:79

Here is the caller graph for this function:

bool is_output ( int  i) const
inline

Check whether the ith argument is for output.

Definition at line 98 of file Function.h.

References _intents, and i.

99  { return _intents[i]!='i' && _intents[i]!='I'; }
std::string _intents
Intention of the argument.
Definition: Function.h:398
blockLoc i
Definition: read.cpp:79
bool is_rawdata ( int  i) const
inline

Check whether the ith argument is raw.

Definition at line 108 of file Function.h.

References _types, COM_F90POINTER, COM_RAWDATA, and i.

Referenced by Roccom_base::call_function().

109  { return _types[i] == COM_RAWDATA || _types[i] == COM_F90POINTER; }
blockLoc i
Definition: read.cpp:79
std::vector< COM_Type > _types
Data type of the arguments.
Definition: Function.h:400

Here is the caller graph for this function:

int num_of_args ( ) const
inline

Get the number of arguments.

Definition at line 93 of file Function.h.

References _intents.

Referenced by Roccom_base::call_function(), and Roccom_base::get_num_arguments().

93 { return _intents.size(); }
std::string _intents
Intention of the argument.
Definition: Function.h:398

Here is the caller graph for this function:

void operator() ( )
inline

Definition at line 129 of file Function.h.

References _ptr.

Referenced by operator()().

129 { _ptr(); }
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395

Here is the caller graph for this function:

void operator() ( void *  a1)
inline

Definition at line 131 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

131  {
132  if ( _ftype!=CPP_MEMBER) {
133  typedef void(*Func1)(void*);
134  (*(Func1)(_ptr))(a1);
135  }
136  else {
137  typedef void(COM_Object::*Member_Func1)();
138  Member_Func1 f = (Member_Func1)_mem_ptr;
139  validate_object( a1);
140  (reinterpret_cast<COM_Object*>(a1)->*f)();
141  }
142  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2 
)
inline

Definition at line 144 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

144  {
145  if ( _ftype!=CPP_MEMBER) {
146  typedef void(*Func2)(void*,void*);
147  (*(Func2)(_ptr))(a1,a2);
148  }
149  else {
150  typedef void(COM_Object::*Member_Func2)(void*);
151  Member_Func2 f = (Member_Func2)_mem_ptr;
152  validate_object(a1);
153  (reinterpret_cast<COM_Object*>(a1)->*f)(a2);
154  }
155  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3 
)
inline

Definition at line 157 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

157  {
158  if ( _ftype!=CPP_MEMBER) {
159  typedef void(*Func3)(void*,void*,void*);
160  (*(Func3)(_ptr))(a1,a2,a3);
161  }
162  else {
163  typedef void(COM_Object::*Member_Func3)(void*,void*);
164  Member_Func3 f = (Member_Func3)_mem_ptr;
165  validate_object(a1);
166  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3);
167  }
168  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4 
)
inline

Definition at line 171 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

171  {
172  if ( _ftype!=CPP_MEMBER) {
173  typedef void(*Func4)(void*,void*,void*,void*);
174  (*(Func4)(_ptr))(a1,a2,a3,a4);
175  }
176  else {
177  typedef void(COM_Object::*Member_Func4)(void*,void*,void*);
178  Member_Func4 f = (Member_Func4)_mem_ptr;
179  validate_object( a1);
180  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4);
181  }
182  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4,
void *  a5 
)
inline

Definition at line 185 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

185  {
186  if ( _ftype!=CPP_MEMBER) {
187  typedef void(*Func5)(void*,void*,void*,void*,void*);
188  (*(Func5)(_ptr))(a1,a2,a3,a4,a5);
189  }
190  else {
191  typedef void(COM_Object::*Member_Func5)(void*,void*,void*,void*);
192  Member_Func5 f = (Member_Func5)_mem_ptr;
193  validate_object( a1);
194  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4,a5);
195  }
196  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4,
void *  a5,
void *  a6 
)
inline

Definition at line 199 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

200  {
201  if ( _ftype!=CPP_MEMBER) {
202  typedef void(*Func6)(void*,void*,void*,void*,void*,void*);
203  (*(Func6)(_ptr))(a1,a2,a3,a4,a5,a6);
204  }
205  else {
206  typedef void(COM_Object::*Member_Func6)(void*,void*,void*,void*,void*);
207  Member_Func6 f = (Member_Func6)_mem_ptr;
208  validate_object( a1);
209  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4,a5,a6);
210  }
211  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4,
void *  a5,
void *  a6,
void *  a7 
)
inline

Definition at line 214 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

215  {
216  if ( _ftype!=CPP_MEMBER) {
217  typedef void(*Func7)(void*,void*,void*,void*,void*,void*,void*);
218  (*(Func7)(_ptr))(a1,a2,a3,a4,a5,a6,a7);
219  }
220  else {
221  typedef void(COM_Object::*Member_Func7)(void*,void*,void*,void*,
222  void*,void*);
223  Member_Func7 f = (Member_Func7)_mem_ptr;
224  validate_object( a1);
225  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4,a5,a6,a7);
226  }
227  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4,
void *  a5,
void *  a6,
void *  a7,
void *  a8 
)
inline

Definition at line 230 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

231  {
232  if ( _ftype!=CPP_MEMBER) {
233  typedef void(*Func8)(void*,void*,void*,void*,void*,void*,void*,void*);
234  (*(Func8)(_ptr))(a1,a2,a3,a4,a5,a6,a7,a8);
235  }
236  else {
237  typedef void(COM_Object::*Member_Func8)(void*,void*,void*,void*,
238  void*,void*,void*);
239  Member_Func8 f = (Member_Func8)_mem_ptr;
240  validate_object( a1);
241  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8);
242  }
243  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4,
void *  a5,
void *  a6,
void *  a7,
void *  a8,
void *  a9 
)
inline

Definition at line 246 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

247  {
248  if ( _ftype!=CPP_MEMBER) {
249  typedef void(*Func9)(void*,void*,void*,void*,void*,void*,
250  void*,void*,void*);
251  (*(Func9)(_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9);
252  }
253  else {
254  typedef void(COM_Object::*Member_Func9)(void*,void*,void*,void*,void*,
255  void*,void*,void*);
256  Member_Func9 f = (Member_Func9)_mem_ptr;
257  validate_object( a1);
258  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9);
259  }
260  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4,
void *  a5,
void *  a6,
void *  a7,
void *  a8,
void *  a9,
void *  a10 
)
inline

Definition at line 263 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

264  {
265  if ( _ftype!=CPP_MEMBER) {
266  typedef void(*Func10)(void*,void*,void*,void*,void*,void*,
267  void*,void*,void*,void*);
268  (*(Func10)(_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
269  }
270  else {
271  typedef void(COM_Object::*Member_Func10)(void*,void*,void*,void*,void*,
272  void*,void*,void*,void*);
273  Member_Func10 f = (Member_Func10)_mem_ptr;
274  validate_object( a1);
275  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9,a10);
276  }
277  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4,
void *  a5,
void *  a6,
void *  a7,
void *  a8,
void *  a9,
void *  a10,
void *  a11 
)
inline

Definition at line 280 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

281  {
282  if ( _ftype!=CPP_MEMBER) {
283  typedef void(*Func11)(void*,void*,void*,void*,void*,void*,
284  void*,void*,void*,void*,void*);
285  (*(Func11)(_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
286  }
287  else {
288  typedef void(COM_Object::*Member_Func11)(void*,void*,void*,void*,void*,
289  void*,void*,void*,void*,void*);
290  Member_Func11 f = (Member_Func11)_mem_ptr;
291  validate_object( a1);
292  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
293  }
294  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4,
void *  a5,
void *  a6,
void *  a7,
void *  a8,
void *  a9,
void *  a10,
void *  a11,
void *  a12 
)
inline

Definition at line 297 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

299  {
300 
301  if ( _ftype!=CPP_MEMBER) {
302  typedef void(*Func11)(void*,void*,void*,void*,void*,void*,
303  void*,void*,void*,void*,void*,void*);
304  (*(Func11)(_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
305  }
306  else {
307  typedef void(COM_Object::*Member_Func11)(void*,void*,void*,void*,void*,
308  void*,void*,void*,void*,void*,void*);
309  Member_Func11 f = (Member_Func11)_mem_ptr;
310  validate_object( a1);
311  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
312  }
313 
314  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4,
void *  a5,
void *  a6,
void *  a7,
void *  a8,
void *  a9,
void *  a10,
void *  a11,
void *  a12,
void *  a13 
)
inline

Definition at line 317 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

319  {
320 
321  if ( _ftype!=CPP_MEMBER) {
322  typedef void(*Func11)(void*,void*,void*,void*,void*,void*,
323  void*,void*,void*,void*,void*,void*,void*);
324  (*(Func11)(_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13);
325  }
326  else {
327  typedef void(COM_Object::*Member_Func11)(void*,void*,void*,void*,void*,
328  void*,void*,void*,void*,void*,void*,void*);
329  Member_Func11 f = (Member_Func11)_mem_ptr;
330  validate_object( a1);
331  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13);
332  }
333  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( void *  a1,
void *  a2,
void *  a3,
void *  a4,
void *  a5,
void *  a6,
void *  a7,
void *  a8,
void *  a9,
void *  a10,
void *  a11,
void *  a12,
void *  a13,
void *  a14 
)
inline

Definition at line 336 of file Function.h.

References _ftype, _mem_ptr, _ptr, CPP_MEMBER, and validate_object().

338  {
339 
340  if ( _ftype!=CPP_MEMBER) {
341  typedef void(*Func11)(void*,void*,void*,void*,void*,void*,
342  void*,void*,void*,void*,void*,void*,void*,void*);
343  (*(Func11)(_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14);
344  }
345  else {
346  typedef void(COM_Object::*Member_Func11)(void*,void*,void*,void*,void*,
347  void*,void*,void*,void*,void*,void*,void*,void*);
348  Member_Func11 f = (Member_Func11)_mem_ptr;
349  validate_object( a1);
350  (reinterpret_cast<COM_Object*>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14);
351  }
352  }
int _ftype
Indicate the type of the function.
Definition: Function.h:403
Member_func_ptr _mem_ptr
Pointer to a member function.
Definition: Function.h:396
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void validate_object(void *a1)
Definition: Function.h:384

Here is the call graph for this function:

void operator() ( int  n,
void **  ps 
)
throw (COM_exception
)
inline

invoke with an array of arguments

Definition at line 357 of file Function.h.

References COM_ERR_TOO_MANY_ARGS, n, and operator()().

358  {
359 
360  switch ( n)
361  {
362  case 0: operator()(); break;
363  case 1: operator()( ps[0] ); break;
364  case 2: operator()( ps[0],ps[1] ); break;
365  case 3: operator()( ps[0],ps[1],ps[2] ); break;
366  case 4: operator()( ps[0],ps[1],ps[2],ps[3] ); break;
367  case 5: operator()( ps[0],ps[1],ps[2],ps[3],ps[4] ); break;
368  case 6: operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5] ); break;
369  case 7: operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6] ); break;
370  case 8: operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7] ); break;
371  case 9: operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8] ); break;
372  case 10:operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9] ); break;
373  case 11:operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10] ); break;
374  case 12:operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11] ); break;
375  case 13:operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12] ); break;
376  case 14:operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12],ps[13] ); break;
377  default: throw COM_exception(COM_ERR_TOO_MANY_ARGS);
378  }
379 
380  }
Encapsulates the states of an exception.
void operator()()
Definition: Function.h:129
const NT & n

Here is the call graph for this function:

Func_ptr pointer ( )
inline

Get physical address of the function.

Definition at line 91 of file Function.h.

91 { return _ptr; }
Func_ptr _ptr
Pointer to a regular function.
Definition: Function.h:395
void set_communicator ( MPI_Comm  c)
inline

Definition at line 118 of file Function.h.

References _comm.

Referenced by Roccom_base::set_profiling_barrier().

118 { _comm = c; }
MPI_Comm _comm
Definition: Function.h:402

Here is the caller graph for this function:

void validate_object ( void *  a1)
inlineprivate

Definition at line 384 of file Function.h.

References COM_assertion_msg.

Referenced by operator()().

384  {
385  int ierr = reinterpret_cast<COM_Object*>(a1)->validate_object(a1);
386  switch ( ierr) {
387  case 1: COM_assertion_msg( ierr==0, "Invalid pointer after casting");
388  case 3: COM_assertion_msg( ierr==0, "Invalid pointer and cookie after casting");
389  default:;
390  }
391  }
#define COM_assertion_msg(EX, msg)
void validate_object(void *a1)
Definition: Function.h:384

Here is the caller graph for this function:

Member Data Documentation

union { ... }
Attribute* _attr
private

Member function.

Definition at line 401 of file Function.h.

Referenced by attribute().

MPI_Comm _comm
private

Definition at line 402 of file Function.h.

Referenced by communicator(), and set_communicator().

int _ftype
private

Indicate the type of the function.

Definition at line 403 of file Function.h.

Referenced by is_fortran(), and operator()().

std::string _intents
private

Intention of the argument.

Its length indicates the number of arguments

Definition at line 398 of file Function.h.

Referenced by intent(), is_input(), is_optional(), is_output(), and num_of_args().

Member_func_ptr _mem_ptr

Pointer to a member function.

Definition at line 396 of file Function.h.

Referenced by operator()().

Func_ptr _ptr

Pointer to a regular function.

Definition at line 395 of file Function.h.

Referenced by operator()().

std::vector<COM_Type> _types
private

Data type of the arguments.

Definition at line 400 of file Function.h.

Referenced by data_type(), is_literal(), is_metadata(), and is_rawdata().


The documentation for this class was generated from the following file: