Package rosetta :: Package basic :: Package resource_manager :: Module _basic_resource_manager_ :: Class ResourceManager
[hide private]
[frames] | no frames]

Class ResourceManager

                                          object --+        
                                                   |        
                                         ??.instance --+    
                                                       |    
SingletonBase_T_basic_resource_manager_ResourceManager_T --+
                                                           |
                                                          ResourceManager
Known Subclasses:

The ResourceManager is a singleton class responsible for holding, distributing, and eventually deallocating resources which may be shared between multiple jobs. A protocol may communicate directly with the ResourceManager, requesting resources, but remaining unaware of where those resources came from, or whether the same resource is being used in multiple contexts. A protocol should request a resource using a "resource description" (a string), which is a generic way of referring to a piece of data. For example, a protocol might request the native Pose, by asking for a resource with the description "native". The ResourceManager's job is to return the resource matching that description; when the "native" is requested, it is requested in some context (e.g. in a protocol running under JD2) and the ResourceManager serves as a backbone in which to deliever context-specific data to the protocol, while keeping the protocol ignorant and independent of the surrounding context. That way protocols can run in JD2 just as effectively as the could run in some other job-management environment, without having to assume responsibility for instantiating resources themselves. NOTE: Because the logic for deciding which of the derived ResourceManager classes should be instantiated depends on the options system, the ResourceManager should not be requested until after core::init::init() has been called (i.e. it should not be requested at load time.)

Instance Methods [hide private]
 
__init__(...)
Raises an exception This class cannot be instantiated from Python
 
__str__(...)
__str__( (ResourceManager)arg1) -> object :
 
clear(...)
clear( (ResourceManager)arg1) -> None : wipe out all data; useful for unit testing, but hard to fathom how it would be useful otherwise.
 
find_resource(...)
find_resource( (ResourceManager)arg1, (str)resource_tag) -> object : Get a resource with a given name.
 
get_option(...)
get_option( (ResourceManager)arg1, (object)key) -> bool : The following 12 functions allow protocols to request options that may have been set for the context in which the protocol is being run.
 
get_resource(...)
get_resource( (ResourceManager)arg1, (str)resource_description) -> object : Returns the resource with the given resource_description.
 
has_option(...)
has_option( (ResourceManager)arg1, (object)key) -> bool : The following 12 functions allow protocols to request if a particular option has been set (e.g.
 
has_resource(...)
has_resource( (ResourceManager)arg1, (str)resource_tag) -> bool : Does a resource with a given name exist?
 
has_resource_with_description(...)
has_resource_with_description( (ResourceManager)arg1, (str)resource_description) -> bool : A protocol may ask whether a resource with a given resource description has been provided.
 
show(...)
show( (ResourceManager)arg1, (OStream)out) -> None : basic/resource_manager/ResourceManager.hh:125

Inherited from SingletonBase_T_basic_resource_manager_ResourceManager_T: __reduce__

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Static Methods [hide private]

Inherited from SingletonBase_T_basic_resource_manager_ResourceManager_T: get_instance

Class Variables [hide private]

Inherited from SingletonBase_T_basic_resource_manager_ResourceManager_T: __instance_size__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

Raises an exception This class cannot be instantiated from Python

Overrides: object.__init__

__str__(...)
(Informal representation operator)

 

__str__( (ResourceManager)arg1) -> object :

    C++ signature :
        _object* __str__(basic::resource_manager::ResourceManager {lvalue})

Overrides: object.__str__

clear(...)

 

clear( (ResourceManager)arg1) -> None :
    wipe out all data; useful for unit testing, but hard to
    fathom how it would be useful otherwise.
    

    C++ signature :
        void clear(basic::resource_manager::ResourceManager {lvalue})

find_resource(...)

 

find_resource( (ResourceManager)arg1, (str)resource_tag) -> object :
    Get a resource with a given name.
    

    C++ signature :
        boost::shared_ptr<utility::pointer::ReferenceCount> find_resource(basic::resource_manager::ResourceManager {lvalue},std::string)

get_option(...)

 

get_option( (ResourceManager)arg1, (object)key) -> bool :
    The following 12 functions allow protocols to request options that
    may have been set for the context in which the protocol is being run.
    Retrieve the boolean value represented by the given option key
    

    C++ signature :
        bool get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::BooleanOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::BooleanOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> vector1_bool :
    Retrieve the vector of boolean values represented by the given option key
    

    C++ signature :
        utility::vector1<bool, std::allocator<bool> > get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::BooleanVectorOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::BooleanVectorOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> FileName :
    Retrieve the FileName value represented by the given option key
    

    C++ signature :
        utility::file::FileName get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::FileOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::FileOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> object :
    Retrieve the vector of FileName values represented by the given option key
    

    C++ signature :
        utility::vector1<utility::file::FileName, std::allocator<utility::file::FileName> > get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::FileVectorOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::FileVectorOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> int :
    Retrieve the integer value represented by the given option key
    

    C++ signature :
        int get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::IntegerOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::IntegerOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> vector1_int :
    Retrieve the vector of integer values represented by the given option key
    

    C++ signature :
        utility::vector1<int, std::allocator<int> > get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::IntegerVectorOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::IntegerVectorOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> PathName :
    Retrieve the PathName value represented by the given option key
    

    C++ signature :
        utility::file::PathName get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::PathOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::PathOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> object :
    Retrieve the vector of PathName values represented by the given option key
    

    C++ signature :
        utility::vector1<utility::file::PathName, std::allocator<utility::file::PathName> > get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::PathVectorOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::PathVectorOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> float :
    Retrieve the Real value represented by the given option key
    

    C++ signature :
        double get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::RealOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::RealOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> vector1_Real :
    Retrieve the vector of Real values represented by the given option key
    

    C++ signature :
        utility::vector1<double, std::allocator<double> > get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::RealVectorOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::RealVectorOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> str :
    Retrieve the string value represented by the given option key
    

    C++ signature :
        std::string get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::StringOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::StringOptionKey)

get_option( (ResourceManager)arg1, (object)key) -> vector1_string :
    Retrieve the vector of string values represented by the given option key
    

    C++ signature :
        utility::vector1<std::string, std::allocator<std::string> > get_option(basic::resource_manager::ResourceManager {lvalue},utility::options::StringVectorOptionKey)

get_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void get_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::StringVectorOptionKey)

get_resource(...)

 

get_resource( (ResourceManager)arg1, (str)resource_description) -> object :
    Returns the resource with the given resource_description.
    

    C++ signature :
        boost::shared_ptr<utility::pointer::ReferenceCount> get_resource(basic::resource_manager::ResourceManager {lvalue},std::string)

get_resource( (ResourceManager)arg1, (str)arg2) -> None :

    C++ signature :
        void get_resource(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},std::string)

has_option(...)

 

has_option( (ResourceManager)arg1, (object)key) -> bool :
    The following 12 functions allow protocols to request if a particular
    option has been set (e.g. on the command line or for the current job).
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::BooleanOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::BooleanOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::BooleanVectorOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::BooleanVectorOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::FileOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::FileOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::FileVectorOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::FileVectorOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::IntegerOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::IntegerOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::IntegerVectorOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::IntegerVectorOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::PathOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::PathOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::PathVectorOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::PathVectorOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::RealOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::RealOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::RealVectorOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::RealVectorOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::StringOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::StringOptionKey)

has_option( (ResourceManager)arg1, (object)key) -> bool :
    Return whether or not a value has been provided for the given option key either
    on the command line or through for the current job.
    

    C++ signature :
        bool has_option(basic::resource_manager::ResourceManager {lvalue},utility::options::StringVectorOptionKey)

has_option( (ResourceManager)arg1, (object)arg2) -> None :

    C++ signature :
        void has_option(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},utility::options::StringVectorOptionKey)

has_resource(...)

 

has_resource( (ResourceManager)arg1, (str)resource_tag) -> bool :
    Does a resource with a given name exist?
    

    C++ signature :
        bool has_resource(basic::resource_manager::ResourceManager {lvalue},std::string)

has_resource_with_description(...)

 

has_resource_with_description( (ResourceManager)arg1, (str)resource_description) -> bool :
    A protocol may ask whether a resource with a given resource description
    has been provided.  It is possible that some resources are available sometimes
    when running a protocol, but not always (e.g. when running abinitio, sometimes
    you don't know what the native structure is).
    

    C++ signature :
        bool has_resource_with_description(basic::resource_manager::ResourceManager {lvalue},std::string)

has_resource_with_description( (ResourceManager)arg1, (str)arg2) -> None :

    C++ signature :
        void has_resource_with_description(boost::shared_ptr<basic::resource_manager::ResourceManager> {lvalue},std::string)

show(...)

 

show( (ResourceManager)arg1, (OStream)out) -> None :
    basic/resource_manager/ResourceManager.hh:125

    C++ signature :
        void show(basic::resource_manager::ResourceManager {lvalue},std::ostream {lvalue})