Factor stuff related to our_movie into separate file
[lsnes.git] / rrdata.hpp
blobc141d02ebf2f297886a6d63dbb5df0c53e7c8d5c
1 #ifndef _rrdata__hpp__included__
2 #define _rrdata__hpp__included__
4 #define RRDATA_BYTES 32
5 #include <cstdint>
6 #include <stdexcept>
8 class rrdata
10 public:
11 struct instance
13 instance() throw(std::bad_alloc);
14 instance(unsigned char* b) throw();
15 unsigned char bytes[RRDATA_BYTES];
16 bool operator<(const struct instance& i) const throw();
17 bool operator==(const struct instance& i) const throw();
18 const struct instance operator++(int) throw();
19 const struct instance& operator++() throw();
23 static void read_base(const std::string& project) throw(std::bad_alloc);
24 static void close() throw();
25 static void add(const struct instance& i) throw(std::bad_alloc);
26 static void add_internal() throw(std::bad_alloc);
27 static uint64_t write(std::ostream& strm) throw(std::bad_alloc);
28 static uint64_t read(std::istream& strm) throw(std::bad_alloc);
29 static struct instance* internal;
32 std::ostream& operator<<(std::ostream& os, const struct rrdata::instance& i);
34 #endif