OpenASIP  2.0
FUGenerated.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2017 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 FUGenerated.hh
26  *
27  * Declaration of FUGenerated.
28  *
29  * @author Lasse Lehtonen 2017 (lasse.lehtonen-no.spam-tut.fi)
30  */
31 #pragma once
32 
33 #include "ObjectState.hh"
34 #include "Serializable.hh"
35 
36 #include <string>
37 #include <vector>
38 
39 namespace IDF {
40 
41  class FUGenerated : public Serializable {
42  public:
43  struct Info {
44  std::string operationName;
45  std::string hdb;
46  int id;
47  int latency;
48  };
49  struct DAGOperation {
50  std::string operationName;
51  std::vector<Info> suboperations;
52  };
53 
54 
55  FUGenerated() = default;
56  FUGenerated(const std::string& name);
57  virtual ~FUGenerated() = default;
58 
59  void loadState(const ObjectState* state) override;
60  ObjectState* saveState() const override;
61 
62  std::string name() const;
63  void name(const std::string& newName);
64  std::vector<Info>& operations();
65  const std::vector<std::string>& dagOperations() const;
66  const std::vector<Info>& operations() const;
67  void addOperation(const Info& op);
68  void addOperation(const DAGOperation& op);
69  const std::vector<std::string>& options() const;
70 
71  private:
72  std::string name_;
73  std::vector<Info> operations_;
74  std::vector<std::string> dagOperations_;
75  std::vector<std::string> options_;
76  };
77 }
IDF::FUGenerated::dagOperations
const std::vector< std::string > & dagOperations() const
Definition: FUGenerated.cc:123
IDF::FUGenerated::loadState
void loadState(const ObjectState *state) override
Definition: FUGenerated.cc:48
IDF::FUGenerated::name_
std::string name_
Definition: FUGenerated.hh:72
Serializable
Definition: Serializable.hh:44
IDF::FUGenerated::options
const std::vector< std::string > & options() const
Definition: FUGenerated.cc:141
ObjectState
Definition: ObjectState.hh:59
IDF::FUGenerated::saveState
ObjectState * saveState() const override
Definition: FUGenerated.cc:73
IDF::FUGenerated::Info::id
int id
Definition: FUGenerated.hh:46
IDF::FUGenerated::Info::hdb
std::string hdb
Definition: FUGenerated.hh:45
IDF::FUGenerated
Definition: FUGenerated.hh:41
IDF::FUGenerated::operations_
std::vector< Info > operations_
Definition: FUGenerated.hh:73
IDF::FUGenerated::options_
std::vector< std::string > options_
Definition: FUGenerated.hh:75
IDF::FUGenerated::operations
std::vector< Info > & operations()
Definition: FUGenerated.cc:113
IDF::FUGenerated::Info
Definition: FUGenerated.hh:43
ObjectState.hh
IDF::FUGenerated::Info::latency
int latency
Definition: FUGenerated.hh:47
IDF::FUGenerated::~FUGenerated
virtual ~FUGenerated()=default
Serializable.hh
IDF::FUGenerated::dagOperations_
std::vector< std::string > dagOperations_
Definition: FUGenerated.hh:74
IDF::FUGenerated::addOperation
void addOperation(const Info &op)
Definition: FUGenerated.cc:128
IDF::FUGenerated::FUGenerated
FUGenerated()=default
IDF::FUGenerated::DAGOperation::operationName
std::string operationName
Definition: FUGenerated.hh:50
IDF::FUGenerated::DAGOperation
Definition: FUGenerated.hh:49
IDF::FUGenerated::DAGOperation::suboperations
std::vector< Info > suboperations
Definition: FUGenerated.hh:51
IDF::FUGenerated::name
std::string name() const
Definition: FUGenerated.cc:103
IDF
Definition: DSDBManager.hh:54
IDF::FUGenerated::Info::operationName
std::string operationName
Definition: FUGenerated.hh:44