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

#include <Use.h>

Public Member Functions

 Use (Object::Consumer *use)
 
 ~Use ()
 
Objectvalue (void) const
 
void value (Object *value)
 
Object::Consumer * consumer (void) const
 

Detailed Description

Definition at line 25 of file Use.h.

Constructor & Destructor Documentation

◆ Use()

coco::Use::Use ( Object::Consumer *  use)
inline

Definition at line 28 of file Use.h.

28 : _value{nullptr}, _consumer{use}
29 {
30 // DO NOTHING
31 }

◆ ~Use()

coco::Use::~Use ( )
inline

Definition at line 34 of file Use.h.

34{ value(nullptr); }
Object * value(void) const
Definition Use.h:37

References value().

Member Function Documentation

◆ consumer()

Object::Consumer * coco::Use::consumer ( void  ) const
inline

Definition at line 43 of file Use.h.

43{ return _consumer; }

◆ value() [1/2]

void coco::Use::value ( Object value)

Definition at line 24 of file Use.cpp.

25{
26 if (_value)
27 {
28 _value->mutable_uses()->erase(this);
29 _value = nullptr;
30 }
31
32 assert(_value == nullptr);
33
34 if (value)
35 {
36 _value = value;
37 _value->mutable_uses()->insert(this);
38 }
39
40 assert(_value == value);
41}

References value().

◆ value() [2/2]


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