blob: 9d3823d54388ec120b20ae6a6e5527ab1418e935 [file] [log] [blame]
Georgios Pinitas0c29cd32017-10-18 17:29:27 +01001/*
2 * Copyright (c) 2017 ARM Limited.
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * 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 THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24#ifndef __ARM_COMPUTE_GRAPH_NODE_PARAMETER_H__
25#define __ARM_COMPUTE_GRAPH_NODE_PARAMETER_H__
26
27#include <ostream>
28#include <string>
29
30namespace arm_compute
31{
32namespace graph
33{
34/**Node Parameter Empty base class */
35class NodeParameterBase
36{
37};
38
39/** Template parameter implementation */
40template <typename T>
41class NodeParameter : public NodeParameterBase
42{
43public:
44 /** Default Constructor
45 *
46 * @param[in] name Paremeter name
47 * @param[in] val Parameter value
48 */
49 NodeParameter(std::string name, T val)
50 : _name(name), _val(val) {};
51 /** Returns parameter's name
52 *
53 * @return the name of the parameter
54 */
55 std::string name() const
56 {
57 return _name;
58 }
59 /** Returns parameter's value
60 *
61 * @return the value of the parameter
62 */
63 T value()
64 {
65 return _val;
66 }
67
68private:
69 std::string _name;
70 T _val;
71};
72} // namespace graph
73} // namespace arm_compute
74#endif /* __ARM_COMPUTE_GRAPH_NODE_PARAMETER_H__ */