Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
smart_adapter.h File Reference

Smart adapter factory (legacy) More...

#include <memory>
#include <type_traits>
#include "adapter.h"
Include dependency graph for smart_adapter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  kcenon::common::adapters::smart_adapter_factory
 Smart adapter factory that avoids unnecessary wrapping. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::common
 Core interfaces.
 
namespace  kcenon::common::adapters
 

Functions

template<typename Interface , typename Impl >
std::shared_ptr< Interface > kcenon::common::adapters::make_smart_adapter (std::shared_ptr< Impl > impl)
 Convenience function for creating smart adapters.
 
template<typename T , typename Interface >
std::shared_ptr< T > kcenon::common::adapters::unwrap_adapter (std::shared_ptr< Interface > ptr)
 Convenience function for unwrapping adapters.
 

Detailed Description

Smart adapter factory (legacy)

Note
Consider using adapter_factory from adapter.h for new code:
  • smart_adapter_factory -> adapter_factory
  • make_smart_adapter -> make_interface_adapter
  • unwrap_adapter -> adapter_factory::try_unwrap

This file is maintained for backward compatibility.

Definition in file smart_adapter.h.