-#ifndef __COCO_IR_READ_H__
-#define __COCO_IR_READ_H__
-
-#include "coco/IR/ReadHook.h"
-
-#include <cassert>
+#ifndef __COCO_IR_READ_FORWARD_H__
+#define __COCO_IR_READ_FORWARD_H__
namespace coco
{
-/**
- * @brief A Read represents an edge between a Bag and its Reader
- */
-class Read final
-{
-public:
- Read(const PtrLink<Bag, BagInfo> *bag_link, Bag::Reader *read)
- : _hook{bag_link, read}, _bag{nullptr}
- {
- // DO NOTHING
- }
-
-public:
- Bag *bag(void) const { return _bag; }
-
-public:
- void bag(Bag *bag)
- {
- if (_bag)
- {
- _hook.onRelease(_bag);
- _bag = nullptr;
- }
-
- assert(_bag == nullptr);
-
- if (bag)
- {
- _bag = bag;
- _hook.onTake(_bag);
- }
-
- assert(_bag == bag);
- }
-
-private:
- ReadHook _hook;
- Bag *_bag;
-};
+class Read;
} // namespace coco
-#endif // __COCO_IR_READ_H__
+#endif // __COCO_IR_READ_FORWARD_H__