OpenASIP  2.0
OperationPropertyLoader.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file OperationPropertyLoader.hh
26  *
27  * Declaration of OperationPropertyLoader.
28  *
29  * @author Jussi Nykänen 2004 (nykanen-no.spam-cs.tut.fi)
30  * @note rating: yellow
31  * @note reviewed 7 September 2004 by pj, jn, jm, ao
32  */
33 
34 #ifndef TTA_OPERATION_PROPERTY_LOADER_HH
35 #define TTA_OPERATION_PROPERTY_LOADER_HH
36 
37 #include <map>
38 #include <vector>
39 #include <string>
40 
41 #include "OperationSerializer.hh"
42 #include "Exception.hh"
43 
44 class Operation;
45 class ObjectState;
46 class OperationModule;
47 
48 /**
49  * Imports the static information contents of an operation from a data file.
50  */
52 public:
54  virtual ~OperationPropertyLoader();
55 
57  Operation& operation, const OperationModule& module);
58 
59 private:
60  /// Container containing already read ObjectState trees.
61  typedef std::map<std::string, std::vector<ObjectState*> > ObjectStateCache;
62 
63  /// Iterator for map containing already read ObjectState trees.
64  typedef ObjectStateCache::iterator MapIter;
65  /// value_type for map containing already read ObjectState trees.
66  typedef ObjectStateCache::value_type ValueType;
67 
68  /// Copying not allowed.
70  /// Assignment not allowed.
72 
73  void loadModule(const OperationModule& module);
74 
75  /// Serializer instance.
77  /// Cache for already read ObjectState trees.
79 };
80 
81 #endif
OperationPropertyLoader::loadModule
void loadModule(const OperationModule &module)
Definition: OperationPropertyLoader.cc:120
OperationPropertyLoader::loadOperationProperties
void loadOperationProperties(Operation &operation, const OperationModule &module)
Definition: OperationPropertyLoader.cc:76
Exception.hh
ObjectState
Definition: ObjectState.hh:59
OperationPropertyLoader::serializer_
OperationSerializer serializer_
Serializer instance.
Definition: OperationPropertyLoader.hh:76
OperationSerializer.hh
OperationSerializer
Definition: OperationSerializer.hh:49
OperationPropertyLoader::MapIter
ObjectStateCache::iterator MapIter
Iterator for map containing already read ObjectState trees.
Definition: OperationPropertyLoader.hh:64
OperationPropertyLoader::ObjectStateCache
std::map< std::string, std::vector< ObjectState * > > ObjectStateCache
Container containing already read ObjectState trees.
Definition: OperationPropertyLoader.hh:61
Operation
Definition: Operation.hh:59
OperationPropertyLoader::OperationPropertyLoader
OperationPropertyLoader()
Definition: OperationPropertyLoader.cc:50
OperationPropertyLoader::operator=
OperationPropertyLoader & operator=(const OperationPropertyLoader &)
Assignment not allowed.
OperationPropertyLoader
Definition: OperationPropertyLoader.hh:51
OperationModule
Definition: OperationModule.hh:46
OperationPropertyLoader::~OperationPropertyLoader
virtual ~OperationPropertyLoader()
Definition: OperationPropertyLoader.cc:56
OperationPropertyLoader::ValueType
ObjectStateCache::value_type ValueType
value_type for map containing already read ObjectState trees.
Definition: OperationPropertyLoader.hh:66
OperationPropertyLoader::operations_
ObjectStateCache operations_
Cache for already read ObjectState trees.
Definition: OperationPropertyLoader.hh:78