git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update README.
[stg.git]
/
projects
/
stargazer
/
plugins
/
other
/
smux
/
tables.h
diff --git
a/projects/stargazer/plugins/other/smux/tables.h
b/projects/stargazer/plugins/other/smux/tables.h
index ad3b55a3c979ca5ba5a15fc6e76d2728c69d4530..17875cecfa49029e9d4f770f32c45c5bf6edf288 100644
(file)
--- a/
projects/stargazer/plugins/other/smux/tables.h
+++ b/
projects/stargazer/plugins/other/smux/tables.h
@@
-1,14
+1,18
@@
-#ifndef __TABLES_H__
-#define __TABLES_H__
+#pragma once
+
+#include "sensors.h"
#include <string>
#include <map>
#include <string>
#include <map>
-#include "sensors.h"
+namespace STG
+{
+class Tariffs;
+class Users;
class TableSensor {
public:
class TableSensor {
public:
- TableSensor(const std::string & p) : prefix(p) {}
+
explicit
TableSensor(const std::string & p) : prefix(p) {}
virtual ~TableSensor() {}
const std::string & GetPrefix() const { return prefix; }
virtual ~TableSensor() {}
const std::string & GetPrefix() const { return prefix; }
@@
-21,18
+25,19
@@
class TableSensor {
class TariffUsersTable : public TableSensor {
public:
TariffUsersTable(const std::string & p,
class TariffUsersTable : public TableSensor {
public:
TariffUsersTable(const std::string & p,
- USERS & u)
+ STG::Tariffs & t,
+ STG::Users & u)
: TableSensor(p),
: TableSensor(p),
+ tariffs(t),
users(u)
{}
users(u)
{}
- virtual ~TariffUsersTable() {}
- void UpdateSensors(Sensors & sensors) const;
+ void UpdateSensors(Sensors & sensors) const
override
;
private:
private:
- USERS & users;
+ STG::Tariffs & tariffs;
+ STG::Users & users;
};
typedef std::map<std::string, TableSensor *> Tables;
};
typedef std::map<std::string, TableSensor *> Tables;
-
-#endif
+}