Freeciv21
Develop your civilization from humble roots to a global empire
specvec.h File Reference
#include <cstring>
+ Include dependency graph for specvec.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SPECVEC_TYPE   struct SPECVEC_TAG
 
#define SPECVEC_PASTE_(x, y)   x##y
 
#define SPECVEC_PASTE(x, y)   SPECVEC_PASTE_(x, y)
 
#define SPECVEC_VECTOR   struct SPECVEC_PASTE(SPECVEC_TAG, _vector)
 
#define SPECVEC_FOO(suffix)   SPECVEC_PASTE(SPECVEC_TAG, suffix)
 
#define TYPED_VECTOR_ITERATE(atype, vector, var)
 
#define VECTOR_ITERATE_END
 

Functions

static void SPECVEC_FOO() _vector_init (SPECVEC_VECTOR *tthis)
 
static void SPECVEC_FOO() _vector_reserve (SPECVEC_VECTOR *tthis, size_t size)
 
static size_t SPECVEC_FOO() _vector_size (const SPECVEC_VECTOR *tthis)
 
static SPECVEC_TYPE *SPECVEC_FOO() _vector_get (const SPECVEC_VECTOR *tthis, int svindex)
 
static void SPECVEC_FOO() _vector_copy (SPECVEC_VECTOR *to, const SPECVEC_VECTOR *from)
 
static void SPECVEC_FOO() _vector_free (SPECVEC_VECTOR *tthis)
 
static void SPECVEC_FOO() _vector_append (SPECVEC_VECTOR *tthis, SPECVEC_TYPE const &pfoo)
 
static void SPECVEC_FOO() _vector_remove (SPECVEC_VECTOR *tthis, const int svindex)
 

Variables

 SPECVEC_VECTOR
 
size_t size
 
size_t size_alloc
 

Macro Definition Documentation

◆ SPECVEC_FOO

#define SPECVEC_FOO (   suffix)    SPECVEC_PASTE(SPECVEC_TAG, suffix)

Definition at line 57 of file specvec.h.

◆ SPECVEC_PASTE

#define SPECVEC_PASTE (   x,
 
)    SPECVEC_PASTE_(x, y)

Definition at line 53 of file specvec.h.

◆ SPECVEC_PASTE_

#define SPECVEC_PASTE_ (   x,
 
)    x##y

Definition at line 52 of file specvec.h.

◆ SPECVEC_TYPE

#define SPECVEC_TYPE   struct SPECVEC_TAG

Definition at line 49 of file specvec.h.

◆ SPECVEC_VECTOR

#define SPECVEC_VECTOR   struct SPECVEC_PASTE(SPECVEC_TAG, _vector)

Definition at line 55 of file specvec.h.

◆ TYPED_VECTOR_ITERATE

#define TYPED_VECTOR_ITERATE (   atype,
  vector,
  var 
)
Value:
{ \
unsigned int myiter##var; \
atype *var; \
for (myiter##var = 0; myiter##var < (vector)->size; myiter##var++) { \
var = &(vector)->p[myiter##var];
size_t size
Definition: specvec.h:64

Definition at line 152 of file specvec.h.

◆ VECTOR_ITERATE_END

#define VECTOR_ITERATE_END
Value:
} \
}

Definition at line 160 of file specvec.h.

Function Documentation

◆ _vector_append()

static void SPECVEC_FOO() _vector_append ( SPECVEC_VECTOR tthis,
SPECVEC_TYPE const &  pfoo 
)
inlinestatic

Definition at line 121 of file specvec.h.

◆ _vector_copy()

static void SPECVEC_FOO() _vector_copy ( SPECVEC_VECTOR to,
const SPECVEC_VECTOR from 
)
inlinestatic

Definition at line 104 of file specvec.h.

◆ _vector_free()

static void SPECVEC_FOO() _vector_free ( SPECVEC_VECTOR tthis)
inlinestatic

Definition at line 113 of file specvec.h.

◆ _vector_get()

static SPECVEC_TYPE* SPECVEC_FOO() _vector_get ( const SPECVEC_VECTOR tthis,
int  svindex 
)
inlinestatic

Definition at line 92 of file specvec.h.

◆ _vector_init()

static void SPECVEC_FOO() _vector_init ( SPECVEC_VECTOR tthis)
inlinestatic

Definition at line 67 of file specvec.h.

Referenced by _vector_free().

◆ _vector_remove()

static void SPECVEC_FOO() _vector_remove ( SPECVEC_VECTOR tthis,
const int  svindex 
)
inlinestatic

Definition at line 131 of file specvec.h.

◆ _vector_reserve()

static void SPECVEC_FOO() _vector_reserve ( SPECVEC_VECTOR tthis,
size_t  size 
)
inlinestatic

Definition at line 73 of file specvec.h.

Referenced by _vector_append(), _vector_copy(), and _vector_remove().

◆ _vector_size()

static size_t SPECVEC_FOO() _vector_size ( const SPECVEC_VECTOR tthis)
inlinestatic

Definition at line 86 of file specvec.h.

Referenced by _vector_remove().

Variable Documentation

◆ size

size_t size

Definition at line 64 of file specvec.h.

Referenced by _pq_remove(), _vector_reserve(), action_list_end(), adjust_int_map_filtered(), api_edit_resize_city(), fcUdpScan::begin_scan(), build_free_small_wonders(), info_tile::calc_size(), citizen_base_mood(), city_build(), city_change_size(), city_incite_cost(), city_size_add(), city_size_set(), compat_load_020400(), configure_font(), progress_bar::create_region(), chat_widget::default_size(), dio_input_skip(), dio_put_memory_raw(), editor_apply_tool(), editor_tool_set_size(), enough_data(), enough_space(), fc_game_tab_widget::event(), fc_client::eventFilter(), fair_map_island_new(), fc_rand_debug(), fc_randomly_debug(), fc_shortcuts_dialog::fc_shortcuts_dialog(), freeciv::layer_city_size::fill_sprite_array(), map_view::find_place(), city_dialog::get_city(), get_packet_from_connection_raw(), handle_edit_city_create(), handle_edit_player_vision(), handle_edit_tile_extra(), handle_edit_tile_terrain(), minimap_view::heightForWidth(), historian_generic(), hud_input_box::hud_input_box(), hud_message_box::hud_message_box(), hud_text::hud_text(), freeciv::layer_city::load_city_size_sprites(), main(), map_generate_island_single(), max_tile_trade(), resizable_widget::mouseMoveEvent(), notify_about_incoming_packet(), notify_about_outgoing_packet(), national_budget_widget::paintEvent(), indicators_widget::paintEvent(), re_parse_cmdline(), report_final_scores(), report_top_five_cities(), science_report::reset_tree(), minimap_view::resizeEvent(), rup_parse_cmdline(), scanin(), science_report::science_report(), send_lanserver_response(), send_packet_data(), server_packet_input(), chat_widget::set_chat_visible(), set_sizes(), freeciv::renderer::set_viewport_size(), sg_load_map_startpos(), sg_load_player_city(), sg_load_player_city_citizens(), sg_load_player_vision_city(), show_tile_labels(), help_dialog::showEvent(), turn_done_button::sizeHint(), freeciv::city_icon_widget::sizeHint(), strvec_store(), text_happiness_cities(), unit_foodbox_cost(), hud_units::update_actions(), units_view::update_waiting(), vision_site_size_set(), voteinfo_queue_get_current(), voteinfo_queue_next(), xsize_callback(), and ysize_callback().

◆ size_alloc

size_t size_alloc

Definition at line 64 of file specvec.h.

◆ SPECVEC_VECTOR

SPECVEC_VECTOR
Initial value:
{
#define SPECVEC_TYPE
Definition: specvec.h:49

Definition at line 59 of file specvec.h.