Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
UIPropertyGroup.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <vector>
6#include <string>
7#include <string_view>
8
9namespace ph::editor
10{
11
12class UIPropertyGroup final
13{
14public:
15 explicit UIPropertyGroup(std::string groupName);
16
17 UIPropertyGroup& addProperty(UIProperty property, bool shouldPrepend = false);
18 UIPropertyGroup& addProperties(const UIPropertyGroup& properties, bool shouldPrepend = false);
19
25 UIProperty* findProperty(std::string_view fieldName);
26
27 const std::string& getName() const;
28
29 auto begin() noexcept -> typename std::vector<UIProperty>::iterator;
30 auto begin() const noexcept -> typename std::vector<UIProperty>::const_iterator;
31 auto end() noexcept -> typename std::vector<UIProperty>::iterator;
32 auto end() const noexcept -> typename std::vector<UIProperty>::const_iterator;
33
34private:
35 std::string m_name;
36 std::vector<UIProperty> m_properties;
37};
38
39inline const std::string& UIPropertyGroup::getName() const
40{
41 return m_name;
42}
43
44inline auto UIPropertyGroup::begin() noexcept
45-> typename std::vector<UIProperty>::iterator
46{
47 return m_properties.begin();
48}
49
50inline auto UIPropertyGroup::begin() const noexcept
51-> typename std::vector<UIProperty>::const_iterator
52{
53 return m_properties.begin();
54}
55
56inline auto UIPropertyGroup::end() noexcept
57-> typename std::vector<UIProperty>::iterator
58{
59 return m_properties.end();
60}
61
62inline auto UIPropertyGroup::end() const noexcept
63-> typename std::vector<UIProperty>::const_iterator
64{
65 return m_properties.end();
66}
67
68}// end namespace ph::editor
Definition UIPropertyGroup.h:13
const std::string & getName() const
Definition UIPropertyGroup.h:39
UIPropertyGroup(std::string groupName)
Definition UIPropertyGroup.cpp:8
UIPropertyGroup & addProperty(UIProperty property, bool shouldPrepend=false)
Definition UIPropertyGroup.cpp:13
auto begin() noexcept -> typename std::vector< UIProperty >::iterator
Definition UIPropertyGroup.h:44
UIProperty * findProperty(std::string_view fieldName)
Find a property in group by its unique name. Properties in the same group should have unique field na...
Definition UIPropertyGroup.cpp:47
UIPropertyGroup & addProperties(const UIPropertyGroup &properties, bool shouldPrepend=false)
Definition UIPropertyGroup.cpp:27
auto end() noexcept -> typename std::vector< UIProperty >::iterator
Definition UIPropertyGroup.h:56
Definition UIProperty.h:12
Definition ph_editor.h:10
Definition TWeakHandle.h:113