17 #ifndef LIBPKG_SPRITE_FILE 18 #define LIBPKG_SPRITE_FILE 36 typedef unsigned long uint32;
51 bool operator()(
const string& lhs,
const string& rhs)
const;
55 typedef std::map<string,sprite_info,cmp_nocase> map_type;
58 typedef map_type::const_iterator const_iterator;
64 mutable std::fstream _sfs;
76 sprite_file(
const string& pathname,
bool writable=
false);
97 {
return _directory.size(); }
164 public std::runtime_error
176 static string make_message(
const string& name);
181 public std::runtime_error
193 static string make_message(
const string& name);
198 public std::runtime_error
const uint32 offset() const
Get file offset.
Definition: sprite_file.h:146
const string & name() const
Get sprite name.
Definition: sprite_file.h:158
The namespace used to hold the package management library.
Definition: auto_dir.cc:23
sprite_file(const string &pathname, bool writable=false)
Construct sprite file object.
Definition: sprite_file.cc:138
void copy(sprite_file &src, const string &name)
Copy sprite from another sprite file.
Definition: sprite_file.cc:167
An interface class to represent a sprite file.
Definition: sprite_file.h:30
unsigned long uint32
A type to represent an unsigned 32-bit integer.
Definition: sprite_file.h:33
An exception class for reporting corrupt-sprite-file errors.
Definition: sprite_file.h:197
unsigned int size() const
Get number of sprites.
Definition: sprite_file.h:96
const uint32 size() const
Get size.
Definition: sprite_file.h:152
An exception class for reporting already-exists errors.
Definition: sprite_file.h:180
A class to represent a sprite within a sprite file.
Definition: sprite_file.h:120
An exception class for reporting not-found errors.
Definition: sprite_file.h:163
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:161
~sprite_file()
Destroy sprite file object.
Definition: sprite_file.cc:216