VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtPagePath.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #include <vrvCore/vrvCore.h>
13 #include <string>
14 
15 namespace makVrv
16 {
22  {
23  public:
24 
28  {
29  public:
30  friend class DtPagePath;
31 
33  PagePathBuilder container(const std::string& name) const;
34 
37  DtPagePath page(const std::string& name) const;
38 
39  protected:
40 
42  inline const std::string& path() const { return myPath; }
43 
46  PagePathBuilder(const std::string& name);
47 
48  std::string myPath;
49  };
50 
53  DtPagePath();
54 
56  DtPagePath(const PagePathBuilder& builder);
57 
59  DtPagePath(const DtPagePath& copy);
60 
62  static DtPagePath empty();
63 
65  static DtPagePath root();
66 
68  static PagePathBuilder collection(const std::string& name);
69 
71  inline const std::string& path() const { return myPath; }
72 
75  DtPagePath collectionPart() const;
76 
79  std::string name() const;
80 
82  bool isEmpty() const;
83 
85  bool isCollection() const;
86 
88  bool isPage() const;
89 
91  bool isChildOf(const DtPagePath& parent) const;
92 
94  bool isSiblingOf(const DtPagePath& sibling) const;
95 
97  bool operator ==(const DtPagePath& other) const;
98 
100  bool operator <(const DtPagePath& other) const;
101 
103  bool operator !=(const DtPagePath& other) const;
104 
106 
107  protected:
108 
110  template<class Archive>
111  void _serialize(Archive & ar, const unsigned int version)
112  {
113  ar & DT_SERIALIZE_MEMBER(myPath);
114  }
115 
118  DtPagePath(const std::string& path);
119 
121  std::string myPath;
122  };
123 }
void _serialize(Archive &ar, const unsigned int version)
Serialize this class.
Definition: DtPagePath.h:111
const std::string & path() const
Access the path.
Definition: DtPagePath.h:42
#define DT_DECLARE_serialize_FUNCTIONS
Declare all the serialize functions to use.
Definition: DtSerialize.h:120
const std::string & path() const
Get the current path.
Definition: DtPagePath.h:71
std::string myPath
Definition: DtPagePath.h:48
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Internal class used to ensure that it is not possible to incorrectly build a menu path...
Definition: DtPagePath.h:27
A page path is the location of a page based upon its parents. A page path usually only consists of a ...
Definition: DtPagePath.h:21
bool operator==(const DtTextureAtlasIndexParser::StringOrFloatAttrib &lhs, const DtTextureAtlasIndexParser::StringOrFloatAttrib &rhs)
needed for search comparison code
Definition: DtTextureAtlasIndexParser.h:153
std::string myPath
Internal path.
Definition: DtPagePath.h:121
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
#define DT_SERIALIZE_MEMBER(NAME)
Serialize a Member whose name starts with &#39;my&#39; If your member does not have that name, use Dt_SERIALIZE.
Definition: DtSerialize.h:158
Contains DLL export macros.

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)