1 #ifndef __GNUC__
2 #pragma once
3 #endif
4 #ifndef __XR_GUID_H__
5 #define __XR_GUID_H__
6 
7 #include <cstring>
8 #include "xr_types.h"
9 
10 namespace xray_re {
11 
12 class xr_reader;
13 class xr_writer;
14 
15 struct xr_guid {
16 	void		reset();
17 	bool		operator==(const xr_guid& right) const;
18 	bool		operator!=(const xr_guid& right) const;
19 
20 	void		load(xr_reader& r);
21 	void		save(xr_writer& w) const;
22 
23 	uint32_t	g[4];
24 };
25 
reset()26 inline void xr_guid::reset() { std::memset(g, 0x55, sizeof(g)); }
27 inline bool xr_guid::operator==(const xr_guid& right) const { return std::memcmp(g, right.g, sizeof(g)) == 0; }
28 inline bool xr_guid::operator!=(const xr_guid& right) const { return !(*this == right); }
29 
30 } // end of namespace xray_re
31 
32 #endif
33