コンテンツにスキップ

cpp_robotics::Singleton

シングルトンなオブジェクトを生成する More...

#include <singleton.hpp>

Public Types

Name
using T class_t
using std::shared_ptr< class_t > shared_t

Public Functions

Name
shared_t get_shared_instance()
シングルトンなオブジェクトをstd::shared_ptrで返す

Detailed Description

template <class T >
class cpp_robotics::Singleton;

シングルトンなオブジェクトを生成する

Template Parameters:

  • T シングルトンで生成したいオブジェクトの型

Public Types Documentation

using class_t

using cpp_robotics::Singleton< T >::class_t =  T;

using shared_t

using cpp_robotics::Singleton< T >::shared_t =  std::shared_ptr<class_t>;

Public Functions Documentation

function get_shared_instance

static inline shared_t get_shared_instance()

シングルトンなオブジェクトをstd::shared_ptrで返す

Return: shared_t オブジェクトのshared_ptr


Updated on 2024-05-28 at 06:55:40 +0000