Minsky
minsky::OperationPtr Class Reference

shared_ptr class for polymorphic operation objects. Note, you may assume that this pointer is always valid, although currently the implementation doesn't guarantee it (eg reset() is exposed). More...

#include <operationBase.h>

Inheritance diagram for minsky::OperationPtr:
Inheritance graph
Collaboration diagram for minsky::OperationPtr:
Collaboration graph

Public Types

typedef std::shared_ptr< OperationBasePtrBase
 

Public Member Functions

 OperationPtr (OperationType::Type type=OperationType::numOps)
 
 OperationPtr (OperationBase *op)
 
OperationPtr clone () const
 
std::size_t use_count () const
 
 OperationPtr (const PtrBase &x)
 
OperationPtroperator= (const PtrBase &x)
 
 OperationPtr (const ItemPtr &x)
 

Detailed Description

shared_ptr class for polymorphic operation objects. Note, you may assume that this pointer is always valid, although currently the implementation doesn't guarantee it (eg reset() is exposed).

Definition at line 114 of file operationBase.h.

Member Typedef Documentation

◆ PtrBase

typedef std::shared_ptr<OperationBase> minsky::OperationPtr::PtrBase

Definition at line 117 of file operationBase.h.

Constructor & Destructor Documentation

◆ OperationPtr() [1/4]

minsky::OperationPtr::OperationPtr ( OperationType::Type  type = OperationType::numOps)
inline

Definition at line 118 of file operationBase.h.

Referenced by clone().

118  :
std::shared_ptr< OperationBase > PtrBase
static OperationBase * create(Type type)
factory method.
Definition: operation.cc:545
Here is the caller graph for this function:

◆ OperationPtr() [2/4]

minsky::OperationPtr::OperationPtr ( OperationBase op)
inline

Definition at line 121 of file operationBase.h.

References minsky::op.

121 : PtrBase(op) {assert(op);}
std::shared_ptr< OperationBase > PtrBase

◆ OperationPtr() [3/4]

minsky::OperationPtr::OperationPtr ( const PtrBase x)
inline

Definition at line 124 of file operationBase.h.

124 : PtrBase(x) {}
std::shared_ptr< OperationBase > PtrBase

◆ OperationPtr() [4/4]

minsky::OperationPtr::OperationPtr ( const ItemPtr x)
inline

Definition at line 126 of file operationBase.h.

126  :
127  PtrBase(std::dynamic_pointer_cast<OperationBase>(x)) {}
std::shared_ptr< OperationBase > PtrBase

Member Function Documentation

◆ clone()

OperationPtr minsky::OperationPtr::clone ( ) const
inline

Definition at line 122 of file operationBase.h.

References clone(), and OperationPtr().

Referenced by clone().

122 {return OperationPtr(ItemPtr(get()->clone()));}
OperationPtr(OperationType::Type type=OperationType::numOps)
OperationPtr clone() const
std::shared_ptr< Item > ItemPtr
Definition: item.h:57
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

OperationPtr& minsky::OperationPtr::operator= ( const PtrBase x)
inline

Definition at line 125 of file operationBase.h.

125 {PtrBase::operator=(x); return *this;}

◆ use_count()

std::size_t minsky::OperationPtr::use_count ( ) const
inline

Definition at line 123 of file operationBase.h.

123 {return classdesc::shared_ptr<OperationBase>::use_count();}

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