The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::ScheduleableHandle Class Reference

A light-weight reference counting handle for Scheduleables – DOES NOT delete. More...

#include <Scheduleable.hpp>

Public Member Functions

 ScheduleableHandle ()=default
 Create an empty Handle.
 
 ScheduleableHandle (ScheduleableHandle &&)=default
 
 ScheduleableHandle (const ScheduleableHandle &orig)
 Copy a Handle, increment the count.
 
 ScheduleableHandle (Scheduleable *scheduleable)
 Create a ScheduleableHandle with a given Scheduleable pointer. NO reference counting is performed with this constructor.
 
 ScheduleableHandle (Scheduleable &scheduleable)
 Create a ScheduleableHandle with a given Scheduleable reference. NO reference counting is performed with this constructor.
 
 ~ScheduleableHandle ()
 
Scheduleableoperator-> () const
 Get at the underlying Scheduleable.
 
bool operator== (const ScheduleableHandle &rhs) const
 
bool operator!= (const ScheduleableHandle &rhs) const
 
ScheduleableHandleoperator= (const ScheduleableHandle &rhs)
 Assignment.
 

Detailed Description

A light-weight reference counting handle for Scheduleables – DOES NOT delete.

Mostly used by PayloadEvent and Audience, this class allows a user to pass a Scheduleable pointer to another object without that object being concerned about ownership.

Note
This class DOES NOT handle memory management, i.e. it will not delete any Scheduleable type that it points to – it will simply tell the object to reclaim itself.

Definition at line 529 of file Scheduleable.hpp.

Constructor & Destructor Documentation

◆ ScheduleableHandle() [1/3]

sparta::ScheduleableHandle::ScheduleableHandle ( const ScheduleableHandle orig)
inline

Copy a Handle, increment the count.

Definition at line 554 of file Scheduleable.hpp.

◆ ScheduleableHandle() [2/3]

sparta::ScheduleableHandle::ScheduleableHandle ( Scheduleable scheduleable)
inline

Create a ScheduleableHandle with a given Scheduleable pointer. NO reference counting is performed with this constructor.

Parameters
scheduleablePointer to the scheduleable to handle

Definition at line 567 of file Scheduleable.hpp.

◆ ScheduleableHandle() [3/3]

sparta::ScheduleableHandle::ScheduleableHandle ( Scheduleable scheduleable)
inline

Create a ScheduleableHandle with a given Scheduleable reference. NO reference counting is performed with this constructor.

Parameters
scheduleablePointer to the scheduleable to handle

Definition at line 579 of file Scheduleable.hpp.

◆ ~ScheduleableHandle()

sparta::ScheduleableHandle::~ScheduleableHandle ( )
inline

Reclaim the Scheduleable if nothing is pointing to it anymore. If the Scheduleable was created an alloc'ed Scheduleable, it will be deleted; otherwise, it will be reclaimed (as in PayloadEvent)

Definition at line 589 of file Scheduleable.hpp.

Member Function Documentation

◆ operator!=()

bool sparta::ScheduleableHandle::operator!= ( const ScheduleableHandle rhs) const
inline

Is this ScheduleableHandle not equivalent to another (used by Audience)

Definition at line 607 of file Scheduleable.hpp.

◆ operator->()

Scheduleable * sparta::ScheduleableHandle::operator-> ( ) const
inline

Get at the underlying Scheduleable.

Definition at line 595 of file Scheduleable.hpp.

◆ operator=()

ScheduleableHandle & sparta::ScheduleableHandle::operator= ( const ScheduleableHandle rhs)
inline

Assignment.

Definition at line 612 of file Scheduleable.hpp.

◆ operator==()

bool sparta::ScheduleableHandle::operator== ( const ScheduleableHandle rhs) const
inline

Is this ScheduleableHandle equivalent to another (used by Audience)

Definition at line 601 of file Scheduleable.hpp.


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