OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimRpfFrameEntry.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: LGPL
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author: Garrett Potts
8 //
9 // Description: Rpf support class
10 //
11 //********************************************************************
12 // $Id: ossimRpfFrameEntry.cpp 18052 2010-09-06 14:33:08Z dburken $
13 
14 #include <ostream>
16 
18 {
19  return data.print(out);
20 }
21 
23  const ossimFilename& pathToFrameFileFromRoot)
24  :m_exists(false),
25  m_rootDirectory(rootDirectory),
26  m_pathToFrameFileFromRoot(pathToFrameFileFromRoot),
27  m_fullValidPath()
28 {
29  setEntry(rootDirectory,
30  pathToFrameFileFromRoot);
31 }
32 
34  :m_exists(obj.m_exists),
35  m_rootDirectory(obj.m_rootDirectory),
36  m_pathToFrameFileFromRoot(obj.m_pathToFrameFileFromRoot),
37  m_fullValidPath(obj.m_fullValidPath)
38 {}
39 
41 {
42  if (this != &rhs)
43  {
44  m_exists = rhs.m_exists;
48  }
49  return *this;
50 }
51 
52 void ossimRpfFrameEntry::setEntry(const ossimFilename& rootDirectory,
53  const ossimFilename& pathToFrameFileFromRoot)
54 {
55  //---
56  // We must check for case combinations:
57  //---
58  m_rootDirectory = rootDirectory;
59  m_pathToFrameFileFromRoot = pathToFrameFileFromRoot;
61 
62  // Check as supplied:
64  {
65  m_exists = true;
66  }
67  else // Check root/downcased_path
68  {
71 
73  {
74  m_exists = true;
75  }
76  else // Check root/upcased_path
77  {
82  {
83  m_exists = true;
84  }
85  else
86  {
87  m_pathToFrameFileFromRoot = pathToFrameFileFromRoot;
90  m_exists = false;
91  }
92  }
93  }
94 }
96  std::ostream& out, const std::string& prefix) const
97 {
98  out << prefix << "exists: " << m_exists << "\n"
99  << prefix << "root_directory: " << m_rootDirectory << "\n"
100  << prefix << "relative_path: "
101  << m_pathToFrameFileFromRoot << "\n"
102  << prefix << "full_path: " << m_fullValidPath << "\n";
103 
104  return out;
105 }
106 
108 {
109  return m_exists;
110 }
111 
113 {
114  return m_fullValidPath;
115 }
116 
118 {
119  return m_rootDirectory;
120 }
121 
123 {
125 }
ossimFilename m_pathToFrameFileFromRoot
static ossimString upcase(const ossimString &aString)
Definition: ossimString.cpp:34
std::ostream & operator<<(std::ostream &out, const ossimRpfFrameEntry &data)
const ossimString getPathToFrameFileFromRoot() const
const ossimString & getRootDirectory() const
std::ostream & print(std::ostream &out, const std::string &prefix=std::string()) const
print method that outputs a key/value type format adding prefix to keys.
bool exists() const
void setEntry(const ossimFilename &rootDirectory, const ossimFilename &pathToFrameFileFromRoot)
ossimFilename m_fullValidPath
ossimRpfFrameEntry(const ossimFilename &rootDirectory=ossimFilename(""), const ossimFilename &pathToFrameFileFromRoot=ossimFilename(""))
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
ossimFilename m_rootDirectory
ossimFilename dirCat(const ossimFilename &file) const
const ossimRpfFrameEntry & operator=(const ossimRpfFrameEntry &rhs)
operator=
const ossimFilename & getFullPath() const
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23