X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=bs%2Fbsdoc.h;h=bcfcfd08e450123c32a0aa6322d0280f3e06698a;hb=c2dd8856c3d97667953a0b73403b5e5cade5ce9b;hp=d113f5bc3df0effd22428ce91108654478778244;hpb=56b09bf912d2965744e2e78a30fc68d73ebe401c;p=hbs.git diff --git a/bs/bsdoc.h b/bs/bsdoc.h index d113f5b..bcfcfd0 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,8 +59,23 @@ 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; + + /**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; + + void changeFleet(QString battle, QString group, QString fleet, const Fleet* fl); + + void newFleet(QString battle, QString group, QString fleet, Fleet* fl); + + void removeFleet(QString battle, QString group, QString fleet); + + void runBattleSimulation(); signals: void documentChanged(); @@ -73,7 +89,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