Pointer wrapper to an object whose lifetime is tied to a story object.  
 More...
#include <story_ptr.h>
Inherits ink::runtime::internal::story_ptr_base.
|  | 
|  | story_ptr (T *ptr) | 
|  | pointer constructor. 
 | 
|  | 
|  | story_ptr (const story_ptr< T > &oth) | 
|  | copy constructor 
 | 
|  | 
| story_ptr< T > & | operator= (const story_ptr< T > &oth) | 
|  | copy assigment operator 
 | 
|  | 
| template<typename U > | 
| story_ptr< U > | cast () | 
|  | pointer cast while keeping ref count 
 | 
|  | 
| bool | operator== (const story_ptr< T > &other) | 
|  | implement operator== 
 | 
|  | 
| bool | is_valid () const | 
|  | checks if optional contains a value 
 | 
|  | 
|  | operator bool () const | 
|  | auto cast to bool with value from is_valid() 
 | 
|  | 
| T * | get () | 
|  | access value as ptr 
 | 
|  | 
| const T * | get () const | 
|  | access value as ptr 
 | 
|  | 
| T * | operator-> () | 
|  | implement operator-> 
 | 
|  | 
| const T * | operator-> () const | 
|  | implement operator-> 
 | 
|  | 
| T & | operator* () | 
|  | implement operator* 
 | 
|  | 
| const T & | operator* () const | 
|  | implement operator* 
 | 
|  | 
template<typename T>
class ink::runtime::story_ptr< T >
Pointer wrapper to an object whose lifetime is tied to a story object. 
A shared pointer whose lifetime is also tied to the lifetime of the parent story object. The referenced object will live until either 1) There are no more story_ptr's pointing to this object 2) The story object which owns this object dies
- See also
- story_interface 
- 
runner_interface 
- 
globals_interface 
◆ story_ptr() [1/2]
pointer constructor. 
for nullptr only. 
- Parameters
- 
  
    | ptr | will be ignored, should be nullptr |  
 
 
 
◆ story_ptr() [2/2]
copy constructor 
- Parameters
- 
  
  
 
 
◆ cast()
template<typename T > 
template<typename U > 
 
pointer cast while keeping ref count 
- Template Parameters
- 
  
    | U | new pointer type, valid cast form T to U must be available |  
 
 
 
◆ get() [1/2]
access value as ptr 
- Return values
- 
  
    | nullptr | if value is not valid |  
 
 
 
◆ get() [2/2]
access value as ptr 
- Return values
- 
  
    | nullptr | if value is not valid |  
 
 
 
◆ operator=()
copy assigment operator 
- Parameters
- 
  
  
 
 
The documentation for this class was generated from the following file: