summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/DataSource.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-12 18:53:54 +0200
committerAki <please@ignore.pl>2022-04-12 18:53:54 +0200
commitcbc7d648a83274c87a2d3796a2877adc8c48cb42 (patch)
tree12a981594d8c084464048b86c63a6a9fc0d25457 /StarsEx/DataSource.cpp
parent9c1439b0e5e1c90723c0f2f6e22a24a935623542 (diff)
downloadstarshatter-cbc7d648a83274c87a2d3796a2877adc8c48cb42.zip
starshatter-cbc7d648a83274c87a2d3796a2877adc8c48cb42.tar.gz
starshatter-cbc7d648a83274c87a2d3796a2877adc8c48cb42.tar.bz2
Added a way to weak reference sources without any dependencies
Diffstat (limited to 'StarsEx/DataSource.cpp')
-rw-r--r--StarsEx/DataSource.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/StarsEx/DataSource.cpp b/StarsEx/DataSource.cpp
index 06c7658..1618171 100644
--- a/StarsEx/DataSource.cpp
+++ b/StarsEx/DataSource.cpp
@@ -18,9 +18,13 @@
using Group = DataSource::Group;
+int DataSource::s_next_id {0};
+
+
DataSource::DataSource(Group group) :
m_prefix {""},
- m_group {group}
+ m_group {group},
+ m_id {s_next_id++}
{
}
@@ -30,6 +34,13 @@ DataSource::~DataSource()
}
+int
+DataSource::Id() const
+{
+ return m_id;
+}
+
+
Group
DataSource::GetGroup() const
{