X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Fbsdoc.h;h=977491d1b3dcab59d62245e84f7cd1b2dcbdbeef;hp=b790dc628f4c06b454d8eeea198d3101249f4f57;hb=5940cfda3be2c7b4ecbd64c814948b29139177c0;hpb=7a187d329c61f264cbafc28654c6b8bb1e3b87a1 diff --git a/bs/bsdoc.h b/bs/bsdoc.h index b790dc6..977491d 100644 --- a/bs/bsdoc.h +++ b/bs/bsdoc.h @@ -26,6 +26,7 @@ // application specific includes #include "fleet.h" +typedef std::map > > BattleList; //! The document class /** This class is holding all the data, handles the transportation of the * data to a couple of different mediums and informs users of the data @@ -58,9 +59,15 @@ class BSDoc : public QObject * change it. * \todo remove this, and replace it with a better more closed interface. */ - const std::map > >& battles() const; + const BattleList& battles() const; - Fleet specificFleet(QString battle, QString group, QString fleet) const; + + /**Looks for the fleet with the specified name, in the specified group in the + * specified battle. + * \return Returns '\0' (NULL) if the fleet isn't found, if it is found it + * returns a const pointer to the fleet. + */ + const Fleet* specificFleet(QString battle, QString group, QString fleet) const; signals: void documentChanged(); @@ -75,7 +82,7 @@ class BSDoc : public QObject * -# 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 > > m_Battles; + BattleList m_Battles; }; #endif