ProgOptions()No comment in the header yet.
API · fair::mq
No comment in the header yet.
ProgOptions()No comment in the header yet.
ProgOptions(const ProgOptions&) = deleteNo comment in the header yet.
ProgOptions(ProgOptions&&) = deleteNo comment in the header yet.
ProgOptions& operator=(const ProgOptions&) = deleteNo comment in the header yet.
ProgOptions& operator=(ProgOptions&&) = deleteNo comment in the header yet.
~ProgOptions() = defaultNo comment in the header yet.
void ParseAll(const std::vector<std::string>& cmdArgs, bool allowUnregistered)No comment in the header yet.
void ParseAll(int argc, char const*const* argv, bool allowUnregistered = true)No comment in the header yet.
void Notify()No comment in the header yet.
void AddToCmdLineOptions(
boost::program_options::options_description optDesc,
bool visible = true
)No comment in the header yet.
boost::program_options::options_description& GetCmdLineOptions()No comment in the header yet.
int Count(const std::string& key) constChecks a property with the given key exist in the configuration.
keystd::unordered_map<std::string, int> GetChannelInfo() constRetrieve current channel information.
std::vector<std::string> GetPropertyKeys() constDiscover the list of property keys.
template<typename T>
T GetProperty(const std::string& key) constRead config property, throw if no property with this key exists.
keytemplate<typename T>
T GetProperty(const std::string& key, const T& ifNotFound) constRead config property, return provided value if no property with this key exists.
keyifNotFoundstd::string GetPropertyAsString(const std::string& key) constRead config property as string, throw if no property with this key exists.
Supports conversion to string for a fixed set of types, for custom/unsupported types add them via fair::mq::PropertyHelper::AddType<MyType>("optional label") the provided type must then be convertible to string via operator<<
keystd::string GetPropertyAsString(
const std::string& key,
const std::string& ifNotFound
) constRead config property, return provided value if no property with this key exists.
Supports conversion to string for a fixed set of types, for custom/unsupported types add them via fair::mq::PropertyHelper::AddType<MyType>("optional label") the provided type must then be convertible to string via operator<<
keyifNotFoundfair::mq::Properties GetProperties(const std::string& q) constRead several config properties whose keys match the provided regular expression.
qfair::mq::Properties GetPropertiesStartingWith(const std::string& q) constRead several config properties whose keys start with the provided string.
Typically more performant than GetProperties with regex
qstd::map<std::string, std::string> GetPropertiesAsString(const std::string& q) constRead several config properties as string whose keys match the provided regular expression.
qstd::map<std::string, std::string> GetPropertiesAsStringStartingWith(const std::string& q) constRead several config properties as string whose keys start with the provided string.
Typically more performant than GetPropertiesAsString with regex
qtemplate<typename T>
void SetProperty(const std::string& key, T val)Set config property.
keyvaltemplate<typename T>
bool UpdateProperty(const std::string& key, T val)Updates an existing config property (or fails if it doesn't exist)
keyvalvoid SetProperties(const fair::mq::Properties& input)Set multiple config properties.
propsbool UpdateProperties(const fair::mq::Properties& input)Updates multiple existing config properties (or fails of any of then do not exist, leaving property store unchanged)
propsvoid DeleteProperty(const std::string& key)Deletes a property with the given key from the config store.
keyvoid AddChannel(const std::string& name, const Channel& channel)Takes the provided channel and creates properties based on it.
namechanneltemplate<typename T>
void Subscribe(
const std::string& subscriber,
std::function<void(typename fair::mq::PropertyChange::KeyType, T)> func
) constSubscribe to property updates of type T.
Subscribe to property changes with a callback to monitor property changes in an event based fashion.
subscribercallbacktemplate<typename T>
void Unsubscribe(const std::string& subscriber) constUnsubscribe from property updates of type T.
subscribervoid SubscribeAsString(
const std::string& subscriber,
std::function<void(typename fair::mq::PropertyChange::KeyType, std::string)> func
) constSubscribe to property updates, with values converted to string.
Subscribe to property changes with a callback to monitor property changes in an event based fashion. Will convert the property to string.
subscribercallbackvoid UnsubscribeAsString(const std::string& subscriber) constUnsubscribe from property updates that convert to string.
subscribervoid PrintHelp() constprints full options description
void PrintOptions() constprints properties stored in the property container
void PrintOptionsRaw() constprints full options description in a compact machine-readable format
const boost::program_options::variables_map& GetVarMap() constreturns the property container
template<typename T>
T GetValue(const std::string& key) constRead config property, return default-constructed object if key doesn't exist.
keytemplate<typename T>
int SetValue(const std::string& key, T val)No comment in the header yet.
std::string GetStringValue(const std::string& key) constRead config property as string, return default-constructed object if key doesn't exist.
key