cgv
Loading...
Searching...
No Matches
cgv::data::ref_counted Class Reference

if you derive your class from this class, a ref_ptr will do reference counting in the inhereted ref_count member. More...

#include <ref_counted.h>

Inheritance diagram for cgv::data::ref_counted:
cgv::base::base cgv::gui::animation cgv::math::sparse_les cgv::math::sparse_les_factory cgv::os::socket vr::vr_log cgv::base::base_generator cgv::base::console cgv::base::factory cgv::base::named cgv::base::object_constructor cgv::base::test cgv::gui::base_provider cgv::gui::base_provider_generator cgv::gui::gui_driver cgv::gui::layout cgv::gui::trigger_server cgv::media::font::font cgv::media::font::font_face cgv::media::font::font_server cgv::media::image::abst_image_reader cgv::media::image::abst_image_writer cgv::media::image::image_reader cgv::media::image::image_writer cgv::media::image::reader_listener cgv::media::image::writer_listener cgv::media::video::abst_video_reader cgv::media::video::abst_video_writer cgv::media::video::video_reader cgv::media::video::video_reader_listener cgv::media::video::video_writer cgv::media::video::video_writer_listener cgv::render::render_config cgv::render::shader_config cgv::gui::value_animation< cgv::math::fvec< T, 3 > > cgv::gui::value_animation< T > cgv::math::sparse_les_factory_impl< T > cgv::os::socket_client cgv::os::socket_server

Public Member Functions

int get_ref_count () const
 read access to current count
 

Protected Member Functions

 ref_counted ()
 constructor initializes the count to 0
 
void set_ref_count (int c) const
 write access is also const to allow ref counted pointers to const instances
 

Friends

class ref_ptr_tag
 

Detailed Description

if you derive your class from this class, a ref_ptr will do reference counting in the inhereted ref_count member.

Definition at line 10 of file ref_counted.h.

Constructor & Destructor Documentation

◆ ref_counted()

cgv::data::ref_counted::ref_counted ( )
inlineprotected

constructor initializes the count to 0

Definition at line 18 of file ref_counted.h.

Member Function Documentation

◆ get_ref_count()

int cgv::data::ref_counted::get_ref_count ( ) const
inline

read access to current count

Definition at line 23 of file ref_counted.h.

Referenced by cgv::data::ref_ptr_tag::dec_ref_count(), and cgv::data::ref_ptr_tag::inc_ref_count().

◆ set_ref_count()

void cgv::data::ref_counted::set_ref_count ( int  c) const
inlineprotected

write access is also const to allow ref counted pointers to const instances

Definition at line 20 of file ref_counted.h.

Referenced by cgv::data::ref_ptr_tag::dec_ref_count(), and cgv::data::ref_ptr_tag::inc_ref_count().

Friends And Related Symbol Documentation

◆ ref_ptr_tag

friend class ref_ptr_tag
friend

Definition at line 16 of file ref_counted.h.


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