]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/smux/tables.h
Move projects back into subfolder.
[stg.git] / projects / stargazer / plugins / other / smux / tables.h
index ad3b55a3c979ca5ba5a15fc6e76d2728c69d4530..edfe4377326a9d47d7e765021b3cf8a0a2eb0a2e 100644 (file)
@@ -6,9 +6,15 @@
 
 #include "sensors.h"
 
+namespace STG
+{
+struct Tariffs;
+struct Users;
+}
+
 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; }
@@ -21,8 +27,10 @@ class TableSensor {
 class TariffUsersTable : public TableSensor {
     public:
         TariffUsersTable(const std::string & p,
-                         USERS & u)
+                         STG::Tariffs & t,
+                         STG::Users & u)
             : TableSensor(p),
+              tariffs(t),
               users(u)
         {}
         virtual ~TariffUsersTable() {}
@@ -30,7 +38,8 @@ class TariffUsersTable : public TableSensor {
         void UpdateSensors(Sensors & sensors) const;
 
     private:
-        USERS & users;
+        STG::Tariffs & tariffs;
+        STG::Users & users;
 };
 
 typedef std::map<std::string, TableSensor *> Tables;