#include <anope.h>

Public Member Functions | |
| void | SetFlag (T value) |
| void | UnsetFlag (T value) |
| bool | HasFlag (T value) const |
| size_t | FlagCount () const |
| void | ClearFlags () |
| Anope::string | ToString () const |
| void | FromString (const Anope::string &str) |
| std::vector< Anope::string > | ToVector () const |
| void | FromVector (const std::vector< Anope::string > &strings) |
Static Public Member Functions | |
| static const Anope::string * | GetFlagStrings () |
Private Attributes | |
| std::vector< bool > | flags_values |
Static Private Attributes | |
| static const Anope::string * | flags_strings |
Class with the ability to keep flags on items, they should extend from this where T is an enum.
Definition at line 770 of file anope.h.
| void Flags< T >::ClearFlags | ( | ) | [inline] |
Unset all of the flags
Definition at line 823 of file anope.h.
Referenced by Flags< ServerFlag >::FromVector(), LoadChanInfo(), LoadNickCore(), OSDefcon::ParseModeString(), Channel::Reset(), UnrealIRCdProto::SendJoin(), PlexusProto::SendJoin(), ngIRCdProto::SendJoin(), InspIRCd12Proto::SendJoin(), InspIRCdProto::SendJoin(), BahamutIRCdProto::SendJoin(), and ModeManager::UpdateDefaultMLock().
| size_t Flags< T >::FlagCount | ( | ) | const [inline] |
Check how many flags are set
Definition at line 812 of file anope.h.
Referenced by Channel::HasUserStatus(), and DBPlain::OnSaveDatabase().
| void Flags< T >::FromString | ( | const Anope::string & | str | ) | [inline] |
Definition at line 843 of file anope.h.
Referenced by AutoKick::Unserialize(), and BotInfo::Unserialize().
| void Flags< T >::FromVector | ( | const std::vector< Anope::string > & | strings | ) | [inline] |
Definition at line 864 of file anope.h.
Referenced by Flags< ServerFlag >::FromString(), and OnDatabaseReadMetadata().
| static const Anope::string* Flags< T >::GetFlagStrings | ( | ) | [inline, static] |
Definition at line 828 of file anope.h.
Referenced by OnDatabaseReadMetadata().
| bool Flags< T >::HasFlag | ( | T | value | ) | const [inline] |
Check if this item has a flag
| value | The flag |
Definition at line 802 of file anope.h.
Referenced by CommandOSDNS::AddServer(), SocketEngine::Change(), ChannelInfo::ChannelInfo(), MyMemoServService::Check(), ChannelInfo::CheckKick(), CommandNSInfo::CheckOptStr(), CommandCSInfo::CheckOptStr(), CommandBSInfo::CheckOptStr(), CommandCSAKick::DoAdd(), CommandBSBot::DoChange(), CommandCSAKick::DoDel(), CommandBSBot::DoDel(), CommandMSSet::DoLimit(), DoneServices(), MemoListCallback::DoRead(), CommandCSEnforce::DoSecureOps(), CommandNSCert::DoServAdminList(), CommandOSNOOP::Execute(), CommandNSList::Execute(), CommandNSInfo::Execute(), CommandNSGList::Execute(), CommandNSAList::Execute(), CommandNSAccess::Execute(), CommandMSRead::Execute(), CommandMSList::Execute(), CommandMSInfo::Execute(), CommandMSCheck::Execute(), CommandMSCancel::Execute(), CommandCSUnSuspend::Execute(), CommandCSStatus::Execute(), CommandCSSetSuccessor::Execute(), CommandCSSetPersist::Execute(), CommandCSSetFounder::Execute(), CommandCSRegister::Execute(), CommandCSList::Execute(), CommandCSKick::Execute(), CommandCSInfo::Execute(), CommandCSDrop::Execute(), CommandCSClone::Execute(), CommandCSBan::Execute(), CommandBSInfo::Execute(), CommandBSBotList::Execute(), CommandBSUnassign::Execute(), CommandBSAssign::Execute(), SSLSocketIO::FinishAccept(), SocketIO::FinishConnect(), SSLSocketIO::FinishConnect(), MChanstats::GetDisplay(), User::GetModes(), User::HasMode(), Channel::HasUserStatus(), UnrealExtBan::Matches(), InspIRCdExtBan::Matches(), NickCore::NickCore(), Server::Notice(), OSDefcon::OnChannelModeSet(), OSDefcon::OnChannelModeUnset(), CSAKick::OnCheckKick(), ChanServCore::OnDelCore(), ModuleDNS::OnNewServer(), NSAJoin::OnNickIdentify(), BSKick::OnPrivmsg(), WebCPanel::NickServ::Alist::OnRequest(), WebCPanel::MemoServ::Memos::OnRequest(), WebCPanel::ChanServ::Set::OnRequest(), WebCPanel::ChanServ::Drop::OnRequest(), DBPlain::OnSaveDatabase(), NSRecoverRequest::OnSuccess(), MChanstats::OnTopicUpdated(), OSDefcon::ParseModeString(), SocketEngine::Process(), CommandCSAKick::ProcessList(), Channel::Reset(), IRCDMessageRSQuit::Run(), MyMemoServService::Send(), UnrealIRCdProto::SendJoin(), PlexusProto::SendJoin(), ngIRCdProto::SendJoin(), InspIRCd12Proto::SendJoin(), InspIRCdProto::SendJoin(), BahamutIRCdProto::SendJoin(), User::SendMessage(), IRCDProto::SendMessageInternal(), Server::Server(), MyGlobalService::ServerGlobal(), CommandCSTopic::Set(), Channel::SetCorrectModes(), ShouldHide(), Message::Join::SJoin(), Server::Sync(), ExpireCallback::Tick(), Flags< ServerFlag >::ToVector(), and UplinkSocket::Message::~Message().
| void Flags< T >::SetFlag | ( | T | value | ) | [inline] |
Add a flag to this item
| value | The flag |
Definition at line 779 of file anope.h.
Referenced by SocketIO::Accept(), SSLSocketIO::Accept(), ChannelInfo::AddAkick(), SocketEngine::Change(), ChannelInfo::ChannelInfo(), User::Collide(), SocketIO::Connect(), SSLSocketIO::Connect(), CommandMSSet::DoLimit(), CommandMSSet::DoNotify(), CommandCSEnforce::DoSecureOps(), DoServices(), CommandNSSuspend::Execute(), CommandNSSASetNoexpire::Execute(), CommandNSRegister::Execute(), CommandMSRSend::Execute(), CommandCSSuspend::Execute(), CommandCSSASetNoexpire::Execute(), CommandCSSetSignKick::Execute(), CommandCSSetSecureOps::Execute(), CommandCSSetSecureFounder::Execute(), CommandCSSetSecure::Execute(), CommandCSSetRestricted::Execute(), CommandCSSetPrivate::Execute(), CommandCSSetPersist::Execute(), CommandCSSetPeace::Execute(), CommandCSSetKeepTopic::Execute(), CommandCSSetChanstats::Execute(), CommandCSSetAutoOp::Execute(), CommandCSRegister::Execute(), CommandCSClone::Execute(), CommandBSSetPrivate::Execute(), CommandBSSetNoBot::Execute(), CommandBSSetGreet::Execute(), CommandBSSetFantasy::Execute(), CommandBSSetDontKickVoices::Execute(), CommandBSSetDontKickOps::Execute(), CommandBSKick::Execute(), SSLSocketIO::FinishAccept(), SocketIO::FinishConnect(), SSLSocketIO::FinishConnect(), Flags< ServerFlag >::FromVector(), LoadBots(), LoadChannels(), LoadNicks(), CommandCSTopic::Lock(), OnDatabaseReadMetadata(), WebCPanel::MemoServ::Memos::OnRequest(), WebCPanel::ChanServ::Set::OnRequest(), OSDefcon::ParseModeString(), SocketEngine::Process(), CommandNSSetSecure::Run(), CommandNSSetPrivate::Run(), CommandNSSetMessage::Run(), CommandNSSetKill::Run(), CommandNSSetHide::Run(), CommandNSSetAutoOp::Run(), MyMemoServService::Send(), HybridProto::SendTopic(), ServerConfig::ServerConfig(), CommandCSTopic::Set(), User::SetModeInternal(), Channel::SetModeInternal(), Message::Join::SJoin(), ModuleProxyScan::ConnectionTimeout::Tick(), ModeManager::UpdateDefaultMLock(), and UplinkSocket::~UplinkSocket().
| Anope::string Flags< T >::ToString | ( | ) | const [inline] |
Definition at line 833 of file anope.h.
Referenced by DBPlain::OnSaveDatabase(), and ChannelInfo::Serialize().
| std::vector<Anope::string> Flags< T >::ToVector | ( | ) | const [inline] |
Definition at line 855 of file anope.h.
Referenced by Flags< ServerFlag >::ToString().
| void Flags< T >::UnsetFlag | ( | T | value | ) | [inline] |
Remove a flag from this item
| value | The flag |
Definition at line 792 of file anope.h.
Referenced by SocketEngine::Change(), SocketIO::Connect(), SSLSocketIO::Connect(), CommandMSSet::DoLimit(), CommandMSSet::DoNotify(), MemoListCallback::DoRead(), CommandCSEnforce::DoSecureOps(), CommandNSSuspend::Execute(), CommandNSSASetNoexpire::Execute(), CommandNSConfirm::Execute(), CommandCSUnSuspend::Execute(), CommandCSSASetNoexpire::Execute(), CommandCSSetSignKick::Execute(), CommandCSSetSecureOps::Execute(), CommandCSSetSecureFounder::Execute(), CommandCSSetSecure::Execute(), CommandCSSetRestricted::Execute(), CommandCSSetPrivate::Execute(), CommandCSSetPersist::Execute(), CommandCSSetPeace::Execute(), CommandCSSetKeepTopic::Execute(), CommandCSSetChanstats::Execute(), CommandCSSetAutoOp::Execute(), CommandBSSetPrivate::Execute(), CommandBSSetNoBot::Execute(), CommandBSSetGreet::Execute(), CommandBSSetFantasy::Execute(), CommandBSSetDontKickVoices::Execute(), CommandBSSetDontKickOps::Execute(), CommandBSKick::Execute(), SSLSocketIO::FinishAccept(), SocketIO::FinishConnect(), SSLSocketIO::FinishConnect(), LoadChannels(), NSResetPass::OnPreCommand(), WebCPanel::MemoServ::Memos::OnRequest(), WebCPanel::ChanServ::Set::OnRequest(), OSDefcon::ParseModeString(), User::RemoveModeInternal(), Channel::RemoveModeInternal(), rsend_notify(), CommandNSSetSecure::Run(), CommandNSSetPrivate::Run(), CommandNSSetMessage::Run(), CommandNSSetKill::Run(), CommandNSSetHide::Run(), CommandNSSetAutoOp::Run(), CommandCSTopic::Set(), Message::Join::SJoin(), and CommandCSTopic::Unlock().
const Anope::string* Flags< T >::flags_strings [static, private] |
Definition at line 773 of file anope.h.
Referenced by Flags< ServerFlag >::FromVector(), Flags< ServerFlag >::GetFlagStrings(), and Flags< ServerFlag >::ToVector().
std::vector<bool> Flags< T >::flags_values [private] |
Definition at line 772 of file anope.h.
Referenced by Flags< ServerFlag >::ClearFlags(), Flags< ServerFlag >::FlagCount(), Flags< ServerFlag >::HasFlag(), Flags< ServerFlag >::SetFlag(), and Flags< ServerFlag >::UnsetFlag().
1.7.1