#include <useval.h>
Collaboration diagram for Usecode_value:
Public Types | |
enum | Val_type { int_type = 0, string_type = 1, array_type = 2, end_of_array_type = 3, pointer_type = 4 } |
Public Member Functions | |
Usecode_value () | |
Usecode_value (int ival) | |
Usecode_value (const char *s) | |
Usecode_value (int size, Usecode_value *elem0) | |
Usecode_value (Game_object *ptr) | |
~Usecode_value () | |
Usecode_value & | operator= (const Usecode_value &v2) |
Usecode_value & | operator= (const char *str) |
Usecode_value (const Usecode_value &v2) | |
Usecode_value | operator+ (const Usecode_value &v2) |
void | push_back (int) |
bool | operator== (const Usecode_value &v2) const |
bool | operator!= (const Usecode_value &v2) const |
Val_type | get_type () const |
int | get_array_size () const |
bool | is_array () const |
bool | is_int () const |
bool | is_ptr () const |
long | get_int_value () const |
Game_object * | get_ptr_value () const |
const char * | get_str_value () const |
long | need_int_value () const |
void | put_elem (int i, Usecode_value &val) |
Usecode_value & | get_elem (int i) const |
Usecode_value & | operator[] (int i) |
Usecode_value & | get_elem0 () |
bool | is_false () const |
bool | is_true () const |
bool | is_undefined () const |
int | resize (int new_size) |
int | find_elem (const Usecode_value &val) |
Usecode_value & | concat (Usecode_value &val2) |
void | append (int *vals, int cnt) |
int | add_values (int index, Usecode_value &val2) |
void | print (std::ostream &out, bool shortformat=false) |
int | save (unsigned char *buf, int len) |
bool | restore (unsigned char *&ptr, int len) |
Static Private Member Functions | |
static int | count_array (const Usecode_value &val) |
Private Attributes | |
Val_type | type |
union { | |
long intval | |
char * str | |
Usecode_value * array | |
Game_object * ptr | |
} | value |
bool | undefined |
Definition at line 37 of file useval.h.
Usecode_value::Usecode_value | ( | ) | [inline] |
Definition at line 62 of file useval.h.
References value.
Referenced by operator+(), and push_back().
Usecode_value::Usecode_value | ( | int | ival | ) | [inline] |
Usecode_value::Usecode_value | ( | const char * | s | ) |
Definition at line 142 of file useval.cc.
References newstrdup().
Here is the call graph for this function:
Usecode_value::Usecode_value | ( | int | size, | |
Usecode_value * | elem0 | |||
) | [inline] |
Usecode_value::Usecode_value | ( | Game_object * | ptr | ) | [inline] |
Usecode_value::~Usecode_value | ( | ) |
Usecode_value::Usecode_value | ( | const Usecode_value & | v2 | ) | [inline] |
int Usecode_value::count_array | ( | const Usecode_value & | val | ) | [static, private] |
Definition at line 58 of file useval.cc.
References array, type, and value.
Referenced by get_array_size(), and push_back().
Usecode_value & Usecode_value::operator= | ( | const Usecode_value & | v2 | ) |
Definition at line 86 of file useval.cc.
References newstrdup().
Here is the call graph for this function:
Usecode_value & Usecode_value::operator= | ( | const char * | str | ) |
Definition at line 124 of file useval.cc.
References array, newstrdup(), and str.
Here is the call graph for this function:
Usecode_value Usecode_value::operator+ | ( | const Usecode_value & | v2 | ) |
Definition at line 395 of file useval.cc.
References get_int_value(), get_str_value(), get_type(), int_type, is_undefined(), snprintf, string_type, and Usecode_value().
Here is the call graph for this function:
void Usecode_value::push_back | ( | int | ) |
Definition at line 181 of file useval.cc.
References count_array(), resize(), Usecode_value(), and value.
Here is the call graph for this function:
bool Usecode_value::operator== | ( | const Usecode_value & | v2 | ) | const |
bool Usecode_value::operator!= | ( | const Usecode_value & | v2 | ) | const [inline] |
Val_type Usecode_value::get_type | ( | ) | const [inline] |
Definition at line 92 of file useval.h.
References type.
Referenced by operator+(), and Usecode_internal::UI_printf().
int Usecode_value::get_array_size | ( | ) | const [inline] |
Definition at line 94 of file useval.h.
References array_type, count_array(), and type.
Referenced by Usecode_script::add(), Conversation::add_answer(), Usecode_internal::add_party_items(), add_values(), concat(), Usecode_internal::count_objects(), Usecode_internal::create_script(), Usecode_internal::find_nearby(), Usecode_internal::get_position(), need_int_value(), Usecode_internal::path_run_usecode(), Conversation::remove_answer(), Usecode_internal::remove_party_items(), Usecode_internal::run(), Usecode_script::start(), Usecode_internal::UI_find_object(), Usecode_internal::UI_get_npc_object(), Usecode_internal::UI_is_not_blocked(), Usecode_internal::UI_recall_virtue_stone(), Usecode_internal::UI_update_last_created(), and Usecode_script::Usecode_script().
Here is the call graph for this function:
bool Usecode_value::is_array | ( | ) | const [inline] |
Definition at line 96 of file useval.h.
References array_type, and type.
Referenced by add_values(), Usecode_internal::find_nearby(), Usecode_internal::get_item(), Conversation::remove_answer(), Usecode_internal::run(), Usecode_internal::UI_get_npc_object(), and Usecode_internal::UI_set_new_schedules().
bool Usecode_value::is_int | ( | ) | const [inline] |
bool Usecode_value::is_ptr | ( | ) | const [inline] |
Definition at line 100 of file useval.h.
References pointer_type, and type.
Referenced by Usecode_internal::get_item().
long Usecode_value::get_int_value | ( | ) | const [inline] |
Definition at line 102 of file useval.h.
References int_type, pointer_type, type, and value.
Referenced by Usecode_internal::add_cont_items(), Usecode_internal::add_party_items(), Usecode_internal::count_objects(), Usecode_script::exec(), Usecode_internal::find_nearby(), Usecode_internal::find_nearest(), Usecode_internal::get_item(), Usecode_internal::get_objects(), Usecode_internal::get_position(), need_int_value(), operator+(), Usecode_internal::path_run_usecode(), Usecode_internal::remove_cont_items(), Usecode_internal::remove_party_items(), Usecode_internal::set_item_shape(), Usecode_internal::show_npc_face(), Usecode_script::start(), Usecode_internal::UI_is_not_blocked(), Usecode_internal::UI_modify_schedule(), Usecode_internal::UI_move_object(), Usecode_internal::UI_printf(), and Usecode_internal::UI_update_last_created().
Game_object* Usecode_value::get_ptr_value | ( | ) | const [inline] |
Definition at line 110 of file useval.h.
References pointer_type, type, and value.
Referenced by Usecode_internal::get_item().
const char* Usecode_value::get_str_value | ( | ) | const [inline] |
Definition at line 113 of file useval.h.
References string_type, type, and value.
Referenced by Conversation::add_answer(), Usecode_internal::item_say(), need_int_value(), operator+(), and Conversation::remove_answer().
long Usecode_value::need_int_value | ( | ) | const [inline] |
Definition at line 115 of file useval.h.
References array_type, get_array_size(), get_int_value(), get_str_value(), pointer_type, str, type, and value.
Referenced by Usecode_internal::popi(), and Usecode_internal::remove_party_items().
Here is the call graph for this function:
void Usecode_value::put_elem | ( | int | i, | |
Usecode_value & | val | |||
) | [inline] |
Definition at line 127 of file useval.h.
References value.
Referenced by Usecode_internal::get_party(), Usecode_internal::run(), Usecode_internal::UI_click_on_item(), Usecode_internal::UI_get_dead_party(), Usecode_internal::UI_get_npc_name(), Usecode_internal::UI_get_npc_object(), and Usecode_internal::UI_get_object_position().
Usecode_value& Usecode_value::get_elem | ( | int | i | ) | const [inline] |
Definition at line 130 of file useval.h.
References array_type, type, and value.
Referenced by Conversation::add_answer(), Usecode_internal::add_party_items(), add_values(), concat(), Usecode_internal::count_objects(), Usecode_internal::create_script(), Usecode_script::exec(), Usecode_internal::find_nearby(), Usecode_internal::get_position(), Usecode_internal::path_run_usecode(), Usecode_script::print(), Conversation::remove_answer(), Usecode_internal::remove_party_items(), Usecode_script::restore(), Usecode_internal::run(), Usecode_script::save(), Usecode_script::start(), Usecode_internal::UI_find_object(), Usecode_internal::UI_get_npc_object(), Usecode_internal::UI_is_not_blocked(), Usecode_internal::UI_move_object(), Usecode_internal::UI_recall_virtue_stone(), and Usecode_internal::UI_update_last_created().
Usecode_value& Usecode_value::operator[] | ( | int | i | ) | [inline] |
Usecode_value& Usecode_value::get_elem0 | ( | ) | [inline] |
Definition at line 142 of file useval.h.
References array_type, type, and value.
Referenced by Usecode_internal::get_item(), Usecode_internal::path_run_usecode(), and Usecode_internal::run().
bool Usecode_value::is_false | ( | ) | const [inline] |
Definition at line 144 of file useval.h.
References array_type, end_of_array_type, int_type, pointer_type, type, and value.
Referenced by is_true(), Usecode_internal::run(), and Usecode_internal::uc_trace_disasm().
bool Usecode_value::is_true | ( | ) | const [inline] |
Definition at line 158 of file useval.h.
References is_false().
Referenced by Usecode_internal::run().
Here is the call graph for this function:
bool Usecode_value::is_undefined | ( | ) | const [inline] |
int Usecode_value::resize | ( | int | new_size | ) |
Definition at line 157 of file useval.cc.
References array, size, and type.
Referenced by Usecode_script::add(), push_back(), and Usecode_internal::run().
int Usecode_value::find_elem | ( | const Usecode_value & | val | ) |
Usecode_value & Usecode_value::concat | ( | Usecode_value & | val2 | ) |
Definition at line 275 of file useval.cc.
References get_array_size(), get_elem(), size, and type.
Referenced by Usecode_internal::add_party_items(), and Usecode_internal::run().
Here is the call graph for this function:
void Usecode_value::append | ( | int * | vals, | |
int | cnt | |||
) |
int Usecode_value::add_values | ( | int | index, | |
Usecode_value & | val2 | |||
) |
Definition at line 328 of file useval.cc.
References get_array_size(), get_elem(), is_array(), and size.
Referenced by Usecode_internal::run().
Here is the call graph for this function:
void Usecode_value::print | ( | std::ostream & | out, | |
bool | shortformat = false | |||
) |
int Usecode_value::save | ( | unsigned char * | buf, | |
int | len | |||
) |
bool Usecode_value::restore | ( | unsigned char *& | ptr, | |
int | len | |||
) |
Val_type Usecode_value::type [private] |
Definition at line 49 of file useval.h.
Referenced by concat(), count_array(), get_array_size(), get_elem(), get_elem0(), get_int_value(), get_ptr_value(), get_str_value(), get_type(), is_array(), is_false(), is_int(), is_ptr(), need_int_value(), operator==(), operator[](), resize(), and ~Usecode_value().
long Usecode_value::intval [private] |
char* Usecode_value::str [private] |
Usecode_value* Usecode_value::array [private] |
Game_object* Usecode_value::ptr [private] |
union { ... } Usecode_value::value [private] |
bool Usecode_value::undefined [private] |