6 #ifndef LIBPKG_SPRITE_FILE 7 #define LIBPKG_SPRITE_FILE 25 typedef unsigned long uint32;
40 bool operator()(
const string& lhs,
const string& rhs)
const;
44 typedef std::map<string,sprite_info,cmp_nocase> map_type;
47 typedef map_type::const_iterator const_iterator;
53 mutable std::fstream _sfs;
65 sprite_file(
const string& pathname,
bool writable=
false);
86 {
return _directory.size(); }
153 public std::runtime_error
165 static string make_message(
const string& name);
170 public std::runtime_error
182 static string make_message(
const string& name);
187 public std::runtime_error
const uint32 offset() const
Get file offset.
Definition: sprite_file.h:135
const string & name() const
Get sprite name.
Definition: sprite_file.h:147
The namespace used to hold the package management library.
Definition: auto_dir.cc:12
sprite_file(const string &pathname, bool writable=false)
Construct sprite file object.
Definition: sprite_file.cc:127
void copy(sprite_file &src, const string &name)
Copy sprite from another sprite file.
Definition: sprite_file.cc:156
An interface class to represent a sprite file.
Definition: sprite_file.h:19
unsigned long uint32
A type to represent an unsigned 32-bit integer.
Definition: sprite_file.h:22
An exception class for reporting corrupt-sprite-file errors.
Definition: sprite_file.h:186
unsigned int size() const
Get number of sprites.
Definition: sprite_file.h:85
const uint32 size() const
Get size.
Definition: sprite_file.h:141
An exception class for reporting already-exists errors.
Definition: sprite_file.h:169
A class to represent a sprite within a sprite file.
Definition: sprite_file.h:109
An exception class for reporting not-found errors.
Definition: sprite_file.h:152
const sprite_info & operator[](unsigned int index) const
Get const sprite information record at index.
const sprite_info * find(const string &name) const
Find const sprite information record for sprite name.
Definition: sprite_file.cc:150
~sprite_file()
Destroy sprite file object.
Definition: sprite_file.cc:205