DI-Guy SDK Documentation  13.7.1
diguyPatchIdentifier.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2021 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
6 #pragma once
7 
8 #ifdef SWIG
10 #else
11 #define CPLUSPLUS_ONLY
12 #endif
13 
14 #ifdef CPLUSPLUS_ONLY
15 class bdiPatchIdentifier;
16 #endif
17 
18 #include <declspec_diguy.h>
19 
20 /*********************************************************************/
27 class BDI_DECLSPEC_diguy diguyPatchIdentifier
28 {
29 public:
30 
34 
38  diguyPatchIdentifier( const char* patch_id_str );
39 
42  diguyPatchIdentifier( unsigned short country, unsigned char service, unsigned short patch );
43 
46 
49 
51  diguyPatchIdentifier& operator = ( const diguyPatchIdentifier& rhs );
52 
55 
56  bool operator == ( const diguyPatchIdentifier& rhs ) const;
57  bool operator != ( const diguyPatchIdentifier& rhs ) const;
58 
60 
62  bool operator < ( const diguyPatchIdentifier& rhs ) const;
63 
66  void set_from_string( const char* patch_id_str );
67 
70  const char* get_as_string() const;
71 
74 
75  void set_country( unsigned short country );
76  unsigned short get_country() const;
77 
78  void set_service( unsigned char service );
79  unsigned char get_service() const;
80 
81  void set_patch( unsigned short patch );
82  unsigned short get_patch() const;
83 
85 
86 public:
87 
89  static const diguyPatchIdentifier& nullIdentifier();
90 
93 public:
94 
95 #ifdef CPLUSPLUS_ONLY
96 
97  bdiPatchIdentifier* get_scripted_object() { return m_scripted_object; }
98  const bdiPatchIdentifier* get_scripted_object() const { return m_scripted_object; }
99 
100 private:
101 
103  diguyPatchIdentifier( bdiPatchIdentifier* scripted_object );
104 
106  bdiPatchIdentifier* m_scripted_object;
107  bool m_own_scripted_object;
109  friend class bdiPatchIdentifier;
110 
111 #endif
112 
113 };
This class represents the patch identifier (country:service:id) for a patch.
Definition: diguyPatchIdentifier.h:26
const bdiPatchIdentifier * get_scripted_object() const
Definition: diguyPatchIdentifier.h:97