Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
Memory.h File Reference

Wrapper for memory-related APIs. More...

#include <memory>

Go to the source code of this file.

Namespaces

namespace  sese
 

Macros

#define MAKE_SHARED_PRIVATE(RETURN_TYPE, ...)   sese::SharedType<RETURN_TYPE>(new RETURN_TYPE(__VA_ARGS__))
 
#define MAKE_UNIQUE_PRIVATE(RETURN_TYPE, ...)   sese::UniqueType<RETURN_TYPE>(new RETURN_TYPE(__VA_ARGS__))
 

Typedefs

template<typename T >
using sese::SharedType = std::shared_ptr<T>
 
template<typename T >
using sese::UniqueType = std::unique_ptr<T>
 
template<typename T >
using sese::WeakType = std::weak_ptr<T>
 

Functions

template<typename RETURN_TYPE , typename... ARGS>
SharedType< RETURN_TYPE > sese::makeShared (ARGS &&...args)
 
template<typename RETURN_TYPE , typename... ARGS>
SharedType< RETURN_TYPE > sese::makeUnique (ARGS &&...args)
 
template<typename RETURN_TYPE , typename INIT_TYPE >
SharedType< RETURN_TYPE > sese::makeSharedFromList (std::initializer_list< INIT_TYPE > list)
 
template<typename RETURN_TYPE , typename INIT_TYPE >
UniqueType< RETURN_TYPE > sese::makeUniqueFromList (std::initializer_list< INIT_TYPE > list)
 
template<typename RETURN_TYPE , typename RAW_TYPE >
SharedType< RETURN_TYPE > sese::dynamicPointerCast (SharedType< RAW_TYPE > raw_type)
 
template<typename RETURN_TYPE , typename RAW_TYPE >
UniqueType< RETURN_TYPE > sese::dynamicPointerCast (UniqueType< RAW_TYPE > &raw_type)
 

Detailed Description

Wrapper for memory-related APIs.

Author
kaoru
Date
June 5, 2022

Macro Definition Documentation

◆ MAKE_SHARED_PRIVATE

#define MAKE_SHARED_PRIVATE ( RETURN_TYPE,
... )   sese::SharedType<RETURN_TYPE>(new RETURN_TYPE(__VA_ARGS__))

◆ MAKE_UNIQUE_PRIVATE