Update of /cvsroot/gcblue/gcb_wx/include/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7283/include/common
Added Files:
tcObjStream.h
Log Message:
--- NEW FILE: tcObjStream.h ---
/*
** @file tcObjStream.h
**
** Copyright (C) 2004 Dewitt Colclough (de...@tw...)
** All rights reserved.
** This file is part of the Global Conflict Blue (GCB) program.
** GCB is free software; you can redistribute it and/or modify
** it under the terms of version 2 of the GNU General Public License as
** published by the Free Software Foundation.
** GCB is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
** You should have received a copy of the GNU General Public License
** along with GCB; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _TCOBJSTREAM_H_
#define _TCOBJSTREAM_H_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "common/tcStream.h"
/**
* This file holds the classes derived from tcStream that are used for obj
* updates for multiplayer. If these grow in complexity, split into separate
* files.
*/
/**
* Stream with all data necessary to create object (at client)
*/
class tcCreateStream : public tcStream
{
public:
tcCreateStream();
tcCreateStream(const char* data, std::streamsize count);
explicit tcCreateStream(const tcStream& stream);
};
/**
* Stream for basic update of object kinematic state
*/
class tcUpdateStream : public tcStream
{
public:
tcUpdateStream();
tcUpdateStream(const char* data, std::streamsize count);
explicit tcUpdateStream(const tcStream& stream);
};
/**
* Stream for update of command-related state, such as guidance
* changes, AI orders
*/
class tcCommandStream : public tcStream
{
public:
bool isAck; ///< set true to indicate acknowledgement command update
bool GetAck() const;
void SetAck(bool state);
tcCommandStream();
tcCommandStream(const char* data, std::streamsize count);
explicit tcCommandStream(const tcStream& stream);
};
#endif
|