simulator_events.h File Reference

Tools to declare events which will be called in main calculation loop. More...

#include "pp_param_list.h"

Include dependency graph for simulator_events.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define PUSH_LIST(seq_, size_)   BOOST_PP_CAT(PUSH_LIST_, size_) seq_
#define PUSH_LIST_0
#define PUSH_LIST_1(x)   params->push_back(boost::lexical_cast<std::string> (A1));
#define PUSH_LIST_2(x)   params->push_back(boost::lexical_cast<std::string> (A2)); PUSH_LIST_1
#define PUSH_LIST_3(x)   params->push_back(boost::lexical_cast<std::string> (A3)); PUSH_LIST_2
#define PUSH_LIST_4(x)   params->push_back(boost::lexical_cast<std::string> (A4)); PUSH_LIST_3
#define DECL(type_, name_, t_, ts_)
#define UDECL_I(r, data, i, elem)   DECL(data, BOOST_PP_TUPLE_ELEM(3,0,elem), BOOST_PP_TUPLE_ELEM(3,1,elem), BOOST_PP_TUPLE_ELEM(3,2,elem))
#define DECLARE_SIGNAL_ENUM_I(r, data, i, elem)   BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(3,0,elem), _signal),
#define DECLARE_SIGNALS_ENUM(ts_, t_)
#define DECLARE_EVENT_LIST(name_, params_, ts_, t_)


Detailed Description

Tools to declare events which will be called in main calculation loop.

DECLARE_EVENT_LIST declares by sequence of declaration a set of functions with prefix on_, see reservoir_simulator.h for usage example

Author:
Sergey Miryanov (sergey-miryanov), sergey.miryanov@gmail.com
Date:
23.07.2008 This source code is released under the terms of the BSD License. See LICENSE for more details.

Define Documentation

#define DECL ( type_,
name_,
t_,
ts_   ) 

Value:

void BOOST_PP_CAT(on_, name_) (PARAM_LIST_FOR_EACH(t_, ts_))                                        \
  {                                                                                                   \
    smart_ptr <type_> params = BS_KERNEL.create_object (type_::bs_type ());                           \
    PUSH_LIST (BOOST_PP_TUPLE_TO_SEQ(ts_, t_), ts_)                                                   \
    this->fire_signal (BOOST_PP_CAT(name_, _signal), params);                                         \
  }

#define DECLARE_EVENT_LIST ( name_,
params_,
ts_,
t_   ) 

Value:

public:                                                                                             \
  DECLARE_SIGNALS_ENUM(ts_, t_)                                                                       \
  BOOST_PP_SEQ_FOR_EACH_I(UDECL_I, params_, BOOST_PP_TUPLE_TO_SEQ(ts_, t_))

#define DECLARE_SIGNAL_ENUM_I ( r,
data,
i,
elem   )     BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(3,0,elem), _signal),

#define DECLARE_SIGNALS_ENUM ( ts_,
t_   ) 

Value:

BLUE_SKY_SIGNALS_DECL_BEGIN(bs_node)                                                                \
  BOOST_PP_SEQ_FOR_EACH_I(DECLARE_SIGNAL_ENUM_I, _, BOOST_PP_TUPLE_TO_SEQ(ts_, t_))                   \
  BLUE_SKY_SIGNALS_DECL_END

#define PUSH_LIST ( seq_,
size_   )     BOOST_PP_CAT(PUSH_LIST_, size_) seq_

#define PUSH_LIST_0

#define PUSH_LIST_1 (  )     params->push_back(boost::lexical_cast<std::string> (A1));

#define PUSH_LIST_2 (  )     params->push_back(boost::lexical_cast<std::string> (A2)); PUSH_LIST_1

#define PUSH_LIST_3 (  )     params->push_back(boost::lexical_cast<std::string> (A3)); PUSH_LIST_2

#define PUSH_LIST_4 (  )     params->push_back(boost::lexical_cast<std::string> (A4)); PUSH_LIST_3

#define UDECL_I ( r,
data,
i,
elem   )     DECL(data, BOOST_PP_TUPLE_ELEM(3,0,elem), BOOST_PP_TUPLE_ELEM(3,1,elem), BOOST_PP_TUPLE_ELEM(3,2,elem))


Generated on Fri Nov 13 12:07:13 2009 for TheBSEagleProject by  doxygen 1.5.8