Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
core::import_pose::PoseResource Class Reference

#include <PoseResource.hh>

Inheritance diagram for core::import_pose::PoseResource:
Inheritance graph
[legend]

Public Member Functions

 PoseResource (core::pose::PoseCOP pose)
 
 ~PoseResource () override
 
void pose (core::pose::PoseCOP pose_to_hold)
 
core::pose::PoseOP pose_deep_copy () const
 The primary way of getting a Pose from a PoseResource: to request a deep copy of the Pose that it is holding. This ensures that the Pose is safely copied to prevent thread-unsafe modification of its internal data. More...
 

Private Attributes

core::pose::PoseCOP pose_
 

Constructor & Destructor Documentation

core::import_pose::PoseResource::PoseResource ( core::pose::PoseCOP  pose)
core::import_pose::PoseResource::~PoseResource ( )
overridedefault

Member Function Documentation

void core::import_pose::PoseResource::pose ( core::pose::PoseCOP  pose_to_hold)

References pose_.

core::pose::PoseOP core::import_pose::PoseResource::pose_deep_copy ( ) const

The primary way of getting a Pose from a PoseResource: to request a deep copy of the Pose that it is holding. This ensures that the Pose is safely copied to prevent thread-unsafe modification of its internal data.

Pose's operator= is not threadsafe in that Poses maintain pointers to each other to silently communicate between themselves when one of them is modified, and these connections are established during an operator= call. The alternative is to call Pose::detached_copy( Pose const & source ) which this function does. No thread-unsafe connections are established between Poses copied with the detached_copy call.

Note that every call to this function creates a new Pose, and so there might end up with many copies of the Pose in memory. Use the protocols::moves::PoseFromPoseResourceMover to load a single Pose from the ResourceManager into the DataMap during its initialization. Then subsequent movers can read that Pose from the DataMap during their initialization.

References pose_.

Member Data Documentation

core::pose::PoseCOP core::import_pose::PoseResource::pose_
private

Referenced by pose(), and pose_deep_copy().


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