Rosetta
Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | List of all members
protocols::constraint_generator::ConstraintsManager Class Reference

Manages lists of constraints generated by ConstraintGenerators. More...

#include <ConstraintsManager.hh>

Inheritance diagram for protocols::constraint_generator::ConstraintsManager:
Inheritance graph
[legend]

Public Member Functions

 ConstraintsManager ()
 
virtual ~ConstraintsManager ()
 
void store_constraints (core::pose::Pose &pose, std::string const &name, ConstraintCOPs const &csts) const
 Stores the given constraints in the pose datacache, under the name given. More...
 
ConstraintCOPs const & retrieve_constraints (core::pose::Pose const &pose, std::string const &name) const
 Retrieves constraints from the pose datacache with the given name. More...
 
bool has_stored_constraints (core::pose::Pose const &pose, std::string const &name) const
 Checks to see whether constraints exist in datacache under the given name. More...
 
void remove_constraints (core::pose::Pose &pose, std::string const &name) const
 Clears constraints stored under the given name. More...
 

Static Public Attributes

static core::pose::datacache::CacheableDataType::Enum const MY_TYPE = core::pose::datacache::CacheableDataType::CONSTRAINT_GENERATOR
 

Private Types

typedef core::scoring::constraints::ConstraintCOPs ConstraintCOPs
 

Private Member Functions

ConstraintsMapretrieve_constraints_map (core::pose::Pose &pose) const
 non-const access to cached map More...
 
ConstraintsMap const & retrieve_constraints_map (core::pose::Pose const &pose) const
 const access to cached map More...
 
void store_empty_constraints_map (core::pose::Pose &pose) const
 adds an empty constraints map to the pose datacache More...
 

Detailed Description

Manages lists of constraints generated by ConstraintGenerators.

Member Typedef Documentation

◆ ConstraintCOPs

Constructor & Destructor Documentation

◆ ConstraintsManager()

protocols::constraint_generator::ConstraintsManager::ConstraintsManager ( )

◆ ~ConstraintsManager()

protocols::constraint_generator::ConstraintsManager::~ConstraintsManager ( )
virtualdefault

Member Function Documentation

◆ has_stored_constraints()

bool protocols::constraint_generator::ConstraintsManager::has_stored_constraints ( core::pose::Pose const &  pose,
std::string const &  name 
) const

Checks to see whether constraints exist in datacache under the given name.

Parameters
[in]posePose where constraints are cached
[in]nameName under which constraints may be stored

References core::pose::Pose::data(), protocols::constraint_generator::ConstraintsMap::end(), protocols::constraint_generator::ConstraintsMap::find(), MY_TYPE, and retrieve_constraints_map().

◆ remove_constraints()

void protocols::constraint_generator::ConstraintsManager::remove_constraints ( core::pose::Pose pose,
std::string const &  name 
) const

Clears constraints stored under the given name.

If constraints are not found under the given name, or there is no cached data, this will do nothing.

Parameters
[in,out]posePose where constraints are cached
[in]nameName under which constraints are cached

References core::pose::Pose::data(), protocols::constraint_generator::ConstraintsMap::end(), protocols::constraint_generator::ConstraintsMap::erase(), protocols::constraint_generator::ConstraintsMap::find(), MY_TYPE, and retrieve_constraints_map().

Referenced by protocols::constraint_generator::RemoveConstraints::apply().

◆ retrieve_constraints()

ConstraintsManager::ConstraintCOPs const & protocols::constraint_generator::ConstraintsManager::retrieve_constraints ( core::pose::Pose const &  pose,
std::string const &  name 
) const

Retrieves constraints from the pose datacache with the given name.

Parameters
[in]posePose where constraints are cached
[in]nameName under which constraints are stored
Returns
Const reference to list of stored constraints

References protocols::constraint_generator::ConstraintsMap::end(), protocols::constraint_generator::ConstraintsMap::find(), retrieve_constraints_map(), and protocols::constraint_generator::ConstraintsMap::valid_names_string().

Referenced by protocols::constraint_generator::RemoveConstraints::apply().

◆ retrieve_constraints_map() [1/2]

ConstraintsMap & protocols::constraint_generator::ConstraintsManager::retrieve_constraints_map ( core::pose::Pose pose) const
private

non-const access to cached map

Given a nonconst pose, returns a nonconst reference to its constraints map.

References core::pose::Pose::data(), MY_TYPE, and store_empty_constraints_map().

Referenced by has_stored_constraints(), remove_constraints(), retrieve_constraints(), and store_constraints().

◆ retrieve_constraints_map() [2/2]

ConstraintsMap const & protocols::constraint_generator::ConstraintsManager::retrieve_constraints_map ( core::pose::Pose const &  pose) const
private

const access to cached map

Given a const pose, returns a const reference to its constraints map, throwing error if no constaints map is present.

References core::pose::Pose::data(), and MY_TYPE.

◆ store_constraints()

void protocols::constraint_generator::ConstraintsManager::store_constraints ( core::pose::Pose pose,
std::string const &  name,
ConstraintCOPs const &  csts 
) const

Stores the given constraints in the pose datacache, under the name given.

Parameters
[in,out]posePose where constraints will be cached
[in]nameName under which constraints will be stored
[in]cstsConstraints to cache

References protocols::constraint_generator::ConstraintsMap::end(), protocols::constraint_generator::ConstraintsMap::find(), protocols::constraint_generator::ConstraintsMap::insert(), retrieve_constraints_map(), and protocols::constraint_generator::TR().

◆ store_empty_constraints_map()

void protocols::constraint_generator::ConstraintsManager::store_empty_constraints_map ( core::pose::Pose pose) const
private

adds an empty constraints map to the pose datacache

References core::pose::Pose::data(), and MY_TYPE.

Referenced by retrieve_constraints_map().

Member Data Documentation

◆ MY_TYPE

core::pose::datacache::CacheableDataType::Enum const protocols::constraint_generator::ConstraintsManager::MY_TYPE = core::pose::datacache::CacheableDataType::CONSTRAINT_GENERATOR
static

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