OpenASIP  2.0
OperationTriggeredField.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2021 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 OperationTriggeredField.hh
26  *
27  * Declaration of OperationTriggeredField class.
28  *
29  * @author Kari Hepola 2022 (kari.hepola@tuni.fi)
30  * @note rating: red
31  */
32 
33 
34 #ifndef TTA_OPERATION_TRIGGERED_FIELD_HH
35 #define TTA_OPERATION_TRIGGERED_FIELD_HH
36 
37 #include "Serializable.hh"
38 #include <vector>
39 #include <string>
40 
42 
44 public:
45 
48 
50  int start, int width);
51 
52  int piece() const;
53  void setPiece(int piece);
54  int start() const;
55  void setStart(int start);
56 
57  // methods inherited from Serializable interface
58  virtual void loadState(const ObjectState* state);
59  virtual ObjectState* saveState() const;
60 
61  virtual int childFieldCount() const;
62  virtual int width() const;
63  void setWidth(int width);
64 
65  static const std::string OSNAME_FIELD;
66  static const std::string OSKEY_PIECE_NAME;
67  static const std::string OSKEY_START_NAME;
68  static const std::string OSKEY_WIDTH_NAME;
69 
70 private:
71  int piece_;
72  int start_;
73  int width_;
74 
75 
76 };
77 
78 #endif
OperationTriggeredField::setWidth
void setWidth(int width)
Definition: OperationTriggeredField.cc:131
OperationTriggeredField::OSKEY_PIECE_NAME
static const std::string OSKEY_PIECE_NAME
Definition: OperationTriggeredField.hh:66
OperationTriggeredField::start
int start() const
Definition: OperationTriggeredField.cc:98
OperationTriggeredField::OSNAME_FIELD
static const std::string OSNAME_FIELD
Definition: OperationTriggeredField.hh:65
Serializable
Definition: Serializable.hh:44
ObjectState
Definition: ObjectState.hh:59
OperationTriggeredField::childFieldCount
virtual int childFieldCount() const
Definition: OperationTriggeredField.cc:115
OperationTriggeredField::loadState
virtual void loadState(const ObjectState *state)
Definition: OperationTriggeredField.cc:145
OperationTriggeredField::saveState
virtual ObjectState * saveState() const
Definition: OperationTriggeredField.cc:170
OperationTriggeredField::piece
int piece() const
Definition: OperationTriggeredField.cc:82
OperationTriggeredField::OSKEY_WIDTH_NAME
static const std::string OSKEY_WIDTH_NAME
Definition: OperationTriggeredField.hh:68
OperationTriggeredEncoding
Definition: OperationTriggeredEncoding.hh:44
OperationTriggeredField::OperationTriggeredField
OperationTriggeredField(const ObjectState *state, OperationTriggeredEncoding &parent)
Definition: OperationTriggeredField.cc:69
OperationTriggeredField::start_
int start_
Definition: OperationTriggeredField.hh:72
OperationTriggeredField
Definition: OperationTriggeredField.hh:43
Serializable.hh
OperationTriggeredField::width_
int width_
Definition: OperationTriggeredField.hh:73
OperationTriggeredField::setStart
void setStart(int start)
Definition: OperationTriggeredField.cc:103
OperationTriggeredField::width
virtual int width() const
Definition: OperationTriggeredField.cc:126
OperationTriggeredField::setPiece
void setPiece(int piece)
Definition: OperationTriggeredField.cc:87
OperationTriggeredField::OSKEY_START_NAME
static const std::string OSKEY_START_NAME
Definition: OperationTriggeredField.hh:67
OperationTriggeredField::piece_
int piece_
Definition: OperationTriggeredField.hh:71