tools/navgenproj/ProjExclusiveGuids.h Source File

ProjExclusiveGuids.h
Go to the documentation of this file.
1 /*
2 * Copyright 2017 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 #pragma once
8 
9 #include "navgenproj/ProjTypes.h"
12 
13 namespace Kaim
14 {
15 
16 class ProjExclusiveGuids
17 {
18 public:
19  KyArray<KyGuid> m_guids;
20 };
21 
22 
23 inline bool Read(XmlNode node, ProjExclusiveGuids& value)
24 {
25  for (XmlNode child = node.FirstChild(); child; child = child.NextSibling())
26  {
27  if (child.HasName("guid") == false)
28  return false;
29 
30  Kaim::KyGuid guid;
31  if (child.ReadNode(guid) == false)
32  return false;
33 
34  value.m_guids.PushBack(guid);
35  }
36  return true;
37 }
38 
39 inline void Write(XmlNode node, const ProjExclusiveGuids& value)
40 {
41  for (KyUInt32 i = 0; i < value.m_guids.GetCount(); ++i)
42  node.WriteChild("guid", value.m_guids[i]);
43 }
44 
45 }
46 
47 
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
The KyGuid class represents a globally unique ID.
Definition: kyguid.h:20