Changeset 45

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