The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cInitOperator.h
Go to the documentation of this file.
1 /**
2  * @file cInitOperator
3  * file name: cInitOperator.h
4  * @author Betti Oesterholz
5  * @date 19.03.2010
6  * @mail webmaster@BioKom.info
7  *
8  * System: C++
9  *
10  * This header specifies a class for the init operation.
11  * Copyright (C) @c GPL3 2010 Betti Oesterholz
12  *
13  * This program is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License (GPL) as
15  * published by the Free Software Foundation, either version 3 of the
16  * License, or any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program. If not, see <http://www.gnu.org/licenses/>.
25  *
26  *
27  * This header specifies a class for the init operation.
28  * The operation initialisize the fib -enviroment.
29  *
30  *
31  * @see cOperationFib
32  * @see cOperation
33  * @see cEnviroment
34  */
35 /*
36 History:
37 19.03.2010 Oesterholz created
38 */
39 
40 
41 #ifndef ___C_INIT_OPERATOR_H__
42 #define ___C_INIT_OPERATOR_H__
43 
44 #include "version.h"
45 
46 #include "cOperationFib.h"
47 
48 #include <string>
49 
50 
51 namespace enviroment{
52 namespace fib{
53 
54 
56 public:
57 
58 #ifdef TEST
59  /**
60  * A counter to check if the init operator was called
61  */
62  static unsigned long ulInitOperatorCalled;
63 #endif
64 
65  /**
66  * The standardconstructor for the operation.
67  * It will create the operation, but won't start it.
68  *
69  * @param operationId the identifer for the operation
70  */
71  cInitOperator( const cOperationIdentifier & operationId );
72 
73  /**
74  * Destructor of the class cInitOperator.
75  */
76  virtual ~cInitOperator();
77 
78  /**
79  * This method creats a new instance of this operator.
80  * Beware: You have to delete the instance after usage.
81  *
82  * @param operationId the identifer for the operation
83  * @return a pointer to a new instance of this operation
84  */
85  virtual cInitOperator * createInstance( const cOperationIdentifier & operationId ) const;
86 
87  /**
88  * This method runs the operation.
89  * It will wait till the operation is ended befor returning.
90  * Beware: If overwriten call setIsRunning( false ), when the operation
91  * is done.
92  *
93  * @see start()
94  * @see stop()
95  * @see setIsRunning()
96  * @return true if the operation was started
97  */
98  virtual bool run();
99 
100  /**
101  * @return the (class-)name of the operation
102  */
103  virtual std::string getName() const;
104 
105 
106 };//end class cInitOperator
107 
108 
109 };//end namespace fib
110 };//end namespace enviroment
111 
112 #endif //___C_INIT_OPERATOR_H__perator
113 
114 
115 
116 
117 
118 
119