26        static void remove_reference(ref_block*&);
 
   34        story_ptr_base(internal::ref_block* story);
 
   36        story_ptr_base(internal::ref_block* story, internal::ref_block* instance);
 
   38        story_ptr_base(
const story_ptr_base&);
 
   40        story_ptr_base& operator=(
const story_ptr_base&) = 
delete;
 
   47        bool remove_reference();
 
   50        void set(
const story_ptr_base& other);
 
   53        inline bool is_valid()
 const 
   55            return _story_block != 
nullptr && _instance_block != 
nullptr && _story_block->valid
 
   56                && _instance_block->valid;
 
   60        inline bool is_story_valid()
 const { 
return _story_block != 
nullptr && _story_block->valid; }
 
   64        ref_block* _story_block;
 
   67        ref_block* _instance_block;
 
   91        : story_ptr_base(
story)
 
  102        : story_ptr_base(other)
 
  112        : story_ptr_base(nullptr, nullptr)
 
  115        inkAssert(ptr == 
nullptr, 
"can not create story_ptr from existing pointer!");
 
 
  120        : story_ptr_base(nullptr, nullptr)
 
  132    story_ptr(
const story_ptr<T>& oth);
 
  136    story_ptr<T>& 
operator=(
const story_ptr<T>& oth);
 
  146#ifdef INK_ENABLE_UNREAL 
  148        U* casted = 
reinterpret_cast<U*
>(_ptr);
 
  150        U* casted = 
dynamic_cast<U*
>(_ptr);
 
  152        if (casted == 
nullptr)
 
 
  165    bool is_valid()
 const { 
return story_ptr_base::is_valid() && _ptr; }
 
  168    inline operator bool()
 const { 
return is_valid(); }
 
  179    inline const T* 
get()
 const { 
return is_valid() ? _ptr : 
nullptr; }
 
 
  198story_ptr<T>::~story_ptr()
 
  200    if (remove_reference()) {
 
  208    : story_ptr_base(other)
 
 
  218    if (remove_reference()) {
 
 
Pointer wrapper to an object whose lifetime is tied to a story object.
Definition story_ptr.h:85
const T * get() const
access value as ptr
Definition story_ptr.h:179
T * get()
access value as ptr
Definition story_ptr.h:174
bool operator==(const story_ptr< T > &other)
implement operator==
Definition story_ptr.h:161
T * operator->()
implement operator->
Definition story_ptr.h:182
story_ptr(T *ptr)
pointer constructor.
Definition story_ptr.h:111
bool is_valid() const
checks if optional contains a value
Definition story_ptr.h:165
story_ptr< U > cast()
pointer cast while keeping ref count
Definition story_ptr.h:143
T & operator*()
implement operator*
Definition story_ptr.h:188
const T & operator*() const
implement operator*
Definition story_ptr.h:191
story_ptr< T > & operator=(const story_ptr< T > &oth)
copy assigment operator
Definition story_ptr.h:215
const T * operator->() const
implement operator->
Definition story_ptr.h:185
A loaded ink story.
Definition story.h:26
Contaning all modules and classes used for the inkles ink runtime.
Definition choice.h:13