VR-Forces 4.6.1 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 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)