Torque3D Documentation / _generateds / stdGameProcess.h

stdGameProcess.h

Engine/source/T3D/gameBase/std/stdGameProcess.h

More...

Classes:

class

List to keep track of GameBases to process.

Detailed Description

 1
 2//-----------------------------------------------------------------------------
 3// Copyright (c) 2012 GarageGames, LLC
 4//
 5// Permission is hereby granted, free of charge, to any person obtaining a copy
 6// of this software and associated documentation files (the "Software"), to
 7// deal in the Software without restriction, including without limitation the
 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 9// sell copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21// IN THE SOFTWARE.
22//-----------------------------------------------------------------------------
23
24#ifndef _GAMEPROCESS_STD_H_
25#define _GAMEPROCESS_STD_H_
26
27//#include "T3D/gameBase/processList.h"
28#ifndef _GAMEPROCESS_H_
29#include "T3D/gameBase/gameProcess.h"
30#endif
31
32class GameBase;
33class GameConnection;
34struct Move;
35
36//----------------------------------------------------------------------------
37
38/// List to keep track of GameBases to process.
39class StdClientProcessList : public ClientProcessList
40{
41   typedef ClientProcessList Parent;
42
43protected:
44   
45   // ProcessList
46   void onTickObject(ProcessObject *);
47   void advanceObjects();
48   void onAdvanceObjects();
49   
50public:
51
52   StdClientProcessList();  
53
54   // ProcessList
55   bool advanceTime( SimTime timeDelta );
56   
57   // ClientProcessList
58   void clientCatchup( GameConnection *conn );
59   
60   static void init();
61   static void shutdown();
62};
63
64class StdServerProcessList : public ServerProcessList
65{
66   typedef ServerProcessList Parent;
67
68protected:
69
70   // ProcessList
71   void onPreTickObject( ProcessObject *pobj );
72   void onTickObject( ProcessObject *pobj );
73   void advanceObjects();
74
75public:
76
77   StdServerProcessList();  
78
79   static void init();
80   static void shutdown();
81};
82
83#endif // _GAMEPROCESS_STD_H_
84