OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4Network2ResLoad Class Reference

#include <C4Network2Res.h>

Collaboration diagram for C4Network2ResLoad:
[legend]

Public Member Functions

 C4Network2ResLoad (int32_t iChunk, int32_t iByClient)
 
 ~C4Network2ResLoad ()
 
int32_t getChunk () const
 
int32_t getByClient () const
 
C4Network2ResLoadNext () const
 
bool CheckTimeout ()
 

Protected Attributes

int32_t iChunk
 
time_t Timestamp
 
int32_t iByClient
 
C4Network2ResLoadpNext
 

Friends

class C4Network2Res
 

Detailed Description

Definition at line 109 of file C4Network2Res.h.

Constructor & Destructor Documentation

C4Network2ResLoad::C4Network2ResLoad ( int32_t  iChunk,
int32_t  iByClient 
)

Definition at line 140 of file C4Network2Res.cpp.

141  : iChunk(inChunk), Timestamp(time(nullptr)), iByClient(inByClient), pNext(nullptr)
142 {
143 
144 }
C4Network2ResLoad * pNext
C4Network2ResLoad::~C4Network2ResLoad ( )

Definition at line 146 of file C4Network2Res.cpp.

147 {
148 
149 }

Member Function Documentation

bool C4Network2ResLoad::CheckTimeout ( )

Definition at line 151 of file C4Network2Res.cpp.

References C4NetResLoadTimeout, and Timestamp.

152 {
153  return difftime(time(nullptr), Timestamp) >= C4NetResLoadTimeout;
154 }
const int32_t C4NetResLoadTimeout
Definition: C4Network2Res.h:34
int32_t C4Network2ResLoad::getByClient ( ) const
inline

Definition at line 127 of file C4Network2Res.h.

References iByClient.

127 { return iByClient; }
int32_t C4Network2ResLoad::getChunk ( ) const
inline

Definition at line 126 of file C4Network2Res.h.

References iChunk.

126 { return iChunk; }
C4Network2ResLoad* C4Network2ResLoad::Next ( ) const
inline

Definition at line 129 of file C4Network2Res.h.

References pNext.

Referenced by C4Network2Res::RemoveLoad(), and C4Network2Res::StartLoad().

129 { return pNext; }
C4Network2ResLoad * pNext

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class C4Network2Res
friend

Definition at line 111 of file C4Network2Res.h.

Member Data Documentation

int32_t C4Network2ResLoad::iByClient
protected

Definition at line 120 of file C4Network2Res.h.

Referenced by getByClient().

int32_t C4Network2ResLoad::iChunk
protected

Definition at line 118 of file C4Network2Res.h.

Referenced by getChunk().

C4Network2ResLoad* C4Network2ResLoad::pNext
protected

Definition at line 123 of file C4Network2Res.h.

Referenced by Next(), C4Network2Res::RemoveLoad(), and C4Network2Res::StartLoad().

time_t C4Network2ResLoad::Timestamp
protected

Definition at line 119 of file C4Network2Res.h.

Referenced by CheckTimeout().


The documentation for this class was generated from the following files: