]> ruin.nu Git - hbs.git/blobdiff - bs/bsdoc.h
fleetview now generates the correct "unit table" when it's created.
[hbs.git] / bs / bsdoc.h
index eac45f40432b1a62ee0865ba64d3a8961d07f9a0..b790dc628f4c06b454d8eeea198d3101249f4f57 100644 (file)
@@ -40,7 +40,7 @@ class BSDoc : public QObject
   Q_OBJECT
 
   public:
-    BSDoc();
+       BSDoc();
     ~BSDoc();
     void newDoc();
     bool save();
@@ -58,7 +58,9 @@ class BSDoc : public QObject
         * change it.
         * \todo remove this, and replace it with a better more closed interface.
         */
-       std::map<QString, std::map<QString, std::map<QString, Fleet> > >& Battles();
+       const std::map<QString, std::map<QString, std::map<QString, Fleet> > >& battles() const;
+
+       Fleet specificFleet(QString battle, QString group, QString fleet) const;
 
   signals:
     void documentChanged();
@@ -66,6 +68,13 @@ class BSDoc : public QObject
   protected:
     bool modified;
 
+       /**This is the main datastructure of the battlecalc, it's more or less the
+        * core that everything else works around. A short explanation of the fields:
+        * -# The name of the battle (usually coordinates)
+        * -# The name of the group (ie. Friendly/Hostile)
+        * -# The fleetname (Home Planet, coordinates, irc nicks and so on)
+        * - and in the end you got the actual Fleet object with it's data.
+        */
        std::map<QString, std::map<QString, std::map<QString, Fleet> > > m_Battles;
 };