#include <cmath>
#include <cstdio>
#include "problem.h"
#include "component.h"
#include "object.h"
#include "inverse.h"
#include "requests.h"
#include "sparkmath.h"
#include "sparkapi.h"
#include "classapi.h"
#include "consts.h"
Include dependency graph for spark.h:
Go to the source code of this file.
Preprocessor macro definitions used in the implementation of the various callbacks in the atomic classes | |
| |
#define | CALLBACK_DECLSPEC(callback_type) extern "C" callback_type |
#define | NON_MODIFIER_CALLBACK(func) CALLBACK_DECLSPEC(void) func(SPARK::TObject* this_pointer, SPARK::ArgList args) |
Macros to define the prototype for a modifier callback. | |
#define | MODIFIER_CALLBACK(func) CALLBACK_DECLSPEC(void) func(SPARK::TObject* this_pointer, SPARK::ArgList args, SPARK::TargetList targets) |
Macros to define the prototype for a non-modifier callback. | |
#define | PREDICATE_CALLBACK(func) CALLBACK_DECLSPEC(bool) func(SPARK::TObject* this_pointer, SPARK::ArgList args) |
Macros to define the prototype for a predicate callback. | |
#define | STATIC_NON_MODIFIER_CALLBACK(func) CALLBACK_DECLSPEC(void) func(SPARK::TInverse* this_pointer) |
Macros to define the prototype for a static callback. | |
#define | STATIC_PREDICATE_CALLBACK(func) CALLBACK_DECLSPEC(bool) func(SPARK::TInverse* this_pointer) |
Macros to define the prototype for a static predicate callback. | |
#define | EVALUATE(func) MODIFIER_CALLBACK( func ) |
Macros to declare an EVALUATE callback. | |
#define | PREDICT(func) MODIFIER_CALLBACK( func ) |
Macros to declare a PREDICT callback. | |
#define | CONSTRUCT(func) NON_MODIFIER_CALLBACK( func ) |
Macros to declare a CONSTRUCT callback. | |
#define | PREPARE_STEP(func) NON_MODIFIER_CALLBACK( func ) |
Macros to declare a PREPARE_STEP callback. | |
#define | CHECK_INTEGRATION_STEP(func) PREDICATE_CALLBACK( func ) |
Macros to declare a CHECK_INTEGRATION_STEP callback. | |
#define | COMMIT(func) NON_MODIFIER_CALLBACK( func ) |
Macros to declare a COMMIT callback. | |
#define | ROLLBACK(func) NON_MODIFIER_CALLBACK( func ) |
Macros to declare a ROLLBACK callback. | |
#define | DESTRUCT(func) NON_MODIFIER_CALLBACK( func ) |
Macros to declare a DESTRUCT callback. | |
#define | STATIC_CONSTRUCT(func) STATIC_NON_MODIFIER_CALLBACK( func ) |
Macros to declare a STATIC_CONSTRUCT callback. | |
#define | STATIC_PREPARE_STEP(func) STATIC_NON_MODIFIER_CALLBACK( func ) |
Macros to declare a STATIC_PREPARE_STEP callback. | |
#define | STATIC_CHECK_INTEGRATION_STEP(func) STATIC_PREDICATE_CALLBACK( func ) |
Macros to declare a STATIC_CHECK_INTEGRATION_STEP callback. | |
#define | STATIC_COMMIT(func) STATIC_NON_MODIFIER_CALLBACK( func ) |
Macros to declare a STATIC_COMMIT callback. | |
#define | STATIC_ROLLBACK(func) STATIC_NON_MODIFIER_CALLBACK( func ) |
Macros to declare a STATIC_ROLLBACK callback. | |
#define | STATIC_DESTRUCT(func) STATIC_NON_MODIFIER_CALLBACK( func ) |
Macros to declare a STATIC_DESTRUCT callback. | |
#define | TARGET(pos, name) SPARK::TTarget& name = targets[pos] |
A macro that defines a reference named "name" to the TTarget object stored in position "pos" of the target list. | |
#define | ARGUMENT(pos, name) const SPARK::TArgument& name = args[pos] |
A macro that defines a const reference named "name" to the TArgument object of the argument stored in position "pos". | |
#define | ARGDEF(pos, name) ARGUMENT( pos, name ) |
A macro that defines a const reference named "name" to the TArgument object of the argument stored in position "pos". | |
#define | RETURN(val) { targets[0] = val; return; } |
A macro that returns the scalar val for a single-valued inverse. | |
#define | ACCEPT_STEP true |
Macros used in predicate callbacks to indicate that the step is accepted. | |
#define | REJECT_STEP false |
Macros used in predicate callbacks to indicate that the step is rejected. | |
Preprocessor macros to access active context from within a callback | |
#define | THIS this_pointer |
A macro to access the pointer to the current "this" pointer associated with the current callback. | |
#define | GET_DATA(owner, concrete_type, name) concrete_type* name = SPARK::AtomicClass::GetData<concrete_type>( owner ) |
A macro to access the pointer to the private data object stored as part of an object. | |
#define | SET_DATA(owner, concrete_type, name) SPARK::AtomicClass::SetData<concrete_type>( owner, name ) |
A macro to store the pointer to the private data stored as part of an object. | |
#define | DELETE_DATA(owner, concrete_type, is_array_flag) SPARK::AtomicClass::DeleteData<concrete_type, SPARK::deleter<is_array_flag> >( owner ) |
A macro to delete data pointed to by an object. | |
#define | ACTIVE_PROBLEM THIS->GetProblem() |
Returns pointer to TProblem object this object belongs to. | |
#define | ACTIVE_INVERSE THIS->GetInverse() |
Returns pointer to TInverse object this object belongs to. | |
#define | ACTIVE_COMPONENT THIS->GetComponent() |
Returns pointer to TComponent object this object belongs to. | |
#define | ERROR_LOG(msg) SPARK::Log( SPARK::GetErrorLog(), THIS, __LINE__, msg ) |
Writes msg specified as const char* to the error log file. | |
#define | RUN_LOG(msg) SPARK::Log( SPARK::GetRunLog(), THIS, __LINE__, msg ) |
Writes msg specified as const char* to the run log file. | |
Preprocessor macros to send a request to the active problem from within a callback | |
#define | REQUEST__HEADER(sender, target, context) SPARK::Requests::THeader( (sender), (target), (context) ) |
Macro to generate a request header with specific context information as const char* . | |
#define | REQUEST__ABORT(context) SPARK::Requests::TDispatcher::abort( REQUEST__HEADER( THIS, ACTIVE_PROBLEM, context ) ) |
Macro to send an abort request from an atomic class. | |
#define | REQUEST__STOP(context) SPARK::Requests::TDispatcher::stop( REQUEST__HEADER( THIS, ACTIVE_PROBLEM, context ) ) |
Macro to send a stop request from an atomic class. | |
#define | REQUEST__SET_STOP_TIME(context, time) SPARK::Requests::TDispatcher::set_stop_time( REQUEST__HEADER( THIS, ACTIVE_PROBLEM, context ), time ) |
Macro to send a set stop time request from an atomic class. | |
#define | REQUEST__REPORT(context) SPARK::Requests::TDispatcher::report( REQUEST__HEADER( THIS, ACTIVE_PROBLEM, context ) ) |
Macro to send a report request from an atomic class. | |
#define | REQUEST__SNAPSHOT(context, filename) SPARK::Requests::TDispatcher::snapshot( REQUEST__HEADER( THIS, ACTIVE_PROBLEM, context ), filename ) |
Macro to send a snapshot request from an atomic class. | |
#define | REQUEST__SET_MEETING_POINT(context, time) SPARK::Requests::TDispatcher::set_meeting_point( REQUEST__HEADER( THIS, ACTIVE_PROBLEM, context ), time ) |
Macro to send a request to synchronize with a meeting point from an atomic class. | |
#define | REQUEST__CLEAR_MEETING_POINTS(context) SPARK::Requests::TDispatcher::clear_meeting_points( REQUEST__HEADER( THIS, ACTIVE_PROBLEM, context ) ) |
Macro to send a clear meeting points request from an atomic class. | |
#define | REQUEST__RESTART(context) SPARK::Requests::TDispatcher::restart( REQUEST__HEADER( THIS, ACTIVE_PROBLEM, context ) ) |
Macro to send a restart request from an atomic class. | |
#define | REQUEST__SET_DYNAMIC_STEPPER(context, stepper) SPARK::Requests::TDispatcher::set_dynamic_stepper( REQUEST__HEADER( THIS, ACTIVE_PROBLEM, context ), stepper ) |
Macro to send a "set dynamic stepper" request from an atomic class. | |
#define | REQUEST__SET_TIME_STEP(context, h) SPARK::Requests::TDispatcher::set_time_step( REQUEST__HEADER( THIS, ACTIVE_PROBLEM, context ), h ) |
Macro to send a "set time step" request from an atomic class. |
This header file should be included in the file where the inverses of an atomic class are implemented :
December 18, 2002 Original implementation
|
Macros to define the prototype for a modifier callback.
|
|
Macros to define the prototype for a non-modifier callback.
|
|
Macros to define the prototype for a predicate callback.
|
|
Macros to define the prototype for a static callback.
|
|
Macros to define the prototype for a static predicate callback.
|
|
Macros to declare an EVALUATE callback.
|
|
Macros to declare a PREDICT callback.
|
|
Macros to declare a CONSTRUCT callback.
|
|
Macros to declare a PREPARE_STEP callback.
|
|
Macros to declare a CHECK_INTEGRATION_STEP callback.
|
|
Macros to declare a COMMIT callback.
|
|
Macros to declare a ROLLBACK callback.
|
|
Macros to declare a DESTRUCT callback.
|
|
Macros to declare a STATIC_CONSTRUCT callback.
|
|
Macros to declare a STATIC_PREPARE_STEP callback.
|
|
Macros to declare a STATIC_CHECK_INTEGRATION_STEP callback.
|
|
Macros to declare a STATIC_COMMIT callback.
|
|
Macros to declare a STATIC_ROLLBACK callback.
|
|
Macros to declare a STATIC_DESTRUCT callback.
|
|
A macro that defines a reference named "name" to the TTarget object stored in position "pos" of the target list.
|
|
A macro that defines a const reference named "name" to the TArgument object of the argument stored in position "pos".
|
|
A macro that defines a const reference named "name" to the TArgument object of the argument stored in position "pos".
|
|
A macro that returns the scalar val for a single-valued inverse.
|
|
Macros used in predicate callbacks to indicate that the step is accepted.
|
|
Macros used in predicate callbacks to indicate that the step is rejected.
|
|
A macro to access the pointer to the current "this" pointer associated with the current callback.
|
|
A macro to access the pointer to the private data object stored as part of an object.
|
|
A macro to store the pointer to the private data stored as part of an object.
|
|
A macro to delete data pointed to by an object.
|
|
Returns pointer to TProblem object this object belongs to.
|
|
Returns pointer to TInverse object this object belongs to.
|
|
Returns pointer to TComponent object this object belongs to.
|
|
Writes msg specified as const char* to the error log file.
|
|
Writes msg specified as const char* to the run log file.
|
|
Macro to generate a request header with specific context information as
|
|
Macro to send an abort request from an atomic class. See SPARK::Requests::TDispatcher::abort()
|
|
Macro to send a stop request from an atomic class. See SPARK::Requests::TDispatcher::stop()
|
|
Macro to send a set stop time request from an atomic class. See SPARK::Requests::TDispatcher::set_stop_time()
|
|
Macro to send a report request from an atomic class. See SPARK::Requests::TDispatcher::report()
|
|
Macro to send a snapshot request from an atomic class. See SPARK::Requests::TDispatcher::snapshot()
|
|
Macro to send a request to synchronize with a meeting point from an atomic class. See SPARK::Requests::TDispatcher::set_meeting_point()
|
|
Macro to send a clear meeting points request from an atomic class. See SPARK::Requests::TDispatcher::clear_meeting_points()
|
|
Macro to send a restart request from an atomic class. See SPARK::Requests::TDispatcher::restart()
|
|
Macro to send a "set dynamic stepper" request from an atomic class. See SPARK::Requests::TDispatcher::set_dynamic_stepper()
|
|
Macro to send a "set time step" request from an atomic class. See SPARK::Requests::TDispatcher::set_time_step()
|