Pol  Revision:4b29d2b
Pol::Core::Guild Class Reference

#include <guilds.h>

+ Inheritance diagram for Pol::Core::Guild:

Public Member Functions

 Guild (Clib::ConfigElem &elem)
 
 Guild (unsigned int guildid)
 
void addMember (unsigned int serial)
 
void disband ()
 
bool disbanded () const
 
size_t estimateSize () const
 
unsigned int guildid () const
 
bool hasAllies () const
 
bool hasAlly (const Guild *g2) const
 
bool hasEnemies () const
 
bool hasEnemy (const Guild *g2) const
 
bool hasMembers () const
 
void printOn (Clib::StreamWriter &sw) const
 
void registerWithMembers ()
 
void update_online_members ()
 
- Public Member Functions inherited from ref_counted
unsigned int add_ref ()
 
unsigned int count () const
 
unsigned int release ()
 

Static Public Member Functions

static bool AreAllies (Guild *g1, Guild *g2)
 
static bool AreEnemies (Guild *g1, Guild *g2)
 
static GuildFindGuild (unsigned int guildid)
 
static GuildFindOrCreateGuild (unsigned int guildid, unsigned int memberserial)
 
static void update_online_members_remove (Mobile::Character *chr)
 

Private Attributes

SerialSet _allyguild_serials
 
bool _disbanded
 
SerialSet _enemyguild_serials
 
unsigned int _guildid
 
SerialSet _member_serials
 
PropertyList _proplist
 

Friends

class Module::EGuildRefObjImp
 

Additional Inherited Members

- Protected Member Functions inherited from ref_counted
 ref_counted ()
 
 ~ref_counted ()=default
 
- Protected Attributes inherited from ref_counted
std::atomic< unsigned int > _count
 

Detailed Description

Definition at line 32 of file guilds.h.

Constructor & Destructor Documentation

Pol::Core::Guild::Guild ( Clib::ConfigElem elem)
explicit
Pol::Core::Guild::Guild ( unsigned int  guildid)
explicit

Definition at line 51 of file guilds.cpp.

References _guildid, Pol::Core::gamestate, and Pol::Core::GameState::nextguildid.

Member Function Documentation

void Pol::Core::Guild::addMember ( unsigned int  serial)

Definition at line 173 of file guilds.cpp.

References _member_serials.

Referenced by FindOrCreateGuild().

bool Pol::Core::Guild::AreAllies ( Guild g1,
Guild g2 
)
static

Definition at line 178 of file guilds.cpp.

References hasAlly().

Referenced by Pol::Mobile::Character::is_guild_ally().

bool Pol::Core::Guild::AreEnemies ( Guild g1,
Guild g2 
)
static

Definition at line 182 of file guilds.cpp.

References hasEnemy().

Referenced by Pol::Mobile::Character::is_guild_enemy().

void Pol::Core::Guild::disband ( )

Definition at line 133 of file guilds.cpp.

References _disbanded.

Referenced by Pol::Module::GuildExecutorModule::mf_DestroyGuild().

bool Pol::Core::Guild::disbanded ( ) const

Definition at line 128 of file guilds.cpp.

References _disbanded.

Referenced by Pol::Module::getGuildParam().

size_t Pol::Core::Guild::estimateSize ( ) const
Guild * Pol::Core::Guild::FindGuild ( unsigned int  guildid)
static
Guild * Pol::Core::Guild::FindOrCreateGuild ( unsigned int  guildid,
unsigned int  memberserial 
)
static
bool Pol::Core::Guild::hasAllies ( ) const

Definition at line 143 of file guilds.cpp.

References _allyguild_serials.

Referenced by Pol::Module::GuildExecutorModule::mf_DestroyGuild().

bool Pol::Core::Guild::hasAlly ( const Guild g2) const

Definition at line 147 of file guilds.cpp.

References _allyguild_serials, and guildid().

Referenced by AreAllies().

bool Pol::Core::Guild::hasEnemies ( ) const

Definition at line 152 of file guilds.cpp.

References _enemyguild_serials.

Referenced by Pol::Module::GuildExecutorModule::mf_DestroyGuild().

bool Pol::Core::Guild::hasEnemy ( const Guild g2) const

Definition at line 156 of file guilds.cpp.

References _enemyguild_serials, and guildid().

Referenced by AreEnemies().

bool Pol::Core::Guild::hasMembers ( ) const

Definition at line 138 of file guilds.cpp.

References _member_serials.

Referenced by Pol::Module::GuildExecutorModule::mf_DestroyGuild().

void Pol::Core::Guild::registerWithMembers ( )

Definition at line 63 of file guilds.cpp.

References _member_serials, and Pol::Core::system_find_mobile().

Referenced by Pol::Core::register_guilds().

void Pol::Core::Guild::update_online_members_remove ( Mobile::Character chr)
static

Friends And Related Function Documentation

friend class Module::EGuildRefObjImp
friend

Definition at line 63 of file guilds.h.

Member Data Documentation

SerialSet Pol::Core::Guild::_allyguild_serials
private
bool Pol::Core::Guild::_disbanded
private

Definition at line 71 of file guilds.h.

Referenced by disband(), and disbanded().

SerialSet Pol::Core::Guild::_enemyguild_serials
private
unsigned int Pol::Core::Guild::_guildid
private

Definition at line 66 of file guilds.h.

Referenced by Guild(), guildid(), and printOn().

SerialSet Pol::Core::Guild::_member_serials
private
PropertyList Pol::Core::Guild::_proplist
private

Definition at line 70 of file guilds.h.

Referenced by estimateSize(), Guild(), and printOn().


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