Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::jd3::JobDirectedNode Class Reference

A node to use in JobDigraphs that holds information about how much work has completed for the set of jobs that it represents. More...

#include <JobDigraph.hh>

Inheritance diagram for protocols::jd3::JobDirectedNode:
Inheritance graph
[legend]

Public Types

typedef
utility::graph::DirectedNode 
parent
 

Public Member Functions

 ~JobDirectedNode () override
 virtual destructor More...
 
 JobDirectedNode (utility::graph::Digraph *, platform::Size node_id)
 Main constructor, no default constructor nor copy constructor. More...
 
void copy_from (DirectedNode const *source) override
 decrement the n-incomplete-predecessors count by one More...
 
void add_incoming_edge (utility::graph::DirectedEdge *edge_ptr, DirectedEdgeListIter &) override
 
void set_node_label (std::string const &node_label)
 Set the primary node type label. More...
 
void all_jobs_completed (bool setting)
 
void all_jobs_started (bool setting)
 
std::string get_node_label () const
 Get this Node's primary type. More...
 
bool all_jobs_completed () const
 
bool all_jobs_started () const
 
core::Size n_predecessors_w_outstanding_jobs () const
 
platform::Size count_static_memory () const override
 memory accounting scheme More...
 
platform::Size count_dynamic_memory () const override
 memory accounting scheme More...
 

Protected Member Functions

JobDigraphget_job_owner () const
 derived class access to the owner More...
 

Private Member Functions

 JobDirectedNode ()
 
 JobDirectedNode (JobDirectedNode const &)
 
JobDirectedNodeoperator= (JobDirectedNode &)
 

Private Attributes

bool all_jobs_completed_
 
bool all_jobs_started_
 
std::string node_label_
 
core::Size n_predecessors_w_outstanding_jobs_
 

Detailed Description

A node to use in JobDigraphs that holds information about how much work has completed for the set of jobs that it represents.

Member Typedef Documentation

typedef utility::graph::DirectedNode protocols::jd3::JobDirectedNode::parent

Constructor & Destructor Documentation

protocols::jd3::JobDirectedNode::~JobDirectedNode ( )
overridedefault

virtual destructor

protocols::jd3::JobDirectedNode::JobDirectedNode ( utility::graph::Digraph *  owner,
platform::Size  node_id 
)

Main constructor, no default constructor nor copy constructor.

protocols::jd3::JobDirectedNode::JobDirectedNode ( )
private

Referenced by count_static_memory().

protocols::jd3::JobDirectedNode::JobDirectedNode ( JobDirectedNode const &  )
private

Member Function Documentation

void protocols::jd3::JobDirectedNode::add_incoming_edge ( utility::graph::DirectedEdge *  edge_ptr,
DirectedEdgeListIter &  new_iterator 
)
override
void protocols::jd3::JobDirectedNode::all_jobs_completed ( bool  setting)

Declaring that a Job node has completed, the Node visits all of its downstream neighbors (i.e. all neighbors connected by a directed edge originating on this node), decrementing their n_predecessors_w_outstanding_jobs counters.

References all_jobs_completed_.

Referenced by protocols::jd3::job_distributors::JobExtractor::mark_node_as_complete().

bool protocols::jd3::JobDirectedNode::all_jobs_completed ( ) const

References all_jobs_completed_.

Referenced by add_incoming_edge().

void protocols::jd3::JobDirectedNode::all_jobs_started ( bool  setting)

References all_jobs_started_.

bool protocols::jd3::JobDirectedNode::all_jobs_started ( ) const

References all_jobs_started_.

void protocols::jd3::JobDirectedNode::copy_from ( DirectedNode const *  source)
override

decrement the n-incomplete-predecessors count by one

copy-from for use in JobDigraph::operator= and copy ctors; derived classes must define their own version of this function

invoked during graph assignment operators to copy any node data from one graph to another graph. The source node must be the same type as this node.

References all_jobs_completed_, and all_jobs_started_.

platform::Size protocols::jd3::JobDirectedNode::count_dynamic_memory ( ) const
override

memory accounting scheme

recursively descend through heirarchy accounting for heap memory usage. Each derived class in the heirarchy should recursively add the amount of dynamic memory its parent allocates by calling parent::count_dynamic_memory

platform::Size protocols::jd3::JobDirectedNode::count_static_memory ( ) const
override

memory accounting scheme

called on most-derived class. The most-derived class should NOT recursively call this method on its parent class. The sizeof function will handle the whole JobDirectedNode (or DerivedJobDirectedNode).

References JobDirectedNode().

JobDigraph * protocols::jd3::JobDirectedNode::get_job_owner ( ) const
inlineprotected

derived class access to the owner

Referenced by add_incoming_edge().

std::string protocols::jd3::JobDirectedNode::get_node_label ( ) const

Get this Node's primary type.

Can be used to create the Job for this Job Node. Ex. Linear set of 2 stages per input structure, we would use 2 node labels to construct Jobs for each input based on a common job.

References node_label_.

core::Size protocols::jd3::JobDirectedNode::n_predecessors_w_outstanding_jobs ( ) const
JobDirectedNode& protocols::jd3::JobDirectedNode::operator= ( JobDirectedNode )
private
void protocols::jd3::JobDirectedNode::set_node_label ( std::string const &  node_label)

Set the primary node type label.

Can be used to create the Job for this Job Node. Ex. Linear set of 2 stages per input structure, we would use 2 node labels to construct Jobs for each input based on a common job.

References node_label_.

Member Data Documentation

bool protocols::jd3::JobDirectedNode::all_jobs_completed_
private

Referenced by all_jobs_completed(), and copy_from().

bool protocols::jd3::JobDirectedNode::all_jobs_started_
private

Referenced by all_jobs_started(), and copy_from().

core::Size protocols::jd3::JobDirectedNode::n_predecessors_w_outstanding_jobs_
private
std::string protocols::jd3::JobDirectedNode::node_label_
private

Referenced by get_node_label(), and set_node_label().


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