View Javadoc

1   /*
2    * MContextEventListener.java
3    * Created on 19 févr. 2004
4    *   
5    *   Magic-Project is a turn based strategy simulator
6    *   Copyright (C) 2003-2007 Fabrice Daugan
7    *
8    *   This program is free software; you can redistribute it and/or modify it 
9    * under the terms of the GNU General Public License as published by the Free 
10   * Software Foundation; either version 2 of the License, or (at your option) any
11   * later version.
12   *
13   *   This program is distributed in the hope that it will be useful, but WITHOUT 
14   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15   * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more 
16   * details.
17   *
18   *   You should have received a copy of the GNU General Public License along  
19   * with this program; if not, write to the Free Software Foundation, Inc., 
20   * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21   */
22  package net.sf.magicproject.event.context;
23  
24  import net.sf.magicproject.clickable.targetable.card.MCard;
25  
26  /***
27   * @author <a href="mailto:fabdouglas@users.sourceforge.net">Fabrice Daugan </a>
28   * @since 0.54
29   */
30  public interface ContextEventListener {
31  
32  	/***
33  	 * Verify the timestamp of the specified card
34  	 * 
35  	 * @param card
36  	 *          the concerned object.
37  	 * @return true if the timestamp is correct.
38  	 */
39  	boolean checkTimeStamp(MCard card);
40  
41  	/***
42  	 * Decrement the reference counter for the current timestamp of this card.
43  	 */
44  	void removeTimestamp();
45  
46  	/***
47  	 * Return the card source of the event attached to this context.
48  	 * 
49  	 * @return the card source of the event attached to this context.
50  	 */
51  	MCard getEventSource();
52  
53  	/***
54  	 * The zone attched to this context.
55  	 * @return zone attched to this context.
56  	 */
57  	int getZoneContext();
58  
59  }