SST 15.0
Structural Simulation Toolkit
SST::ELI::ExtendedCtor< NewCtor, OldCtor > Class Template Reference

Implements a constructor for a derived base as usually happens with subcomponents, e.g. More...

#include <elementbuilder.h>

Public Types

template<class __NewCtor>
using ExtendCtor = ExtendedCtor<__NewCtor, ExtendedCtor<NewCtor, OldCtor>>
 
template<class NewBase>
using ChangeBase = typename NewCtor::template ChangeBase<NewBase>
 

Static Public Member Functions

template<class T>
static std::enable_if_t< OldCtor::template is_constructible_v< T >, bool > add ()
 The derived Ctor can "block" the more abstract Ctor, meaning an object should only be instantiated as the most derived type.
 
template<class T>
static std::enable_if_t<!OldCtor::template is_constructible_v< T >, bool > add ()
 

Static Public Attributes

template<class T>
static constexpr bool is_constructible_v = NewCtor::template is_constructible_v<T>
 

Detailed Description

template<class NewCtor, class OldCtor>
class SST::ELI::ExtendedCtor< NewCtor, OldCtor >

Implements a constructor for a derived base as usually happens with subcomponents, e.g.

class U extends API extends Subcomponent. You can construct U as either an API* or a Subcomponent* depending on usage.

Member Function Documentation

◆ add()

template<class NewCtor, class OldCtor>
template<class T>
static std::enable_if_t< OldCtor::template is_constructible_v< T >, bool > SST::ELI::ExtendedCtor< NewCtor, OldCtor >::add ( )
inlinestatic

The derived Ctor can "block" the more abstract Ctor, meaning an object should only be instantiated as the most derived type.

enable_if here checks if both the derived API and the parent API are still valid

Referenced by SST::ELI::ExtendedCtor< __NewCtor, ExtendedCtor< NewCtor, OldCtor > >::add().


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