MineLink
 All Data Structures Functions Variables Pages
delphos::DoNotMineBeforeConstraint Class Reference

A constraint limiting the period at which a block should be mined. More...

#include <filtering.h>

Inheritance diagram for delphos::DoNotMineBeforeConstraint:
Inheritance graph
Collaboration diagram for delphos::DoNotMineBeforeConstraint:
Collaboration graph

Public Member Functions

 DoNotMineBeforeConstraint (const string &name, const unsigned int &period, delphos::BlockSelection *bs)
 Creates a constraints limiting the period at which a block should be mined. More...
 
virtual bool Check (const delphos::Schedule &sch) const
 checks if the constraint is satisfied by the schedule. More...
 
virtual bool Check (const delphos::FractionalSchedule &sch) const
 checks if the given fractional schedule satisfies the constraint. More...
 
- Public Member Functions inherited from delphos::BlockTimingConstraint
 BlockTimingConstraint (const string &name, const unsigned int &period, delphos::BlockModel &bm)
 Creates a constraint limiting the period . More...
 
 BlockTimingConstraint (const string &name, const unsigned int &period, delphos::BlockSelection *bs)
 Creates a constraint limiting the period . More...
 
- Public Member Functions inherited from delphos::BlockConstraint
 BlockConstraint (const string &name, delphos::BlockModel &bm)
 Creates a new block selection constraint. More...
 
 BlockConstraint (const string &name, delphos::BlockSelection *bs)
 Creates a new block selection constraint. More...
 
delphos::BlockSelectionGetBlockSelection () const
 Returns the selection of blocks being constrained.
 
virtual ~BlockConstraint ()
 Destroys a block constraint.
 
- Public Member Functions inherited from delphos::Constraint
 Constraint (const string &name)
 Creates a constraint with given name. More...
 
virtual ~Constraint ()
 Destructor. More...
 
virtual string ToXML (const unsigned int identation_level=0) const
 A XML string describing the constraint. More...
 
const char * TypeName () const
 a char string used a identifier in the XML representation of the constraint.
 
- Public Member Functions inherited from delphos::TimedConstraint
 TimedConstraint (const string &name, const unsigned int &period)
 Creates a new timed constraint. More...
 
virtual ~TimedConstraint ()
 destroys a timed constraint.
 
const unsigned int GetPeriod () const
 Returns the time-period that the constraint applies at. More...
 

Detailed Description

A constraint limiting the period at which a block should be mined.

Constructor & Destructor Documentation

delphos::DoNotMineBeforeConstraint::DoNotMineBeforeConstraint ( const string &  name,
const unsigned int &  period,
delphos::BlockSelection bs 
)

Creates a constraints limiting the period at which a block should be mined.

Parameters
nameThe name of the constraint.
periodThe block cannot be mined before this period.
bsThe selection of blocks to be constrained.

This constraint establishes that the block will be mined at the given period or later, but not before.

Member Function Documentation

bool delphos::DoNotMineBeforeConstraint::Check ( const delphos::Schedule sch) const
virtual

checks if the constraint is satisfied by the schedule.

Parameters
schThe schedule to be checked.

Checks if the constraint is satisfied by the schedule.

Reimplemented from delphos::Constraint.

bool delphos::DoNotMineBeforeConstraint::Check ( const delphos::FractionalSchedule sch) const
virtual

checks if the given fractional schedule satisfies the constraint.

Parameters
fschThe fractional schedule to be checked.

This method checks if the given schedule satisfies the constraint (returning true) or not (return false).

Reimplemented from delphos::Constraint.


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