Enzo
Loading...
Searching...
No Matches
Template.h
1#pragma once
2#include "Engine/Parameter/Default.h"
3#include "Engine/Parameter/PrmName.h"
4#include "Engine/Parameter/Range.h"
5#include "Engine/Types.h"
6
7namespace enzo::prm
8{
9
11{
12public:
14 enzo::prm::Type type,
15 prm::Name name
16 );
18 enzo::prm::Type type,
19 prm::Name name,
20 unsigned int vectorSize
21 );
23 enzo::prm::Type type,
24 prm::Name name,
25 std::vector<prm::Default> defaults,
26 unsigned int vectorSize = 1,
27 std::vector<prm::Range> ranges=std::vector<prm::Range>()
28 );
30 enzo::prm::Type type,
31 prm::Name name,
32 prm::Default theDefault,
33 unsigned int vectorSize = 1,
34 Range range=Range()
35 );
36 Template();
37 // get name and get token are identical
38 enzo::bt::String getName() const;
39 enzo::bt::String getToken() const;
40 enzo::bt::String getLabel() const;
41 const prm::Default getDefault(unsigned int index=0) const;
42 const prm::Range& getRange(unsigned int index=0) const;
43 const prm::Type getType() const;
44 const unsigned int getSize() const;
45 const unsigned int getNumDefaults() const;
46 // bool isValid() const;
47private:
48 enzo::prm::Type type_;
49 std::vector<prm::Default> defaults_;
50 std::vector<prm::Range> ranges_;
51 // TODO: make a class that holds token and name
52 prm::Name name_;
53 unsigned int vectorSize_;
54
55};
56
57inline enzo::prm::Template Terminator = enzo::prm::Template();
58
59}
60
Basic attribute, parameter, and node types for Enzo.
Definition Default.h:7
Definition PrmName.h:7
Definition Range.h:14
Definition Template.h:11