The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Private Attributes | List of all members
lua_mapgen::filter Class Reference

#include <lua_terrainfilter.hpp>

Public Member Functions

 filter (lua_State *L, int data_index, int res_index=0)
 a lua table with the following attributes [1]: the filter table, More...
 
 filter (const filter &)=delete
 
filteroperator= (const filter &)=delete
 
 filter (filter &&)=default
 
filteroperator= (filter &&)=default
 
 ~filter ()
 
bool matches (const gamemap_base &m, map_location l) const
 

Private Attributes

std::map< std::string, std::set< map_location > > known_sets_
 
std::unique_ptr< filter_implimpl_
 

Detailed Description

Definition at line 27 of file lua_terrainfilter.hpp.

Constructor & Destructor Documentation

◆ filter() [1/3]

lua_mapgen::filter::filter ( lua_State *  L,
int  data_index,
int  res_index = 0 
)
explicit

a lua table with the following attributes [1]: the filter table,

Parameters
Lthe pointer to the lua interpreter.
data_indexa index to the lua stack pointing to the lua table that describes the filter.
res_indexa positive index to the lua stack pointing to the lua table that describes the filter resources.

Definition at line 690 of file lua_terrainfilter.cpp.

References impl_, known_sets_, and LOG_LMG.

◆ filter() [2/3]

lua_mapgen::filter::filter ( const filter )
delete

◆ filter() [3/3]

lua_mapgen::filter::filter ( filter &&  )
default

◆ ~filter()

lua_mapgen::filter::~filter ( )

Definition at line 705 of file lua_terrainfilter.cpp.

Member Function Documentation

◆ matches()

bool lua_mapgen::filter::matches ( const gamemap_base m,
map_location  l 
) const

Definition at line 699 of file lua_terrainfilter.cpp.

References impl_, and log_scope.

◆ operator=() [1/2]

filter& lua_mapgen::filter::operator= ( const filter )
delete

◆ operator=() [2/2]

filter& lua_mapgen::filter::operator= ( filter &&  )
default

Member Data Documentation

◆ impl_

std::unique_ptr<filter_impl> lua_mapgen::filter::impl_
private

Definition at line 50 of file lua_terrainfilter.hpp.

Referenced by filter(), and matches().

◆ known_sets_

std::map<std::string, std::set<map_location> > lua_mapgen::filter::known_sets_
private

Definition at line 49 of file lua_terrainfilter.hpp.

Referenced by filter().


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