English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / ReLauncher: TCoroutineRun.h Source File
Uranie / ReLauncher  v4.10.0
/* @license-end */
TCoroutineRun.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2024 CEA/DES
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or any
7 // later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 // $Id$
19 // $Author$
20 // $Date$
21 // $Revision 1.1 $
22 // $State$
24 
32 #ifndef __TCOROUTINERUN__
33 #define __TCOROUTINERUN__
34 
35 #include "TShareRun.h"
36 
37 #include "uranie_detection.h"
38 #ifdef Boost_COROUTINE_FOUND
39 #include <boost/coroutine2/coroutine.hpp>
40 using namespace boost::coroutines2;
41 #endif
42 
43 namespace URANIE
44 {
45 namespace Relauncher
46 {
47 
49 {
50 protected:
51  struct relement _next;
52 #ifdef Boost_COROUTINE_FOUND
53  coroutine<void>::push_type *_yield;
54 #endif
55 
56 public:
57 #ifdef Boost_COROUTINE_FOUND
58  TCoroutineRun(TEval *, long, coroutine<void>::push_type *);
59  TCoroutineRun(TEval *, long, void *);
60 #else
61  TCoroutineRun(TEval *, long);
62 #endif
63  virtual ~TCoroutineRun(void);
64 
65  virtual void startSlave(void);
66  virtual void stopSlave(void);
67 
68  bool empty();
69  struct element serviceGet();
70  void servicePut(long, int);
71 
72  virtual int get(long &);
73 
74  ClassDef(URANIE::Relauncher::TCoroutineRun, ID_RELAUNCHER)
75 };
76 
77 }
78 } //namespace
79 
80 #endif
Definition: TBaseEval.cxx:44
Definition: TShareRun.h:83
Definition: TCoroutineRun.h:48
TRun base class.
Definition: TShareRun.h:54
Definition: TEval.h:49
Definition: TShareRun.h:59