Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vsnet_cmd.cpp File Reference
#include "vsnet_cmd.h"

Go to the source code of this file.

Macros

#define CASE(a)
 

Functions

std::ostream & operator<< (std::ostream &ostr, Cmd cmd)
 
const char * displayCmd (Cmd cmd)
 

Macro Definition Documentation

#define CASE (   a)
Value:
case a: \
return #a; break;

Definition at line 25 of file vsnet_cmd.cpp.

Referenced by displayCmd(), VSFileSystem::DisplayType(), nameof(), and operator<<().

Function Documentation

const char* displayCmd ( Cmd  cmd)

Definition at line 29 of file vsnet_cmd.cpp.

References CASE, CMD_ADDCLIENT, CMD_ADDEDYOU, CMD_ASKFILE, CMD_CARGOUPGRADE, CMD_CHOOSESHIP, CMD_COMM, CMD_CONNECT, CMD_CREATECHAR, CMD_CREDITS, CMD_CUSTOM, CMD_DAMAGE, CMD_DISCONNECT, CMD_DOCK, CMD_DOWNLOAD, CMD_ENTERCLIENT, CMD_EXITCLIENT, CMD_FIREREQUEST, CMD_JUMP, CMD_KILL, CMD_LOCATIONS, CMD_LOGIN, CMD_LOGOUT, CMD_MISSION, CMD_NEWSUBSCRIBE, CMD_PING, CMD_POSUPDATE, CMD_RESPAWN, CMD_RESYNCACCOUNTS, CMD_SAVEACCOUNTS, CMD_SAVEDATA, CMD_SCAN, CMD_SECMESSAGE, CMD_SECSNDSAMPLE, CMD_SERVERTIME, CMD_SHIPDEALER, CMD_SNAPCARGO, CMD_SNAPDAMAGE, CMD_SNAPSHOT, CMD_SOUNDSAMPLE, CMD_STARTNETCOMM, CMD_STOPNETCOMM, CMD_TARGET, CMD_TXTMESSAGE, CMD_UNDOCK, CMD_UNFIREREQUEST, LOGIN_ACCEPT, LOGIN_ALREADY, LOGIN_DATA, LOGIN_ERROR, and LOGIN_NEW.

Referenced by operator<<().

30 {
31  switch (cmd)
32  {
33  CASE( CMD_LOGIN )
34  CASE( CMD_LOGOUT )
37  CASE( CMD_PING )
40 
43  CASE( LOGIN_ERROR )
45  CASE( LOGIN_DATA )
47  CASE( LOGIN_NEW )
48  CASE( CMD_RESPAWN )
51 
54  CASE( CMD_CREDITS )
57  CASE( CMD_TARGET )
58  CASE( CMD_SCAN )
59  CASE( CMD_DAMAGE )
61  CASE( CMD_KILL )
62  CASE( CMD_JUMP )
63  CASE( CMD_ASKFILE )
71  CASE( CMD_DOCK )
72  CASE( CMD_UNDOCK )
73 
75 
80  CASE( CMD_CONNECT )
82 
84  CASE( CMD_MISSION )
85  CASE( CMD_CUSTOM )
87  CASE( CMD_COMM )
88  //CASE( CMD_ACK )
89  default:
90  return "CMD_UNKNOWN";
91 
92  break;
93  }
94 }
std::ostream& operator<< ( std::ostream &  ostr,
Cmd  cmd 
)

Definition at line 19 of file vsnet_cmd.cpp.

References displayCmd().

20 {
21  ostr<<displayCmd( cmd );
22  return ostr;
23 }