VR-Forces 4.8 Class Documentation
 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 /******************************************************************************
6 ** $RCSfile: $ $Revision: $ $State: $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 #include <vrvCore/vrvCore.h>
16 #include <string>
17 
18 namespace makVrv
19 {
25  {
26  public:
27 
31  {
32  public:
33  friend class DtPagePath;
34 
36  PagePathBuilder container(const std::string& name) const;
37 
40  DtPagePath page(const std::string& name) const;
41 
42  protected:
43 
45  inline const std::string& path() const { return myPath; }
46 
49  PagePathBuilder(const std::string& name);
50 
51  std::string myPath;
52  };
53 
56  DtPagePath();
57 
59  DtPagePath(const PagePathBuilder& builder);
60 
62  DtPagePath(const DtPagePath& copy);
63 
65  static DtPagePath empty();
66 
68  static DtPagePath root();
69 
71  static PagePathBuilder collection(const std::string& name);
72 
74  inline const std::string& path() const { return myPath; }
75 
78  DtPagePath collectionPart() const;
79 
82  std::string name() const;
83 
85  bool isEmpty() const;
86 
88  bool isCollection() const;
89 
91  bool isPage() const;
92 
94  bool isChildOf(const DtPagePath& parent) const;
95 
97  bool isSiblingOf(const DtPagePath& sibling) const;
98 
100  bool operator ==(const DtPagePath& other) const;
101 
103  bool operator <(const DtPagePath& other) const;
104 
106  bool operator !=(const DtPagePath& other) const;
107 
109 
110  protected:
111 
113  template<class Archive>
114  void _serialize(Archive & ar, const unsigned int version)
115  {
116  ar & DT_SERIALIZE_MEMBER(myPath);
117  }
118 
121  DtPagePath(const std::string& path);
122 
124  std::string myPath;
125  };
126 }
void _serialize(Archive &ar, const unsigned int version)
Serialize this class.
Definition: DtPagePath.h:114
const std::string & path() const
Access the path.
Definition: DtPagePath.h:45
#define DT_DECLARE_serialize_FUNCTIONS
Declare all the serialize functions to use.
Definition: DtSerialize.h:123
const std::string & path() const
Get the current path.
Definition: DtPagePath.h:74
std::string myPath
Definition: DtPagePath.h:51
#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:30
A page path is the location of a page based upon its parents.
Definition: DtPagePath.h:24
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:124
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:161
Contains DLL export macros.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)