OpenASIP  2.0
MoveNodeSet.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 MoveNodeSet.hh
26  *
27  * Declaration of MoveNodeSet class.
28  *
29  * @author Heikki Kultala 2006 (hkultala-no.spam-cs.tut.fi)
30  * @author Vladimir Guzma 2006 (vladimir.guzma-no.spam-tut.fi)
31  * @note rating: red
32  */
33 
34 #ifndef TCE_MOVE_NODE_SET_HH
35 #define TCE_MOVE_NODE_SET_HH
36 
37 #include "MoveNode.hh"
38 #include "Exception.hh"
39 #include <vector>
40 
41 class MoveNodeSet {
42 public:
43  MoveNodeSet();
44 
45  inline int count() const;
46  inline MoveNode& at(int index);
47  void addMoveNode(MoveNode&);
48  void removeMoveNode(MoveNode&);
49 
50  std::string toString() const;
51  std::vector<MoveNode*>::iterator begin() { return moveNodes_.begin(); }
52  std::vector<MoveNode*>::iterator end() { return moveNodes_.end(); }
53 private:
54  // Vector holding pointers to MoveNodes in a collection
55  std::vector<MoveNode*> moveNodes_;
56 };
57 
58 #include "MoveNodeSet.icc"
59 
60 #endif
MoveNodeSet.icc
Exception.hh
MoveNodeSet::toString
std::string toString() const
Definition: MoveNodeSet.cc:48
MoveNodeSet::removeMoveNode
void removeMoveNode(MoveNode &)
Definition: MoveNodeSet.cc:73
MoveNode
Definition: MoveNode.hh:65
MoveNodeSet::at
MoveNode & at(int index)
MoveNodeSet::end
std::vector< MoveNode * >::iterator end()
Definition: MoveNodeSet.hh:52
MoveNodeSet::moveNodes_
std::vector< MoveNode * > moveNodes_
Definition: MoveNodeSet.hh:55
MoveNodeSet
Definition: MoveNodeSet.hh:41
MoveNodeSet::count
int count() const
MoveNodeSet::begin
std::vector< MoveNode * >::iterator begin()
Definition: MoveNodeSet.hh:51
MoveNodeSet::addMoveNode
void addMoveNode(MoveNode &)
Definition: MoveNodeSet.cc:62
MoveNodeSet::MoveNodeSet
MoveNodeSet()
Definition: MoveNodeSet.cc:38
MoveNode.hh