Gorgon Game Engine
basic_StackedObjectProvider< A_ > Class Template Reference

This object creates an object that has two subobjects drawn on top of each other. More...

Public Types

using AnimationType = typename A_::AnimationType
 

Public Member Functions

 basic_StackedObjectProvider ()=default
 Empty constructor. More...
 
 basic_StackedObjectProvider (A_ &&bottom, A_ &&top, const Geometry::Point &offset={0, 0})
 
 basic_StackedObjectProvider (A_ &bottom, A_ &top, const Geometry::Point &offset={0, 0})
 Filling constructor. More...
 
 basic_StackedObjectProvider (A_ *bottom, A_ *top, const Geometry::Point &offset={0, 0})
 Filling constructor, nullptr is allowed but not recommended. More...
 
 basic_StackedObjectProvider (basic_StackedObjectProvider &&other)
 
 basic_StackedObjectProvider (const AssumeOwnershipTag &, A_ &bottom, A_ &top, const Geometry::Point &offset={0, 0})
 Filling constructor. More...
 
 basic_StackedObjectProvider (const AssumeOwnershipTag &, A_ *bottom, A_ *top, const Geometry::Point &offset={0, 0})
 Filling constructor, nullptr is allowed but not recommended. More...
 
 ~basic_StackedObjectProvider ()
 
basic_StackedObject< A_ > & CreateAnimation (bool create=true) const override
 
basic_StackedObject< A_ > & CreateAnimation (Gorgon::Animation::ControllerBase &timer) const override
 
RectangularAnimationCreateBottom () const override
 Creates a bottom animation without controller. More...
 
RectangularAnimationCreateTop () const override
 Creates a top animation without controller. More...
 
A_ * GetBottom () const
 Returns the bottom component. Could return nullptr. More...
 
Geometry::Point GetOffset () const override
 Returns the offset of the top image. More...
 
Geometry::Size GetSize () const override
 
A_ * GetTop () const
 Returns the top component. Could return nullptr. More...
 
virtual auto MoveOutProvider () -> decltype(*this) override
 
basic_StackedObjectProvideroperator= (basic_StackedObjectProvider &&other)
 
void OwnProviders ()
 Assumes the ownership of the providers. More...
 
void Prepare ()
 Prepares the providers. More...
 
void SetBottom (A_ *value)
 Sets the bottom provider, ownership semantics will not be changed. More...
 
void SetOffset (const Geometry::Point &value) override
 Sets the offset of the top image. More...
 
void SetProviders (A_ &top, A_ &bottom)
 Sets the providers in this object. More...
 
void SetTop (A_ *value)
 Sets the top provider, ownership semantics will not be changed. More...
 

Detailed Description

template<class A_>
class Gorgon::Graphics::basic_StackedObjectProvider< A_ >

This object creates an object that has two subobjects drawn on top of each other.

Top object can have an offset.

Member Typedef Documentation

◆ AnimationType

using AnimationType = typename A_::AnimationType

Constructor & Destructor Documentation

◆ basic_StackedObjectProvider() [1/7]

Empty constructor.

◆ basic_StackedObjectProvider() [2/7]

basic_StackedObjectProvider ( A_ &  bottom,
A_ &  top,
const Geometry::Point offset = {0,0} 
)

Filling constructor.

◆ basic_StackedObjectProvider() [3/7]

basic_StackedObjectProvider ( A_ *  bottom,
A_ *  top,
const Geometry::Point offset = {0,0} 
)

Filling constructor, nullptr is allowed but not recommended.

◆ basic_StackedObjectProvider() [4/7]

basic_StackedObjectProvider ( const AssumeOwnershipTag ,
A_ &  bottom,
A_ &  top,
const Geometry::Point offset = {0,0} 
)

Filling constructor.

◆ basic_StackedObjectProvider() [5/7]

basic_StackedObjectProvider ( const AssumeOwnershipTag ,
A_ *  bottom,
A_ *  top,
const Geometry::Point offset = {0,0} 
)

Filling constructor, nullptr is allowed but not recommended.

◆ basic_StackedObjectProvider() [6/7]

basic_StackedObjectProvider ( A_ &&  bottom,
A_ &&  top,
const Geometry::Point offset = {0,0} 
)

◆ basic_StackedObjectProvider() [7/7]

◆ ~basic_StackedObjectProvider()

Member Function Documentation

◆ CreateAnimation() [1/2]

basic_StackedObject<A_>& CreateAnimation ( bool  create = true) const
override

◆ CreateAnimation() [2/2]

basic_StackedObject<A_>& CreateAnimation ( Gorgon::Animation::ControllerBase timer) const
override

◆ CreateBottom()

RectangularAnimation& CreateBottom ( ) const
override

Creates a bottom animation without controller.

References EmptyImage::Instance().

◆ CreateTop()

RectangularAnimation& CreateTop ( ) const
override

Creates a top animation without controller.

References EmptyImage::Instance().

◆ GetBottom()

A_* GetBottom ( ) const

Returns the bottom component. Could return nullptr.

◆ GetOffset()

Geometry::Point GetOffset ( ) const
override

Returns the offset of the top image.

◆ GetSize()

Geometry::Size GetSize ( ) const
override

◆ GetTop()

A_* GetTop ( ) const

Returns the top component. Could return nullptr.

◆ MoveOutProvider()

virtual auto MoveOutProvider ( ) -> decltype(*this)
overridevirtual

◆ operator=()

◆ OwnProviders()

void OwnProviders ( )

Assumes the ownership of the providers.

◆ Prepare()

void Prepare ( )

Prepares the providers.

Provider type should support this operation, otherwise this function will cause a compile time error.

◆ SetBottom()

void SetBottom ( A_ *  value)

Sets the bottom provider, ownership semantics will not be changed.

◆ SetOffset()

void SetOffset ( const Geometry::Point value)
override

Sets the offset of the top image.

◆ SetProviders()

void SetProviders ( A_ &  top,
A_ &  bottom 
)

Sets the providers in this object.

◆ SetTop()

void SetTop ( A_ *  value)

Sets the top provider, ownership semantics will not be changed.


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