1 #include "emustatus.hpp"
3 emulator_status::emulator_status() throw(std::bad_alloc
)
7 emulator_status::~emulator_status() throw()
11 void emulator_status::set(const std::string
& key
, const std::string
& value
) throw(std::bad_alloc
)
14 content
[key
] = to_u32string(value
);
17 void emulator_status::set(const std::string
& key
, const std::u32string
& value
) throw(std::bad_alloc
)
23 bool emulator_status::haskey(const std::string
& key
) throw()
26 return (content
.count(key
) != 0);
29 void emulator_status::erase(const std::string
& key
) throw()
35 std::u32string
emulator_status::get(const std::string
& key
) throw(std::bad_alloc
)
41 emulator_status::iterator
emulator_status::first() throw(std::bad_alloc
)
48 bool emulator_status::next(iterator
& itr
) throw(std::bad_alloc
)
51 std::map
<std::string
, std::u32string
>::iterator j
;
53 j
= content
.lower_bound("");
55 j
= content
.upper_bound(itr
.key
);
56 if(j
== content
.end()) {
62 itr
.not_valid
= false;
64 itr
.value
= j
->second
;