Design Pattern Examples
Overview of object-oriented design patterns
_ConstStringList Struct Reference

Represents a list of pointers to zero-terminated strings that are to remain constant and never deleted. In other words, we assume the lifetime of the strings is at least as long as the instance of this structure that points to those strings. More...

#include <conststringlist.h>

Collaboration diagram for _ConstStringList:
Collaboration graph

Public Attributes

const char ** strings
 Pointer to an array of zero-terminated string pointers. These strings are constant and will not be duplicated or deleted.
 
size_t strings_count
 Number of strings in the strings list.
 
size_t allocated_count
 The number of strings that can be held in the strings list.
 

Detailed Description

Represents a list of pointers to zero-terminated strings that are to remain constant and never deleted. In other words, we assume the lifetime of the strings is at least as long as the instance of this structure that points to those strings.

Definition at line 18 of file conststringlist.h.

Member Data Documentation

◆ allocated_count

size_t allocated_count

The number of strings that can be held in the strings list.

Definition at line 34 of file conststringlist.h.

Referenced by ConstStringList_AddString(), ConstStringList_AddStrings(), ConstStringList_Initialize(), and ConstStringList_Remove().

◆ strings

const char** strings

Pointer to an array of zero-terminated string pointers. These strings are constant and will not be duplicated or deleted.

Definition at line 24 of file conststringlist.h.

Referenced by _StringizeStringList(), ConstStringList_AddString(), ConstStringList_AddStrings(), ConstStringList_AreListsEqual(), ConstStringList_Clear(), ConstStringList_Find(), ConstStringList_Initialize(), ConstStringList_Remove(), Shop_PickupOrder(), Shop_PlaceOrder(), and Visitor_Exercise().

◆ strings_count


The documentation for this struct was generated from the following file: