OpenTTD
Data Structures | Macros | Typedefs | Variables
network_base.h File Reference

Base core network types and some helper functions to access them. More...

#include "network_type.h"
#include "core/address.h"
#include "../core/pool_type.hpp"
#include "../company_type.h"

Go to the source code of this file.

Data Structures

struct  NetworkClientInfo
 Container for all information known about a client. More...
 

Macros

#define FOR_ALL_CLIENT_INFOS_FROM(var, start)   FOR_ALL_ITEMS_FROM(NetworkClientInfo, clientinfo_index, var, start)
 Iterate over all the clients from a given index. More...
 
#define FOR_ALL_CLIENT_INFOS(var)   FOR_ALL_CLIENT_INFOS_FROM(var, 0)
 Iterate over all the clients. More...
 

Typedefs

typedef Pool< NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENTNetworkClientInfoPool
 Type for the pool with client information. More...
 

Variables

NetworkClientInfoPool _networkclientinfo_pool
 The pool with client information. More...
 

Detailed Description

Base core network types and some helper functions to access them.

Definition in file network_base.h.

Macro Definition Documentation

◆ FOR_ALL_CLIENT_INFOS

#define FOR_ALL_CLIENT_INFOS (   var)    FOR_ALL_CLIENT_INFOS_FROM(var, 0)

◆ FOR_ALL_CLIENT_INFOS_FROM

#define FOR_ALL_CLIENT_INFOS_FROM (   var,
  start 
)    FOR_ALL_ITEMS_FROM(NetworkClientInfo, clientinfo_index, var, start)

Iterate over all the clients from a given index.

Parameters
varThe variable to iterate with.
startThe location to start the iteration from.

Definition at line 49 of file network_base.h.

Referenced by NetworkChatWindow::ChatTabCompletionNextItem().

Typedef Documentation

◆ NetworkClientInfoPool

Type for the pool with client information.

Definition at line 23 of file network_base.h.

Variable Documentation

◆ _networkclientinfo_pool

NetworkClientInfoPool _networkclientinfo_pool

The pool with client information.