GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AnActorConnection.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2004-2006 by Olivier Stezowski & Christian Finck *
3  * stezow(AT)ipnl.in2p3.fr, cfinck(AT)ires.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
23 #ifndef Gw_AnActorConnection
24 #define Gw_AnActorConnection
25 
26 #include <string>
27 //
28 
29 #include "ADFConfig.h"
30 #include "FrameBlock.h"
31 
32 namespace Gw
33 {
34 
35 class ALoadedActor;
36 
38 
42 {
43 private:
45  Short_t fLazy;
46 
47 public:
49  virtual ~AnActorConnection();
50 
52  virtual std::string GetName() const
53  {
54  std::string default_name = "AnActorConnection" ;
55  return default_name;
56  }
58  virtual Bool_t IsLazy(Short_t lazy = 0u) const
59  {
60  return fLazy > lazy;
61  }
63 
66  virtual void SetLazy(Short_t lazy = 1u)
67  {
68  fLazy = lazy;
69  }
71  virtual ALoadedActor *GetProducer() = 0;
73  virtual ALoadedActor *GetConsumer()= 0;
74 
76  virtual Bool_t IsReadyforConsumer()
77  { return false; }
79  virtual Bool_t SetReadyforConsumer()
80  { return false; }
81 
83  virtual Bool_t IsReadyforProducer()
84  { return false; }
85 
87  virtual Bool_t SetReadyforProducer()
88  { return false; }
89 
91  virtual ADF::FrameBlock *GetBlock(const Char_t opt) = 0;
92 };
93 
94 } // end namespace
95 
96 #endif
virtual Bool_t SetReadyforConsumer()
Prepare the connection so that data can be consumed by the right actor: return false if someting wron...
header file for FrameBlock.cpp
A Block of Frames.
Definition: FrameBlock.h:43
virtual Bool_t IsReadyforConsumer()
test if some data are ready to be sent to the consumer (right part of the connection) ...
An actor looded in an emulator.
Definition: ALoadedActor.h:88
virtual std::string GetName() const
name of the connection ... better if unique in a emulator
to set informations about the ADF configuration
virtual Bool_t SetReadyforProducer()
Prepare the connection so that data can be produced by the left actor : return false if someting wron...
virtual void SetLazy(Short_t lazy=1u)
set this connection lazy i.e. not absolutely necessary for an actor
virtual Bool_t IsReadyforProducer()
test if some data can be collected be the producer (left part of the connection)
virtual ADF::FrameBlock * GetBlock(const Char_t opt)=0
return the address of the block - opt = p => producer, c => consumer (different in case the connectio...
virtual ALoadedActor * GetProducer()=0
to get back the producer
virtual ALoadedActor * GetConsumer()=0
to get back the consumer
Base class that connects two actors in a general topology.
virtual Bool_t IsLazy(Short_t lazy=0u) const
name of the connection ... better if unique in a emulator