SheafSystem  0.0.0.0
sheaf::record_queue Class Reference

A queue for record read requests. More...

#include <record_queue.h>

Inheritance diagram for sheaf::record_queue:
sheaf::any

RECORD_QUEUE FACET

 record_queue ()
 Default constructor. More...
 
 record_queue (const record_queue &xother)
 Copy constructor. More...
 
virtual ~record_queue ()
 Destructor. More...
 
void enqueue (pod_index_type xindex)
 Inserts xindex at the end of the record queue. More...
 
pod_index_type dequeue ()
 Removes and returns the index at the front of the record queue. More...
 
int ct () const
 The number of requests in the record queue. More...
 
bool is_empty () const
 True if the record queue is empty. More...
 
void clear ()
 Makes the record queue empty. More...
 

ANY FACET

virtual record_queueclone () const
 Virtual constructor; makes a new instance of the same type as this. More...
 
virtual bool invariant () const
 Class invariant. More...
 
virtual bool is_ancestor_of (const any *other) const
 Conformance test; true if other conforms to this. More...
 

Additional Inherited Members

- Public Member Functions inherited from sheaf::any
bool is_same_type (const any *other) const
 True if other is the same type as this. More...
 
virtual ~any ()
 Destructor. More...
 
bool invariant_check () const
 True if invariant checking is enabled. More...
 
void enable_invariant_check () const
 Enable invariant checking. More...
 
void disable_invariant_check () const
 Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More...
 
int disable_invariance_check_request_depth () const
 Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Detailed Description

A queue for record read requests.

Todo:
replace this representation with something more sophisticated that supports hyperslices.

Definition at line 50 of file record_queue.h.

Constructor & Destructor Documentation

◆ record_queue() [1/2]

sheaf::record_queue::record_queue ( )

Default constructor.

Postcondition

Definition at line 32 of file record_queue.cc.

References invariant(), and is_empty().

Referenced by clone().

◆ record_queue() [2/2]

sheaf::record_queue::record_queue ( const record_queue xother)

Copy constructor.

Not Implemented.

Postcondition

Definition at line 49 of file record_queue.cc.

References invariant(), and ~record_queue().

◆ ~record_queue()

sheaf::record_queue::~record_queue ( )
virtual

Destructor.

Definition at line 63 of file record_queue.cc.

References enqueue().

Referenced by record_queue().

Member Function Documentation

◆ clear()

void sheaf::record_queue::clear ( )

Makes the record queue empty.

Postcondition

Definition at line 142 of file record_queue.cc.

References clone(), dequeue(), and is_empty().

Referenced by is_empty().

◆ clone()

sheaf::record_queue * sheaf::record_queue::clone ( ) const
virtual

Virtual constructor; makes a new instance of the same type as this.

Postcondition
  • result != 0
  • is_same_type(result)

Reimplemented from sheaf::any.

Definition at line 173 of file record_queue.cc.

References invariant(), sheaf::any::is_same_type(), and record_queue().

Referenced by clear().

◆ ct()

int sheaf::record_queue::ct ( ) const

The number of requests in the record queue.

Definition at line 128 of file record_queue.cc.

References is_empty().

Referenced by dequeue(), and enqueue().

◆ dequeue()

sheaf::pod_index_type sheaf::record_queue::dequeue ( )

Removes and returns the index at the front of the record queue.

Precondition
  • !is_empty()
Postcondition
Todo:
make above assertion executable

Definition at line 105 of file record_queue.cc.

References ct(), and is_empty().

Referenced by clear(), enqueue(), sheaf::dof_tuple_record_set::externalize(), and sheaf::dof_tuple_record_set::read_records().

◆ enqueue()

void sheaf::record_queue::enqueue ( pod_index_type  xindex)

Inserts xindex at the end of the record queue.

Todo:
replace this representation with something more sophisticated that supports hyperslices
Postcondition
  • !is_empty()

Definition at line 80 of file record_queue.cc.

References ct(), dequeue(), and is_empty().

Referenced by sheaf::member_record::externalize(), sheaf::member_record::internalize(), and ~record_queue().

◆ invariant()

bool sheaf::record_queue::invariant ( ) const
virtual

◆ is_ancestor_of()

bool sheaf::record_queue::is_ancestor_of ( const any other) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::any.

Definition at line 227 of file record_queue.cc.

Referenced by invariant().

◆ is_empty()

bool sheaf::record_queue::is_empty ( ) const

True if the record queue is empty.

Definition at line 135 of file record_queue.cc.

References clear().

Referenced by clear(), ct(), dequeue(), enqueue(), sheaf::dof_tuple_record_set::externalize(), sheaf::dof_tuple_record_set::read_records(), and record_queue().


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