Rosetta Utilities  2014.35
Public Member Functions | Private Attributes | Friends | List of all members
basic::resource_manager::JobOptions Class Reference

The JobOptions class holds job-specific options (i.e. command line flags). It can be used by the ResourceManager to hold options for a particular job, so that the ResourceManager can retrieve those options as needed. It is basically a bag for 12 OptionKey/OptionKeyValue maps, one for every kind of OptionKey. More...

#include <JobOptions.hh>

Public Member Functions

virtual ~JobOptions ()
 Automatically generated virtual destructor for class deriving directly from ReferenceCount. More...
 
virtual void show (std::ostream &out) const
 Describe this JobOptions to the given output stream. More...
 
void add_option (utility::options::BooleanOptionKey key, bool val)
 Set the value for the indicated boolean option. More...
 
bool has_option (utility::options::BooleanOptionKey key) const
 Return true if a value for the indicated boolean option has been set. More...
 
bool get_option (utility::options::BooleanOptionKey key) const
 Return the value of the indicated boolean option. More...
 
void add_option (utility::options::BooleanVectorOptionKey key, utility::vector1< bool > const &val)
 Set the value for the indicated boolean-vector option. More...
 
bool has_option (utility::options::BooleanVectorOptionKey key) const
 Return true if a value for the indicated boolean-vector option has been set. More...
 
utility::vector1< bool > const & get_option (utility::options::BooleanVectorOptionKey key) const
 Return the value of the indicated boolean-vector option. More...
 
void add_option (utility::options::FileOptionKey key, utility::file::FileName const &val)
 Set the value for the indicated file option. More...
 
bool has_option (utility::options::FileOptionKey key) const
 Return true if a value for the indicated file option has been set. More...
 
utility::file::FileName const & get_option (utility::options::FileOptionKey key) const
 Return the value of the indicated file option. More...
 
void add_option (utility::options::FileVectorOptionKey key, utility::vector1< utility::file::FileName > const &val)
 Set the value for the indicated file-vector option. More...
 
bool has_option (utility::options::FileVectorOptionKey key) const
 Return true if a value for the indicated file-vector option has been set. More...
 
utility::vector1
< utility::file::FileName >
const & 
get_option (utility::options::FileVectorOptionKey key) const
 Return the value of the indicated file-vector option. More...
 
void add_option (utility::options::IntegerOptionKey key, int val)
 Set the value for the indicated integer option. More...
 
bool has_option (utility::options::IntegerOptionKey key) const
 Return true if a value for the indicated integer option has been set. More...
 
int get_option (utility::options::IntegerOptionKey key) const
 Return the value of the indicated integer option. More...
 
void add_option (utility::options::IntegerVectorOptionKey key, utility::vector1< int > const &val)
 Set the value for the indicated integer-vector option. More...
 
bool has_option (utility::options::IntegerVectorOptionKey key) const
 Return true if a value for the indicated integer-vector option has been set. More...
 
utility::vector1< int > const & get_option (utility::options::IntegerVectorOptionKey key) const
 Return the value of the indicated integer-vector option. More...
 
void add_option (utility::options::PathOptionKey key, utility::file::PathName const &val)
 Set the value for the indicated path option. More...
 
bool has_option (utility::options::PathOptionKey key) const
 Return true if a value for the indicated path option has been set. More...
 
utility::file::PathName const & get_option (utility::options::PathOptionKey key) const
 Return the value of the indicated path option. More...
 
void add_option (utility::options::PathVectorOptionKey key, utility::vector1< utility::file::PathName > const &val)
 Set the value for the indicated path-vector option. More...
 
bool has_option (utility::options::PathVectorOptionKey key) const
 Return true if a value for the indicated path-vector option has been set. More...
 
utility::vector1
< utility::file::PathName >
const & 
get_option (utility::options::PathVectorOptionKey key) const
 Return the value of the indicated path-vector option. More...
 
void add_option (utility::options::RealOptionKey key, platform::Real val)
 Set the value for the indicated real option. More...
 
bool has_option (utility::options::RealOptionKey key) const
 Return true if a value for the indicated real option has been set. More...
 
platform::Real get_option (utility::options::RealOptionKey key) const
 Return the value of the indicated real option. More...
 
void add_option (utility::options::RealVectorOptionKey key, utility::vector1< platform::Real > const &val)
 Set the value for the indicated real-vector option. More...
 
bool has_option (utility::options::RealVectorOptionKey key) const
 Return true if a value for the indicated real-vector option has been set. More...
 
utility::vector1
< platform::Real > const & 
get_option (utility::options::RealVectorOptionKey key) const
 Return the value of the indicated real-vector option. More...
 
void add_option (utility::options::StringOptionKey key, std::string val)
 Set the value for the indicated string option. More...
 
bool has_option (utility::options::StringOptionKey key) const
 Return true if a value for the indicated string option has been set. More...
 
std::string const & get_option (utility::options::StringOptionKey key) const
 Return the value of the indicated string option. More...
 
void add_option (utility::options::StringVectorOptionKey key, utility::vector1< std::string > const &val)
 Set the value for the indicated string-vector option. More...
 
bool has_option (utility::options::StringVectorOptionKey key) const
 Return true if a value for the indicated string-vector option has been set. More...
 
utility::vector1< std::string >
const & 
get_option (utility::options::StringVectorOptionKey key) const
 Return the value of the indicated string-vector option. More...
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
void ctor ()
 
virtual ~ReferenceCount ()
 Destructor. More...
 
Size ref_count () const
 Reference count. More...
 

Private Attributes

std::map
< utility::options::BooleanOptionKey,
bool
boolean_options_
 
std::map
< utility::options::BooleanVectorOptionKey,
utility::vector1< bool > > 
boolean_vector_options_
 
std::map
< utility::options::FileOptionKey,
utility::file::FileName
file_options_
 
std::map
< utility::options::FileVectorOptionKey,
utility::vector1
< utility::file::FileName > > 
file_vector_options_
 
std::map
< utility::options::IntegerOptionKey,
int
integer_options_
 
std::map
< utility::options::IntegerVectorOptionKey,
utility::vector1< int > > 
integer_vector_options_
 
std::map
< utility::options::PathOptionKey,
utility::file::PathName
path_options_
 
std::map
< utility::options::PathVectorOptionKey,
utility::vector1
< utility::file::PathName > > 
path_vector_options_
 
std::map
< utility::options::RealOptionKey,
platform::Real
real_options_
 
std::map
< utility::options::RealVectorOptionKey,
utility::vector1
< platform::Real > > 
real_vector_options_
 
std::map
< utility::options::StringOptionKey,
std::string > 
string_options_
 
std::map
< utility::options::StringVectorOptionKey,
utility::vector1< std::string > > 
string_vector_options_
 

Friends

std::ostream & operator<< (std::ostream &out, const JobOptions &job_options)
 This friend function output-operator function invokes the JobOption's show() method. More...
 

Additional Inherited Members

- Public Types inherited from utility::pointer::ReferenceCount
typedef platform::Size Size
 
typedef platform::Size size_type
 
- Protected Member Functions inherited from utility::pointer::ReferenceCount
 ReferenceCount ()
 Default constructor. More...
 
 ReferenceCount (ReferenceCount const &)
 Copy constructor. More...
 
ReferenceCountoperator= (ReferenceCount const &)
 Copy assignment. More...
 

Detailed Description

The JobOptions class holds job-specific options (i.e. command line flags). It can be used by the ResourceManager to hold options for a particular job, so that the ResourceManager can retrieve those options as needed. It is basically a bag for 12 OptionKey/OptionKeyValue maps, one for every kind of OptionKey.

Constructor & Destructor Documentation

basic::resource_manager::JobOptions::~JobOptions ( )
virtual

Automatically generated virtual destructor for class deriving directly from ReferenceCount.

Auto-generated virtual destructor

Member Function Documentation

void basic::resource_manager::JobOptions::add_option ( utility::options::BooleanOptionKey  key,
bool  val 
)

Set the value for the indicated boolean option.

References boolean_options_, and basic::options::OptionKeys::key.

void basic::resource_manager::JobOptions::add_option ( utility::options::BooleanVectorOptionKey  key,
utility::vector1< bool > const &  val 
)

Set the value for the indicated boolean-vector option.

void basic::resource_manager::JobOptions::add_option ( utility::options::FileOptionKey  key,
utility::file::FileName const &  val 
)

Set the value for the indicated file option.

References file_options_, and basic::options::OptionKeys::key.

void basic::resource_manager::JobOptions::add_option ( utility::options::FileVectorOptionKey  key,
utility::vector1< utility::file::FileName > const &  val 
)

Set the value for the indicated file-vector option.

References file_vector_options_, and basic::options::OptionKeys::key.

void basic::resource_manager::JobOptions::add_option ( utility::options::IntegerOptionKey  key,
int  val 
)

Set the value for the indicated integer option.

References integer_options_, and basic::options::OptionKeys::key.

void basic::resource_manager::JobOptions::add_option ( utility::options::IntegerVectorOptionKey  key,
utility::vector1< int > const &  val 
)

Set the value for the indicated integer-vector option.

void basic::resource_manager::JobOptions::add_option ( utility::options::PathOptionKey  key,
utility::file::PathName const &  val 
)

Set the value for the indicated path option.

References basic::options::OptionKeys::key, and path_options_.

void basic::resource_manager::JobOptions::add_option ( utility::options::PathVectorOptionKey  key,
utility::vector1< utility::file::PathName > const &  val 
)

Set the value for the indicated path-vector option.

References basic::options::OptionKeys::key, and path_vector_options_.

void basic::resource_manager::JobOptions::add_option ( utility::options::RealOptionKey  key,
platform::Real  val 
)

Set the value for the indicated real option.

void basic::resource_manager::JobOptions::add_option ( utility::options::RealVectorOptionKey  key,
utility::vector1< platform::Real > const &  val 
)

Set the value for the indicated real-vector option.

void basic::resource_manager::JobOptions::add_option ( utility::options::StringOptionKey  key,
std::string  val 
)

Set the value for the indicated string option.

References basic::options::OptionKeys::key, and string_options_.

void basic::resource_manager::JobOptions::add_option ( utility::options::StringVectorOptionKey  key,
utility::vector1< std::string > const &  val 
)

Set the value for the indicated string-vector option.

bool basic::resource_manager::JobOptions::get_option ( utility::options::BooleanOptionKey  key) const

Return the value of the indicated boolean option.

References boolean_options_, and utility::keys::AutoKey< O, S, C >::identifier().

vector1< bool > const & basic::resource_manager::JobOptions::get_option ( utility::options::BooleanVectorOptionKey  key) const

Return the value of the indicated boolean-vector option.

References boolean_vector_options_, and utility::keys::AutoKey< O, S, C >::identifier().

FileName const & basic::resource_manager::JobOptions::get_option ( utility::options::FileOptionKey  key) const

Return the value of the indicated file option.

References file_options_, and utility::keys::AutoKey< O, S, C >::identifier().

vector1< FileName > const & basic::resource_manager::JobOptions::get_option ( utility::options::FileVectorOptionKey  key) const

Return the value of the indicated file-vector option.

References file_vector_options_, and utility::keys::AutoKey< O, S, C >::identifier().

int basic::resource_manager::JobOptions::get_option ( utility::options::IntegerOptionKey  key) const

Return the value of the indicated integer option.

References utility::keys::AutoKey< O, S, C >::identifier(), and integer_options_.

vector1< int > const & basic::resource_manager::JobOptions::get_option ( utility::options::IntegerVectorOptionKey  key) const

Return the value of the indicated integer-vector option.

References utility::keys::AutoKey< O, S, C >::identifier(), and integer_vector_options_.

PathName const & basic::resource_manager::JobOptions::get_option ( utility::options::PathOptionKey  key) const

Return the value of the indicated path option.

References utility::keys::AutoKey< O, S, C >::identifier(), and path_options_.

vector1< PathName > const & basic::resource_manager::JobOptions::get_option ( utility::options::PathVectorOptionKey  key) const

Return the value of the indicated path-vector option.

References utility::keys::AutoKey< O, S, C >::identifier(), and path_vector_options_.

Real basic::resource_manager::JobOptions::get_option ( utility::options::RealOptionKey  key) const

Return the value of the indicated real option.

References utility::keys::AutoKey< O, S, C >::identifier(), and real_options_.

vector1< Real > const & basic::resource_manager::JobOptions::get_option ( utility::options::RealVectorOptionKey  key) const

Return the value of the indicated real-vector option.

References utility::keys::AutoKey< O, S, C >::identifier(), and real_vector_options_.

string const & basic::resource_manager::JobOptions::get_option ( utility::options::StringOptionKey  key) const

Return the value of the indicated string option.

References utility::keys::AutoKey< O, S, C >::identifier(), and string_options_.

vector1< string > const & basic::resource_manager::JobOptions::get_option ( utility::options::StringVectorOptionKey  key) const

Return the value of the indicated string-vector option.

References utility::keys::AutoKey< O, S, C >::identifier(), and string_vector_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::BooleanOptionKey  key) const

Return true if a value for the indicated boolean option has been set.

References boolean_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::BooleanVectorOptionKey  key) const

Return true if a value for the indicated boolean-vector option has been set.

References boolean_vector_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::FileOptionKey  key) const

Return true if a value for the indicated file option has been set.

References file_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::FileVectorOptionKey  key) const

Return true if a value for the indicated file-vector option has been set.

References file_vector_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::IntegerOptionKey  key) const

Return true if a value for the indicated integer option has been set.

References integer_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::IntegerVectorOptionKey  key) const

Return true if a value for the indicated integer-vector option has been set.

References integer_vector_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::PathOptionKey  key) const

Return true if a value for the indicated path option has been set.

References path_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::PathVectorOptionKey  key) const

Return true if a value for the indicated path-vector option has been set.

References path_vector_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::RealOptionKey  key) const

Return true if a value for the indicated real option has been set.

References real_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::RealVectorOptionKey  key) const

Return true if a value for the indicated real-vector option has been set.

References real_vector_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::StringOptionKey  key) const

Return true if a value for the indicated string option has been set.

References string_options_.

bool basic::resource_manager::JobOptions::has_option ( utility::options::StringVectorOptionKey  key) const

Return true if a value for the indicated string-vector option has been set.

References string_vector_options_.

void basic::resource_manager::JobOptions::show ( std::ostream &  out) const
virtual

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const JobOptions job_options 
)
friend

This friend function output-operator function invokes the JobOption's show() method.

Member Data Documentation

std::map< utility::options::BooleanOptionKey, bool > basic::resource_manager::JobOptions::boolean_options_
private
std::map< utility::options::BooleanVectorOptionKey, utility::vector1< bool > > basic::resource_manager::JobOptions::boolean_vector_options_
private

Referenced by get_option(), has_option(), and show().

std::map< utility::options::FileOptionKey, utility::file::FileName > basic::resource_manager::JobOptions::file_options_
private

Referenced by add_option(), get_option(), and has_option().

std::map< utility::options::FileVectorOptionKey, utility::vector1< utility::file::FileName > > basic::resource_manager::JobOptions::file_vector_options_
private

Referenced by add_option(), get_option(), and has_option().

std::map< utility::options::IntegerOptionKey, int > basic::resource_manager::JobOptions::integer_options_
private

Referenced by add_option(), get_option(), and has_option().

std::map< utility::options::IntegerVectorOptionKey, utility::vector1< int > > basic::resource_manager::JobOptions::integer_vector_options_
private

Referenced by get_option(), and has_option().

std::map< utility::options::PathOptionKey, utility::file::PathName > basic::resource_manager::JobOptions::path_options_
private

Referenced by add_option(), get_option(), and has_option().

std::map< utility::options::PathVectorOptionKey, utility::vector1< utility::file::PathName > > basic::resource_manager::JobOptions::path_vector_options_
private

Referenced by add_option(), get_option(), and has_option().

std::map< utility::options::RealOptionKey, platform::Real > basic::resource_manager::JobOptions::real_options_
private

Referenced by get_option(), and has_option().

std::map< utility::options::RealVectorOptionKey, utility::vector1< platform::Real > > basic::resource_manager::JobOptions::real_vector_options_
private

Referenced by get_option(), and has_option().

std::map< utility::options::StringOptionKey, std::string > basic::resource_manager::JobOptions::string_options_
private

Referenced by add_option(), get_option(), and has_option().

std::map< utility::options::StringVectorOptionKey, utility::vector1< std::string > > basic::resource_manager::JobOptions::string_vector_options_
private

Referenced by get_option(), and has_option().


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