Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cNetHostRanges.h
Go to the documentation of this file.
1 //
4 //
5 #ifndef _INC_cNetHostRanges_H
6 #define _INC_cNetHostRanges_H
7 #ifndef NO_PRAGMA_ONCE
8 #pragma once
9 #endif
10 
11 #include "cNetHostRange.h"
13 
14 namespace GrayLib
15 {
16  UNITTEST2_PREDEF(cNetHostRanges);
17 
18  class GRAYLIB_LINK cNetHostRangeX4 : public cNetHostRange4, public cRefBase
19  {
22  public:
24 
25  public:
26  HASHCODE32_t get_HashCode() const noexcept
27  {
29  return m_Lo;
30  }
31  cNetHost4 get_IP4() const noexcept
32  {
33  return cNetHost4(m_Lo);
34  }
35  };
36 
38  {
41  private:
43 
44  public:
46  {
47  }
48 
49  cRefPtr<cNetHostRangeX4> FindHost(const cNetHost4& addr) const;
50  bool AddHostRange(const cNetHostRange4& addr, const char* pszBlockReason);
51 
52  UNITTEST_FRIEND(cNetHostRanges);
53  };
54 };
55 
56 #endif // _INC_cNetHostRanges_H
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
Definition: cNetHost.h:64
Definition: cNetHostRanges.h:19
cStringA m_sDescription
Description of why this IP is blocked. or why we track it.
Definition: cNetHostRanges.h:23
HASHCODE32_t get_HashCode() const noexcept
Definition: cNetHostRanges.h:26
cNetHost4 get_IP4() const noexcept
Definition: cNetHostRanges.h:31
Definition: cNetHostRanges.h:38
cNetHostRanges4()
Definition: cNetHostRanges.h:45
UNITTEST_FRIEND(cNetHostRanges)
Definition: cArraySortRef.h:60
Definition: cRefPtr.h:22
Definition: cRefPtr.h:225
Definition: cMesh.h:22
UNITTEST2_PREDEF(cQuadtree)
UINT32 HASHCODE32_t
always 32 bits.
Definition: GrayCore.h:117