CFx SDK Documentation  2022 SP0
Namespaces | Classes | Typedefs | Functions
slimsig Namespace Reference

Namespaces

 detail
 

Classes

class  connection
 
class  signal_base
 
class  scoped_connection
 
struct  signal_traits
 
struct  signal_traits< R(Args...)>
 
class  signal
 
class  signal_base< SignalTraits, Allocator, R(Args...)>
 
class  basic_slot
 
class  basic_slot< R(Args...), SlotID >
 
class  slot_list
 
class  offset_iterator
 
class  slot_iterator
 
class  trackable_allocator
 
struct  trackable_delete
 
class  trackable_lock
 

Typedefs

template<class Handler , class SignalTraits = signal_traits<Handler>, class Allocator = std::allocator<std::function<Handler>>>
using signal_t = signal< Handler, SignalTraits, Allocator >
 
template<class T , class Observer , class Deleter = std::default_delete<T>>
using trackable_ptr = std::unique_ptr< T, trackable_delete< T, Observer, Deleter > >
 

Functions

template<class connection >
scoped_connection< connectionmake_scoped_connection (connection &&target)
 
template<class Handler , class SignalTraits , class Allocator >
void swap (signal< Handler, SignalTraits, Allocator > &lhs, signal< Handler, SignalTraits, Allocator > &rhs)
 
template<class Handler , class ThreadPolicy , class Allocator >
void swap (signal< Handler, ThreadPolicy, Allocator > &lhs, signal< Handler, ThreadPolicy, Allocator > &rhs)
 
template<class T , class Observer , class Deleter = std::default_delete<T>, class TrackableDeleter = trackable_delete<T, Observer, Deleter>, class... Args>
std::shared_ptr< T > make_trackable (TrackableDeleter deleter, Args &&... args)
 
template<class T , class Observer , class Deleter = std::default_delete<T>, class TrackableDeleter = trackable_delete<T, Observer, Deleter>, class... Args>
std::shared_ptr< T > make_trackable (Observer observer, Args &&... args)
 
template<class T , class Observer , class Deleter = std::default_delete<T>, class TrackableDeleter = trackable_delete<T, Observer, Deleter>, class... Args>
std::shared_ptr< T > make_trackable (Observer observer, Deleter deleter, Args &&... args)
 
template<class T , class Observer , class Allocator = std::allocator<T>, class TrackableAllocator = trackable_allocator<T, Observer, Allocator>, class... Args>
std::shared_ptr< T > allocate_trackable (TrackableAllocator allocator, Args &&... args)
 
template<class T , class Observer , class Allocator = std::allocator<T>, class TrackableAllocator = trackable_allocator<T, Observer, Allocator>, class... Args>
std::shared_ptr< T > allocate_trackable (Observer observer, Args &&... args)
 
template<class T , class Observer , class Allocator = std::allocator<T>, class TrackableAllocator = trackable_allocator<T, Observer, Allocator>, class... Args>
std::shared_ptr< T > allocate_trackable (Observer observer, Allocator allocator, Args &&... args)
 

Detailed Description

Slimmer Signals Copyright (c) 2014 Christopher Tarquini

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Slimmer Signals Inspired by Boost::Signals2 and ssig

Main Differences between this library and all the other signal libraries:

While still being light-weight it still supports:

Typedef Documentation

◆ signal_t

template<class Handler , class SignalTraits = signal_traits<Handler>, class Allocator = std::allocator<std::function<Handler>>>
using slimsig::signal_t = typedef signal<Handler, SignalTraits, Allocator>

Definition at line 101 of file slimsig.h.

◆ trackable_ptr

template<class T , class Observer , class Deleter = std::default_delete<T>>
using slimsig::trackable_ptr = typedef std::unique_ptr<T, trackable_delete<T, Observer, Deleter> >

Definition at line 84 of file tracked_connect.h.

Function Documentation

◆ allocate_trackable() [1/3]

template<class T , class Observer , class Allocator = std::allocator<T>, class TrackableAllocator = trackable_allocator<T, Observer, Allocator>, class... Args>
std::shared_ptr<T> slimsig::allocate_trackable ( Observer  observer,
Allocator  allocator,
Args &&...  args 
)

Definition at line 107 of file tracked_connect.h.

◆ allocate_trackable() [2/3]

template<class T , class Observer , class Allocator = std::allocator<T>, class TrackableAllocator = trackable_allocator<T, Observer, Allocator>, class... Args>
std::shared_ptr<T> slimsig::allocate_trackable ( Observer  observer,
Args &&...  args 
)

Definition at line 103 of file tracked_connect.h.

◆ allocate_trackable() [3/3]

template<class T , class Observer , class Allocator = std::allocator<T>, class TrackableAllocator = trackable_allocator<T, Observer, Allocator>, class... Args>
std::shared_ptr<T> slimsig::allocate_trackable ( TrackableAllocator  allocator,
Args &&...  args 
)

Definition at line 99 of file tracked_connect.h.

◆ make_scoped_connection()

template<class connection >
scoped_connection<connection> slimsig::make_scoped_connection ( connection &&  target)

Definition at line 117 of file connection.h.

◆ make_trackable() [1/3]

template<class T , class Observer , class Deleter = std::default_delete<T>, class TrackableDeleter = trackable_delete<T, Observer, Deleter>, class... Args>
std::shared_ptr<T> slimsig::make_trackable ( Observer  observer,
Args &&...  args 
)

Definition at line 91 of file tracked_connect.h.

◆ make_trackable() [2/3]

template<class T , class Observer , class Deleter = std::default_delete<T>, class TrackableDeleter = trackable_delete<T, Observer, Deleter>, class... Args>
std::shared_ptr<T> slimsig::make_trackable ( Observer  observer,
Deleter  deleter,
Args &&...  args 
)

Definition at line 95 of file tracked_connect.h.

◆ make_trackable() [3/3]

template<class T , class Observer , class Deleter = std::default_delete<T>, class TrackableDeleter = trackable_delete<T, Observer, Deleter>, class... Args>
std::shared_ptr<T> slimsig::make_trackable ( TrackableDeleter  deleter,
Args &&...  args 
)

Definition at line 87 of file tracked_connect.h.

◆ swap() [1/2]

template<class Handler , class SignalTraits , class Allocator >
void slimsig::swap ( signal< Handler, SignalTraits, Allocator > &  lhs,
signal< Handler, SignalTraits, Allocator > &  rhs 
)

◆ swap() [2/2]

template<class Handler , class ThreadPolicy , class Allocator >
void slimsig::swap ( signal< Handler, ThreadPolicy, Allocator > &  lhs,
signal< Handler, ThreadPolicy, Allocator > &  rhs 
)

Definition at line 362 of file signal_base.h.