|
OpenSDN source code
|
#include <feature_flags.h>

Public Types | |
| typedef boost::function< void()> | FlagStateCb |
Public Member Functions | |
| Flag (FlagManager *manager, const std::string &name, const std::string &description, bool enabled, ContextVec &context_infos) | |
| Flag (const Flag &flag, FlagStateCb callback) | |
| Flag () | |
| ~Flag () | |
| void | InvokeCb () |
| void | set_name (const std::string &val) |
| const std::string & | name () const |
| void | set_description (const std::string &val) |
| const std::string & | description () const |
| void | set_enabled (const bool val) |
| const bool | enabled () const |
| void | set_context_infos (const ContextVec &val) |
| const ContextVec & | context_infos () const |
| bool | operator== (const Flag &rhs) const |
| bool | operator!= (const Flag &rhs) const |
Private Member Functions | |
| DISALLOW_COPY_AND_ASSIGN (Flag) | |
Private Attributes | |
| std::string | name_ |
| std::string | description_ |
| bool | enabled_ |
| ContextVec | context_infos_ |
| FlagStateCb | flag_state_cb_ |
| FlagManager * | manager_ |
Class representing a feature flag
Modules can use this class to define flags they are interested in. Data provided by module includes
Definition at line 258 of file feature_flags.h.
| typedef boost::function<void ()> process::Flag::FlagStateCb |
Callback provided by module to track run-time updates to feature
Definition at line 267 of file feature_flags.h.
| process::Flag::Flag | ( | FlagManager * | manager, |
| const std::string & | name, | ||
| const std::string & | description, | ||
| bool | enabled, | ||
| ContextVec & | context_infos | ||
| ) |
This constructor is used to create a feature flag with basic information; name, description, default behavior and optional context information.
| process::Flag::Flag | ( | const Flag & | flag, |
| FlagStateCb | callback | ||
| ) |
This constructor takes a Flag object with basic information with provision for components to act on run-time updates through a callback
Add flag to FlagManager's interest list
Definition at line 49 of file feature_flags.cc.

|
inline |
Default Constructor
Definition at line 287 of file feature_flags.h.
| process::Flag::~Flag | ( | ) |
|
inline |
Definition at line 308 of file feature_flags.h.
|
inline |
Definition at line 302 of file feature_flags.h.
|
private |
|
inline |
Definition at line 305 of file feature_flags.h.
| void process::Flag::InvokeCb | ( | ) |
Method to invoke callback provided by modules for this flag
Member Functions
Definition at line 73 of file feature_flags.cc.
|
inline |
Definition at line 299 of file feature_flags.h.
| bool process::Flag::operator!= | ( | const Flag & | rhs | ) | const |
Definition at line 91 of file feature_flags.cc.
| bool process::Flag::operator== | ( | const Flag & | rhs | ) | const |
Definition at line 79 of file feature_flags.cc.
|
inline |
Definition at line 307 of file feature_flags.h.
|
inline |
Definition at line 301 of file feature_flags.h.
|
inline |
Definition at line 304 of file feature_flags.h.
|
inline |
Getter/Setter functions for members
Definition at line 298 of file feature_flags.h.
|
private |
Definition at line 316 of file feature_flags.h.
|
private |
Definition at line 314 of file feature_flags.h.
|
private |
Definition at line 315 of file feature_flags.h.
|
private |
Definition at line 318 of file feature_flags.h.
|
private |
Definition at line 319 of file feature_flags.h.
|
private |
Definition at line 313 of file feature_flags.h.