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
)
17 bool emulator_status::haskey(const std::string
& key
) throw()
20 return (content
.count(key
) != 0);
23 void emulator_status::erase(const std::string
& key
) throw()
29 std::string
emulator_status::get(const std::string
& key
) throw(std::bad_alloc
)
35 emulator_status::iterator
emulator_status::first() throw(std::bad_alloc
)
42 bool emulator_status::next(iterator
& itr
) throw(std::bad_alloc
)
45 std::map
<std::string
, std::string
>::iterator j
;
47 j
= content
.lower_bound("");
49 j
= content
.upper_bound(itr
.key
);
50 if(j
== content
.end()) {
56 itr
.not_valid
= false;
58 itr
.value
= j
->second
;