Recast  1
Game with custom magic
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BoundTemperatureWorldInjector Class Reference

#include <BoundTemperatureWorldInjector.hpp>

Collaboration diagram for BoundTemperatureWorldInjector:
Collaboration graph

Public Member Functions

 BoundTemperatureWorldInjector ()
 
bool hasWorldBounds () const noexcept
 
Parallelepiped worldBounds () const
 
void setWorldBounds (Parallelepiped worldBounds)
 
bool hasTemperatureExchangeCoefficient () const noexcept
 
double temperatureExchangeCoefficient () const
 
void setTemperatureExchangeCoefficient (double temperatureExchangeCoefficient)
 
bool hasMinUpdateDelta () const noexcept
 
std::chrono::milliseconds minUpdateDelta () const
 
void setMinUpdateDelta (std::chrono::milliseconds minUpdateDelta)
 
std::shared_ptr
< ITemperatureWorldBoundable
< ITemperatureWorld > > 
world ()
 
std::shared_ptr< IUpdaterupdater ()
 
std::shared_ptr
< ITimerBlockable< ITimer > > 
timer ()
 

Protected Member Functions

void _makeWorld ()
 
void _makeUpdater ()
 
void _makeTimer ()
 

Protected Attributes

std::unique_ptr< Parallelepiped_worldBounds
 
std::unique_ptr< double > _temperatureExchangeCoefficient
 
std::unique_ptr
< std::chrono::milliseconds > 
_minUpdateDelta
 
std::shared_ptr
< ITemperatureWorldBoundable
< ITemperatureWorld > > 
_world
 
std::shared_ptr< IUpdater_updater
 
std::shared_ptr
< ITimerBlockable< ITimer > > 
_timer
 

Detailed Description

Injector. This class builds bound temperature world and its updater. You must set world bounds via setWorldBounds method. Temperature exchange coefficient and minimum update delta are set to defaults.

Constructor & Destructor Documentation

BoundTemperatureWorldInjector::BoundTemperatureWorldInjector ( )

Member Function Documentation

void BoundTemperatureWorldInjector::_makeTimer ( )
protected
void BoundTemperatureWorldInjector::_makeUpdater ( )
protected
void BoundTemperatureWorldInjector::_makeWorld ( )
protected
bool BoundTemperatureWorldInjector::hasMinUpdateDelta ( ) const
noexcept

This method is exception-safe.

Returns
True if minimum update delta have been set.
bool BoundTemperatureWorldInjector::hasTemperatureExchangeCoefficient ( ) const
noexcept

This method is exception-safe.

Returns
True if temperature exchange coefficient have been set.
bool BoundTemperatureWorldInjector::hasWorldBounds ( ) const
noexcept

This method is exception-safe.

Returns
True if world bounds have been set.
milliseconds BoundTemperatureWorldInjector::minUpdateDelta ( ) const

Minimum time between world updates is the minimum update delta. This method can throw an exception if minimum update delta is not set.

Returns
Minimum update delta.
void BoundTemperatureWorldInjector::setMinUpdateDelta ( std::chrono::milliseconds  minUpdateDelta)

Sets minimum update delta. Minimum time between world updates is minimum update delta.

Parameters
minUpdateDeltaMinimum update delta.
void BoundTemperatureWorldInjector::setTemperatureExchangeCoefficient ( double  temperatureExchangeCoefficient)

Sets temperature exchange coefficient. The more temperature exchange coefficient is, the faster temperature exchange will be.

Parameters
temperatureExchangeCoefficientTemperature exchange coefficient.
void BoundTemperatureWorldInjector::setWorldBounds ( Parallelepiped  worldBounds)

Sets world bounds.

Parameters
worldBoundsWorld bounds.
double BoundTemperatureWorldInjector::temperatureExchangeCoefficient ( ) const

The more temperature exchange coefficient is, the faster temperature exchange will be. This method can throw an exception if temperature exchange coefficient is not set.

Returns
Temperature exchange coefficient.
shared_ptr< ITimerBlockable< ITimer > > BoundTemperatureWorldInjector::timer ( )

Timer will be built only once for an injector instance.

Returns
Built blocking timer which is used in world updater.
shared_ptr< IUpdater > BoundTemperatureWorldInjector::updater ( )

Temperature world updater will be built only once for an injector instance. You can get the world via world getter.

Returns
Built bound temperature world updater.
shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld > > BoundTemperatureWorldInjector::world ( )

Temperature world will be built only once for an injector instance. updater getter uses the same world instance.

Returns
Built bound temperature world.
Parallelepiped BoundTemperatureWorldInjector::worldBounds ( ) const

This method can throw an exception if world bounds are not set.

Returns
World bounds.

Member Data Documentation

std::unique_ptr<std::chrono::milliseconds> BoundTemperatureWorldInjector::_minUpdateDelta
protected
std::unique_ptr<double> BoundTemperatureWorldInjector::_temperatureExchangeCoefficient
protected
std::shared_ptr<ITimerBlockable<ITimer> > BoundTemperatureWorldInjector::_timer
protected
std::shared_ptr<IUpdater> BoundTemperatureWorldInjector::_updater
protected
std::shared_ptr<ITemperatureWorldBoundable<ITemperatureWorld> > BoundTemperatureWorldInjector::_world
protected
std::unique_ptr<Parallelepiped> BoundTemperatureWorldInjector::_worldBounds
protected

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