Changeset 45 for trunk/adb.hh

Show
Ignore:
Timestamp:
05/29/08 03:06:27 (7 months ago)
Author:
elghinn
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/adb.hh

    r1 r45  
    1 /* 
    2  *  RoxTS 
    3  *  adb.hh 
    4  *  Copyright (C) 2006  VERRIER Ana� * 
    5  *  This program is free software; you can redistribute it and/or modify 
    6  *  it under the terms of the GNU General Public License as published by 
    7  *  the Free Software Foundation; either version 2 of the License, or 
    8  *  (at your option) any later version. 
    9  * 
    10  *  This program is distributed in the hope that it will be useful, 
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    13  *  GNU General Public License for more details. 
    14  * 
    15  *  You should have received a copy of the GNU General Public License 
    16  *  along with this program; if not, write to the Free Software 
    17  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
    18  */ 
    19  
    20 #ifndef ADB_HH 
    21 #define ADB_HH 
    22  
    23 #include <map> 
    24 #include <set> 
    25  
    26 #include "item.hh" 
    27  
    28 using namespace std; 
    29  
    30 enum AlterationName 
    31 
    32   AHP, 
    33   AMP, 
    34   AATTMIN, 
    35   AATTMAX, 
    36   ADEFMIN, 
    37   ADEFMAX 
    38 }; 
    39  
    40 class ADB { 
    41   // Attributes 
    42   private: 
    43     static map<pair<Item *, AlterationName>, pair<int, int> > alterations; 
    44   // Operations 
    45   private: 
    46     ADB(); 
    47   public: 
    48     static void add(Item * item, AlterationName alteration, int value, int duration); 
    49     static void add(set<Item *> items, AlterationName alteration, int value, int duration); 
    50     static int get(Item * item, AlterationName alteration ); 
    51     static void clear(); 
    52     static void update(); 
    53 }; 
    54  
    55 #endif 
     1test