Rosetta Protocols  2014.35
Public Member Functions | Protected Attributes | List of all members
protocols::frag_picker::quota::QuotaConfig Class Reference

read a config file for quota selector More...

#include <QuotaConfig.hh>

Public Member Functions

 QuotaConfig (std::string config_file_name)
 Constructor reads a config file. More...
 
 QuotaConfig ()
 Constructor used by derived classes. More...
 
Size count_pools ()
 how many pools have been defined in a config file More...
 
Real get_fraction (Size pool_id)
 returns a fraction for a given pool More...
 
void set_fraction (Size pool_id, Real fraction)
 returns a fraction for a given pool More...
 
Real get_fraction (std::string pool_name)
 returns a fraction for a given pool More...
 
bool is_valid_quota_pool_name (std::string &pool_name)
 returns true if a config file defined a given pool name More...
 
std::stringget_pool_name (Size pool_id)
 return a string id (name) assigned to a given pool More...
 

Protected Attributes

utility::vector1< Realpool_weights_
 
utility::vector1< std::stringpool_names_
 

Detailed Description

read a config file for quota selector

Constructor & Destructor Documentation

protocols::frag_picker::quota::QuotaConfig::QuotaConfig ( std::string  config_file_name)

Constructor reads a config file.

References getline(), protocols::frag_picker::quota::trQuotaConfig, and utility_exit_with_message.

protocols::frag_picker::quota::QuotaConfig::QuotaConfig ( )
inline

Constructor used by derived classes.

Member Function Documentation

Size protocols::frag_picker::quota::QuotaConfig::count_pools ( )
inline

how many pools have been defined in a config file

Real protocols::frag_picker::quota::QuotaConfig::get_fraction ( Size  pool_id)
inline

returns a fraction for a given pool

Real protocols::frag_picker::quota::QuotaConfig::get_fraction ( std::string  pool_name)
inline

returns a fraction for a given pool

Detailed: if the given string is not a valid name of a quota pool,
the method returns 0

References protocols::fldsgn::topology::compare().

std::string& protocols::frag_picker::quota::QuotaConfig::get_pool_name ( Size  pool_id)
inline

return a string id (name) assigned to a given pool

bool protocols::frag_picker::quota::QuotaConfig::is_valid_quota_pool_name ( std::string pool_name)
inline

returns true if a config file defined a given pool name

References protocols::fldsgn::topology::compare().

void protocols::frag_picker::quota::QuotaConfig::set_fraction ( Size  pool_id,
Real  fraction 
)
inline

returns a fraction for a given pool

Member Data Documentation

utility::vector1<std::string> protocols::frag_picker::quota::QuotaConfig::pool_names_
protected
utility::vector1<Real> protocols::frag_picker::quota::QuotaConfig::pool_weights_
protected

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