level_id and level_pos instances can now be stored in CrawlHashTables and CrawlVectors.
SFZIXVGFMK5PBXFUCDXSKTFZGOSVLQSMC2AB4WPXAWBY762RBHRQC
bool get_bool() const;
char get_byte() const;
short get_short() const;
long get_long() const;
float get_float() const;
std::string get_string() const;
coord_def get_coord() const;
bool get_bool() const;
char get_byte() const;
short get_short() const;
long get_long() const;
float get_float() const;
std::string get_string() const;
coord_def get_coord() const;
level_id get_level_id() const;
level_pos get_level_pos() const;
CrawlStoreValue::operator bool&() { return get_bool(); }
CrawlStoreValue::operator char&() { return get_byte(); }
CrawlStoreValue::operator short&() { return get_short(); }
CrawlStoreValue::operator float&() { return get_float(); }
CrawlStoreValue::operator long&() { return get_long(); }
CrawlStoreValue::operator std::string&() { return get_string(); }
CrawlStoreValue::operator coord_def&() { return get_coord(); }
CrawlStoreValue::operator CrawlHashTable&() { return get_table(); }
CrawlStoreValue::operator CrawlVector&() { return get_vector(); }
CrawlStoreValue::operator item_def&() { return get_item(); }
CrawlStoreValue::operator bool&() { return get_bool(); }
CrawlStoreValue::operator char&() { return get_byte(); }
CrawlStoreValue::operator short&() { return get_short(); }
CrawlStoreValue::operator float&() { return get_float(); }
CrawlStoreValue::operator long&() { return get_long(); }
CrawlStoreValue::operator std::string&() { return get_string(); }
CrawlStoreValue::operator coord_def&() { return get_coord(); }
CrawlStoreValue::operator CrawlHashTable&() { return get_table(); }
CrawlStoreValue::operator CrawlVector&() { return get_vector(); }
CrawlStoreValue::operator item_def&() { return get_item(); }
CrawlStoreValue::operator level_id&() { return get_level_id(); }
CrawlStoreValue::operator level_pos&() { return get_level_pos(); }
#ifdef DEBUG
if (type != SV_NONE)
ASSERT(type == val.type);
switch (val.type)
{
case SV_STR:
case SV_COORD:
case SV_ITEM:
case SV_LEV_ID:
case SV_LEV_POS:
ASSERT(val.val.ptr != NULL);
break;
case SV_HASH:
{
ASSERT(val.val.ptr != NULL);
CrawlHashTable* nested;
nested = static_cast<CrawlHashTable*>(val.val.ptr);
nested->assert_validity();
break;
}
case SV_VEC:
{
ASSERT(val.val.ptr != NULL);
CrawlVector* nested;
nested = static_cast<CrawlVector*>(val.val.ptr);
nested->assert_validity();
break;
}
default:
break;
}
#endif