The Battle for Wesnoth  1.19.1+dev
Classes | Public Member Functions | Static Public Member Functions | List of all members
image::modification Class Referenceabstract

Base abstract class for an image-path modification. More...

#include <image_modifications.hpp>

Inheritance diagram for image::modification:


struct  imod_exception
 Exception thrown by the operator() when an error occurs. More...

Public Member Functions

virtual ~modification ()
virtual surface operator() (const surface &src) const =0
 Applies the image-path modification on the specified surface. More...
virtual int priority () const
 Specifies the priority of the modification. More...

Static Public Member Functions

static modification_queue decode (const std::string &)
 Decodes modifications from a modification string. More...

Detailed Description

Base abstract class for an image-path modification.

Definition at line 61 of file image_modifications.hpp.

Constructor & Destructor Documentation

◆ ~modification()

virtual image::modification::~modification ( )

Definition at line 102 of file image_modifications.hpp.

Member Function Documentation

◆ decode()

modification_queue image::modification::decode ( const std::string &  encoded_mods)

Decodes modifications from a modification string.

Decodes the modification string.

Important: It creates new objects which need to be deleted after use

encoded_modsA string representing any number of modifications
A modification_queue filled with decoded modification pointers

Definition at line 139 of file image_modifications.cpp.

References utils::parenthetical_split(), and image::modification_queue::push().

Referenced by BOOST_AUTO_TEST_CASE(), and image::load_image_sub_file().

◆ operator()()

virtual surface image::modification::operator() ( const surface src) const
pure virtual

◆ priority()

virtual int image::modification::priority ( ) const

Specifies the priority of the modification.

Reimplemented in image::rc_modification.

Definition at line 108 of file image_modifications.hpp.

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