The Battle for Wesnoth  1.19.0-dev
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
storyscreen::controller Class Reference

#include <controller.hpp>

Inheritance diagram for storyscreen::controller:

Public Types

typedef std::shared_ptr< partpart_pointer_type
 

Public Member Functions

 controller (const vconfig &data, const std::string &scenario_name)
 
part_pointer_type get_part (int index) const
 
int max_parts () const
 

Private Member Functions

virtual bool resolve_wml_helper (const std::string &key, const vconfig &node) override
 Inherited from story_parser. More...
 
- Private Member Functions inherited from storyscreen::story_parser
 story_parser ()=default
 
virtual ~story_parser ()=default
 
 story_parser (const story_parser &)=delete
 
story_parseroperator= (const story_parser &)=delete
 
virtual void resolve_wml (const vconfig &cfg)
 Takes care of initializing and branching properties. More...
 

Private Attributes

std::string scenario_name_
 
std::vector< part_pointer_typeparts_
 

Detailed Description

Definition at line 33 of file controller.hpp.

Member Typedef Documentation

◆ part_pointer_type

Definition at line 36 of file controller.hpp.

Constructor & Destructor Documentation

◆ controller()

storyscreen::controller::controller ( const vconfig data,
const std::string &  scenario_name 
)

Member Function Documentation

◆ get_part()

part_pointer_type storyscreen::controller::get_part ( int  index) const
inline

Definition at line 40 of file controller.hpp.

References utf8::index(), and parts_.

Referenced by gui2::dialogs::story_viewer::update_current_part_ptr().

◆ max_parts()

int storyscreen::controller::max_parts ( ) const
inline

◆ resolve_wml_helper()

bool storyscreen::controller::resolve_wml_helper ( const std::string &  key,
const vconfig node 
)
overrideprivatevirtual

Inherited from story_parser.

Implements storyscreen::story_parser.

Definition at line 44 of file controller.cpp.

References vconfig::empty(), parts_, and scenario_name_.

Member Data Documentation

◆ parts_

std::vector<part_pointer_type> storyscreen::controller::parts_
private

Definition at line 57 of file controller.hpp.

Referenced by get_part(), max_parts(), and resolve_wml_helper().

◆ scenario_name_

std::string storyscreen::controller::scenario_name_
private

Definition at line 54 of file controller.hpp.

Referenced by resolve_wml_helper().


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