Scorum
Public Member Functions | Protected Member Functions | Friends | List of all members
scorum::chain::dbs_game Class Reference

#include <game.hpp>

Inheritance diagram for scorum::chain::dbs_game:
scorum::chain::dbs_service_base< game_service_i > scorum::chain::dbs_base scorum::chain::game_service_i scorum::chain::base_service_i< game_object >

Public Member Functions

virtual const game_objectcreate_game (const uuid_type &uuid, const std::string &json_metadata, fc::time_point_sec start, uint32_t auto_resolve_delay_sec, const game_type &game, const fc::flat_set< market_type > &markets) override
 
virtual void finish (const game_object &game, const fc::flat_set< wincase_type > &wincases) override
 
virtual void update_markets (const game_object &game, const fc::flat_set< market_type > &markets) override
 
virtual bool is_exists (int64_t game_id) const override
 
bool is_exists (const uuid_type &uuid) const override
 
virtual const game_objectget_game (int64_t game_id) const override
 
virtual const game_objectget_game (const uuid_type &uuid) const override
 
virtual std::vector< object_cref_typeget_games (fc::time_point_sec start) const override
 
- Public Member Functions inherited from scorum::chain::dbs_service_base< game_service_i >
 dbs_service_base (dba::db_index &db)
 
virtual const object_typecreate (const modifier_type &modifier) override
 
virtual void update (const modifier_type &modifier) override
 
virtual void update (const object_type &o, const modifier_type &modifier) override
 
virtual void remove () override
 
virtual void remove (const object_type &o) override
 
virtual void remove_all (const std::vector< object_cref_type > &os) override
 
virtual bool is_exists () const override
 
virtual const object_typeget () const override
 
const object_typeget_by (const Key &arg) const
 
const object_typefind_by (const Key &arg) const
 
void foreach_by (Call &&call) const
 
std::vector< object_cref_typeget_range_by (LowerBounder lower, UpperBounder upper) const
 
std::vector< object_cref_typeget_filtered_range_by (LowerBounder lower, UpperBounder upper, UnaryPredicate filter) const
 
- Public Member Functions inherited from scorum::chain::dbs_base
virtual ~dbs_base ()
 
- Public Member Functions inherited from scorum::chain::base_service_i< game_object >
virtual ~base_service_i ()
 

Protected Member Functions

 dbs_game (database &db)
 
- Protected Member Functions inherited from scorum::chain::dbs_base
 dbs_base ()=delete
 
 dbs_base (dbs_base &&)=delete
 
 dbs_base (dba::db_index &)
 
time_point_sec head_block_time ()
 
dba::db_indexdb_impl ()
 
const dba::db_indexdb_impl () const
 

Friends

class dbservice_dbs_factory
 

Additional Inherited Members

- Public Types inherited from scorum::chain::dbs_service_base< game_service_i >
using base_service_type = dbs_service_base
 
using modifier_type = typename service_interface::modifier_type
 
using object_type = typename service_interface::object_type
 
using object_cref_type = typename service_interface::object_cref_type
 
- Public Types inherited from scorum::chain::base_service_i< game_object >
using object_type = game_object
 
using modifier_type = std::function< void(object_type &)>
 
using call_type = std::function< void(const object_type &)>
 
using object_cref_type = std::reference_wrapper< const object_type >
 
- Protected Types inherited from scorum::chain::dbs_base
typedef dbs_base _base_type
 

Detailed Description

Definition at line 39 of file game.hpp.

Constructor & Destructor Documentation

◆ dbs_game()

scorum::chain::dbs_game::dbs_game ( database db)
explicitprotected

Definition at line 11 of file game.cpp.

Member Function Documentation

◆ create_game()

const game_object & scorum::chain::dbs_game::create_game ( const uuid_type uuid,
const std::string &  json_metadata,
fc::time_point_sec  start,
uint32_t  auto_resolve_delay_sec,
const game_type game,
const fc::flat_set< market_type > &  markets 
)
overridevirtual

Implements scorum::chain::game_service_i.

Definition at line 19 of file game.cpp.

◆ finish()

void scorum::chain::dbs_game::finish ( const game_object game,
const fc::flat_set< wincase_type > &  wincases 
)
overridevirtual

Implements scorum::chain::game_service_i.

Definition at line 45 of file game.cpp.

◆ get_game() [1/2]

const game_object & scorum::chain::dbs_game::get_game ( const uuid_type uuid) const
overridevirtual

Implements scorum::chain::game_service_i.

Definition at line 84 of file game.cpp.

◆ get_game() [2/2]

const game_object & scorum::chain::dbs_game::get_game ( int64_t  game_id) const
overridevirtual

Implements scorum::chain::game_service_i.

Definition at line 79 of file game.cpp.

◆ get_games()

std::vector< dbs_game::object_cref_type > scorum::chain::dbs_game::get_games ( fc::time_point_sec  start) const
overridevirtual

Implements scorum::chain::game_service_i.

Definition at line 89 of file game.cpp.

◆ is_exists() [1/2]

bool scorum::chain::dbs_game::is_exists ( const uuid_type uuid) const
overridevirtual

Implements scorum::chain::game_service_i.

Definition at line 74 of file game.cpp.

◆ is_exists() [2/2]

bool scorum::chain::dbs_game::is_exists ( int64_t  game_id) const
overridevirtual

Implements scorum::chain::game_service_i.

Definition at line 69 of file game.cpp.

◆ update_markets()

void scorum::chain::dbs_game::update_markets ( const game_object game,
const fc::flat_set< market_type > &  markets 
)
overridevirtual

Implements scorum::chain::game_service_i.

Definition at line 60 of file game.cpp.

Friends And Related Function Documentation

◆ dbservice_dbs_factory

friend class dbservice_dbs_factory
friend

Definition at line 41 of file game.hpp.


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