forked from RetroAchievements/RAIntegration
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathModelBase.hh
More file actions
32 lines (23 loc) · 836 Bytes
/
Copy pathModelBase.hh
File metadata and controls
32 lines (23 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef RA_DATA_MODEL_BASE_H
#define RA_DATA_MODEL_BASE_H
#pragma once
#include "ModelPropertyContainer.hh"
namespace ra {
namespace data {
class ModelCollectionBase;
class ModelBase : protected ModelPropertyContainer
{
protected:
GSL_SUPPRESS_F6 ModelBase() = default;
void OnValueChanged(const BoolModelProperty::ChangeArgs& args) override;
void OnValueChanged(const StringModelProperty::ChangeArgs& args) override;
void OnValueChanged(const IntModelProperty::ChangeArgs& args) override;
private:
// allow ModelCollectionBase to call GetValue and SetValue directly, as well as manage the m_pCollection fields
friend class ModelCollectionBase;
ModelCollectionBase* m_pCollection = nullptr;
gsl::index m_nCollectionIndex = 0;
};
} // namespace data
} // namespace ra
#endif RA_DATA_MODEL_BASE_H