image::locator Class Reference

#include <image.hpp>

Collaboration diagram for image::locator:

Collaboration graph
[legend]

List of all members.

Public Types

enum  type { NONE, FILE, SUB_FILE }

Public Member Functions

 locator ()
 locator (const locator &a, const std::string &mods="")
 locator (const char *filename)
 locator (const char *filename, const std::string &modifications)
 locator (const std::string &filename)
 locator (const std::string &filename, const std::string &modifications)
 locator (const std::string &filename, const gamemap::location &loc, const std::string &modifications="")
 locator (const std::string &filename, const gamemap::location &loc, int center_x, int center_y, const std::string &modifications="")
locatoroperator= (const locator &a)
bool operator== (const locator &a) const
bool operator!= (const locator &a) const
bool operator< (const locator &a) const
const std::string & get_filename () const
const gamemap::locationget_loc () const
const std::string & get_modifications () const
type get_type () const
bool is_void () const
surface load_from_disk () const
bool in_cache (const std::vector< cache_item< surface > > &cache) const
surface locate_in_cache (const std::vector< cache_item< surface > > &cache) const
void add_to_cache (std::vector< cache_item< surface > > &cache, const surface &image) const
bool in_cache (const std::vector< cache_item< locator > > &cache) const
locator locate_in_cache (const std::vector< cache_item< locator > > &cache) const
void add_to_cache (std::vector< cache_item< locator > > &cache, const locator &image) const

Static Protected Attributes

static int last_index_ = 0

Private Member Functions

void init_index ()
void parse_arguments ()
surface load_image_file () const
surface load_image_sub_file () const

Private Attributes

int index_
value val_

Classes

struct  value


Detailed Description

Definition at line 52 of file image.hpp.


Member Enumeration Documentation

Enumerator:
NONE 
FILE 
SUB_FILE 

Definition at line 60 of file image.hpp.


Constructor & Destructor Documentation

image::locator::locator (  ) 

Definition at line 141 of file image.cpp.

Referenced by locate_in_cache().

image::locator::locator ( const locator a,
const std::string &  mods = "" 
)

image::locator::locator ( const char *  filename  ) 

Definition at line 157 of file image.cpp.

References init_index(), and parse_arguments().

image::locator::locator ( const char *  filename,
const std::string &  modifications 
)

Definition at line 171 of file image.cpp.

References init_index().

image::locator::locator ( const std::string &  filename  ) 

Definition at line 164 of file image.cpp.

References init_index(), and parse_arguments().

image::locator::locator ( const std::string &  filename,
const std::string &  modifications 
)

Definition at line 177 of file image.cpp.

References init_index().

image::locator::locator ( const std::string &  filename,
const gamemap::location loc,
const std::string &  modifications = "" 
)

Definition at line 183 of file image.cpp.

References init_index().

image::locator::locator ( const std::string &  filename,
const gamemap::location loc,
int  center_x,
int  center_y,
const std::string &  modifications = "" 
)

Definition at line 189 of file image.cpp.

References init_index().


Member Function Documentation

void image::locator::init_index (  )  [private]

void image::locator::parse_arguments (  )  [private]

locator & image::locator::operator= ( const locator a  ) 

Definition at line 195 of file image.cpp.

References index_, and val_.

bool image::locator::operator== ( const locator a  )  const [inline]

Definition at line 97 of file image.hpp.

References index_.

bool image::locator::operator!= ( const locator a  )  const [inline]

Definition at line 98 of file image.hpp.

References index_.

bool image::locator::operator< ( const locator a  )  const [inline]

Definition at line 99 of file image.hpp.

References index_.

const std::string& image::locator::get_filename (  )  const [inline]

const gamemap::location& image::locator::get_loc (  )  const [inline]

Definition at line 102 of file image.hpp.

References image::locator::value::loc_, and val_.

const std::string& image::locator::get_modifications (  )  const [inline]

Definition at line 103 of file image.hpp.

References image::locator::value::modifications_, and val_.

type image::locator::get_type (  )  const [inline]

Definition at line 104 of file image.hpp.

References image::locator::value::type_, and val_.

Referenced by image::exists().

bool image::locator::is_void (  )  const [inline]

surface image::locator::load_from_disk (  )  const

bool image::locator::in_cache ( const std::vector< cache_item< surface > > &  cache  )  const [inline]

Definition at line 126 of file image.hpp.

References cache, and index_.

Referenced by image::get_image().

surface image::locator::locate_in_cache ( const std::vector< cache_item< surface > > &  cache  )  const [inline]

Definition at line 128 of file image.hpp.

References cache, and index_.

Referenced by image::get_image().

void image::locator::add_to_cache ( std::vector< cache_item< surface > > &  cache,
const surface image 
) const [inline]

Definition at line 130 of file image.hpp.

References cache, and index_.

Referenced by image::get_image().

bool image::locator::in_cache ( const std::vector< cache_item< locator > > &  cache  )  const [inline]

Definition at line 132 of file image.hpp.

References cache, and index_.

locator image::locator::locate_in_cache ( const std::vector< cache_item< locator > > &  cache  )  const [inline]

Definition at line 134 of file image.hpp.

References cache, index_, and locator().

void image::locator::add_to_cache ( std::vector< cache_item< locator > > &  cache,
const locator image 
) const [inline]

Definition at line 136 of file image.hpp.

References cache, and index_.

surface image::locator::load_image_file (  )  const [private]

surface image::locator::load_image_sub_file (  )  const [private]


Member Data Documentation

int image::locator::last_index_ = 0 [static, protected]

Definition at line 139 of file image.hpp.

Referenced by init_index().

int image::locator::index_ [private]


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs