Advanced Strategic Command
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
AllianceSetupWidget Class Reference

#include <alliancesetup.h>

Inheritance diagram for AllianceSetupWidget:
Inheritance graph
[legend]

Classes

class  ApplyStrategy
 

Public Types

enum  DiplomaticTransitions {
  SNEAK_ATTACK, TO_WAR, TO_TRUCE, TO_PEACE,
  TO_PEACE_SV, TO_ALLIANCE
}
 

Public Member Functions

 AllianceSetupWidget (GameMap *gamemap, ApplyStrategy *applyStrategy, bool allEditable, PG_Widget *parent, const PG_Rect &r, const std::string &style="ScrollWidget")
 
void Apply ()
 
 ~AllianceSetupWidget ()
 

Protected Types

typedef map< int, PG_Widget * > DiplomaticWidgets
 

Protected Member Functions

int linearize (int actingPlayer, int secondPlayer)
 
void setState (DiplomaticStates s, int actingPlayer, int secondPlayer)
 
DiplomaticStatesgetState (int actingPlayer, int secondPlayer)
 

Protected Attributes

vector< vector
< DiplomaticTransitions > > 
stateChanges
 
vector< vector
< DiplomaticStates > > 
states
 
DiplomaticWidgets diplomaticWidgets
 
vector< PlayerWidgets > playerWidgets
 

Detailed Description

Definition at line 29 of file alliancesetup.h.

Member Typedef Documentation

typedef map<int,PG_Widget*> AllianceSetupWidget::DiplomaticWidgets
protected

Definition at line 47 of file alliancesetup.h.

Member Enumeration Documentation

Enumerator
SNEAK_ATTACK 
TO_WAR 
TO_TRUCE 
TO_PEACE 
TO_PEACE_SV 
TO_ALLIANCE 

Definition at line 40 of file alliancesetup.h.

Constructor & Destructor Documentation

AllianceSetupWidget::AllianceSetupWidget ( GameMap gamemap,
ApplyStrategy applyStrategy,
bool  allEditable,
PG_Widget *  parent,
const PG_Rect &  r,
const std::string &  style = "ScrollWidget" 
)
AllianceSetupWidget::~AllianceSetupWidget ( )

Definition at line 330 of file alliancesetup.cpp.

Member Function Documentation

void AllianceSetupWidget::Apply ( )
DiplomaticStates & AllianceSetupWidget::getState ( int  actingPlayer,
int  secondPlayer 
)
protected

Definition at line 288 of file alliancesetup.cpp.

References states.

Referenced by AllianceSetupWidget(), Apply(), and setState().

int AllianceSetupWidget::linearize ( int  actingPlayer,
int  secondPlayer 
)
protected

Definition at line 293 of file alliancesetup.cpp.

References GameMap::getPlayerCount().

Referenced by AllianceSetupWidget(), and setState().

void AllianceSetupWidget::setState ( DiplomaticStates  s,
int  actingPlayer,
int  secondPlayer 
)
protected

Definition at line 279 of file alliancesetup.cpp.

References diplomaticWidgets, getState(), and linearize().

Referenced by AllianceSetupWidget().

Member Data Documentation

DiplomaticWidgets AllianceSetupWidget::diplomaticWidgets
protected

Definition at line 48 of file alliancesetup.h.

Referenced by AllianceSetupWidget(), and setState().

vector<PlayerWidgets> AllianceSetupWidget::playerWidgets
protected

Definition at line 50 of file alliancesetup.h.

Referenced by AllianceSetupWidget().

vector< vector< DiplomaticTransitions > > AllianceSetupWidget::stateChanges
protected

Definition at line 44 of file alliancesetup.h.

Referenced by AllianceSetupWidget(), and Apply().

vector< vector< DiplomaticStates > > AllianceSetupWidget::states
protected

Definition at line 45 of file alliancesetup.h.

Referenced by AllianceSetupWidget(), and getState().


The documentation for this class was generated from the following files: