CYCLUS
Public Member Functions | List of all members
cyclus::ResTracker Class Reference

Detailed Description

Tracks and records the state and parent-child relationships of resources as they are changed.

Resource implementations embed this as a member variable and invoke its methods appropriately to have their state changes tracked in the canonical core resource table.

Invocations to Create, Extract, Absorb, and Modify result in one or more entries in the output db Resource table and also call the Record method of the tracker's tracked resource. A zero parent id indicates a resource id has no parent; if both are zeros the resource was newly created.

Definition at line 22 of file res_tracker.h.

#include <res_tracker.h>

Public Member Functions

void Absorb (ResTracker *absorbed)
 
void Create (Agent *creator)
 
void DontTrack ()
 
void Extract (ResTracker *removed)
 
void Modify ()
 
 ResTracker (Context *ctx, Resource *r)
 

Constructor & Destructor Documentation

cyclus::ResTracker::ResTracker ( Context ctx,
Resource r 
)

Create a new tracker following r.

Definition at line 7 of file res_tracker.cc.

Member Function Documentation

void cyclus::ResTracker::Absorb ( ResTracker absorbed)

Should be called when a resource is combined with another.

Parameters
absorbedthe tracker of the resource being absorbed.

Definition at line 57 of file res_tracker.cc.

void cyclus::ResTracker::Create ( Agent creator)

Should be called when a resource instance is newly created.

Definition at line 18 of file res_tracker.cc.

void cyclus::ResTracker::DontTrack ( )

Prevent a resource's heritage from being tracked and recorded.

Definition at line 14 of file res_tracker.cc.

void cyclus::ResTracker::Extract ( ResTracker removed)

Should be called when a resource has some quantity removed from it (e.g.

resource is split).

Parameters
removedthe tracker of the extracted/removed resource.

Definition at line 42 of file res_tracker.cc.

void cyclus::ResTracker::Modify ( )

Should be called when the state of a resource changes (e.g.

radioactive decay).

Definition at line 32 of file res_tracker.cc.


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