ONE - On-device Neural Engine
Loading...
Searching...
No Matches
coco::Read Class Referencefinal

A Read represents an edge between a Bag and its Reader. More...

#include <Read.h>

Public Member Functions

 Read (Bag::Reader *r)
 
 ~Read ()
 
Bagbag (void) const
 
void bag (Bag *bag)
 
Bag::Readerreader (void) const
 
void reader (Bag::Reader *r)
 

Detailed Description

A Read represents an edge between a Bag and its Reader.

Definition at line 28 of file Read.h.

Constructor & Destructor Documentation

◆ Read()

coco::Read::Read ( Bag::Reader r)
inline

Definition at line 31 of file Read.h.

32 {
33 // Initialize link and reader
34 reader(r);
35 }
Bag::Reader * reader(void) const
Definition Read.h:45

References reader().

◆ ~Read()

coco::Read::~Read ( )

Definition at line 24 of file Read.cpp.

25{
26 // Unlink self from Bag if there is a linked bag
27 bag(nullptr);
28}
Bag * bag(void) const
Definition Read.h:41

References bag().

Member Function Documentation

◆ bag() [1/2]

void coco::Read::bag ( Bag bag)

Definition at line 30 of file Read.cpp.

31{
32 if (_bag)
33 {
34 _bag->mutable_reads()->erase(this);
35 _bag = nullptr;
36 }
37
38 assert(_bag == nullptr);
39
40 if (bag)
41 {
42 _bag = bag;
43 _bag->mutable_reads()->insert(this);
44 }
45
46 assert(_bag == bag);
47}

References bag(), and bag().

Referenced by bag().

◆ bag() [2/2]

Bag * coco::Read::bag ( void  ) const
inline

Definition at line 41 of file Read.h.

41{ return _bag; }

Referenced by bag(), coco::Shuffle::from(), coco::Shuffle::from(), and ~Read().

◆ reader() [1/2]

void coco::Read::reader ( Bag::Reader r)
inline

Definition at line 46 of file Read.h.

46{ _reader = r; }

◆ reader() [2/2]

Bag::Reader * coco::Read::reader ( void  ) const
inline

Definition at line 45 of file Read.h.

45{ return _reader; }

Referenced by Read().


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