OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimSupportFilesList.cpp
Go to the documentation of this file.
1 //**************************************************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: LGPL
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Author: Oscar Kramer
9 //
10 // Description: Singleton class for logging all support data files opened during a session.
11 //
12 //**************************************************************************************************
13 // $Id$
14 
17 
19 
20 //*************************************************************************************************
21 // Implements singleton pattern
22 //*************************************************************************************************
24 {
25  if (!m_instance)
27 
28  return m_instance;
29 }
30 
31 //*************************************************************************************************
32 // Saves the list to a KWL
33 //*************************************************************************************************
34 void ossimSupportFilesList::save(ossimKeywordlist& kwl, const char* prefix) const
35 {
36  ossimString baseName ("support_file");
37  for (unsigned int i=0; i< (unsigned int) m_list.size(); i++)
38  {
39  ossimString key = baseName + ossimString::toString(i);
40  kwl.add(prefix, key.chars(), m_list[i]);
41  }
42 }
Represents serializable keyword/value map.
std::vector< ossimFilename > m_list
static ossimString toString(bool aValue)
Numeric to string methods.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
Singleton class for logging all support data files opened during a session.
const char * chars() const
For backward compatibility.
Definition: ossimString.h:77
void save(ossimKeywordlist &kwl, const char *prefix) const
Output list to the kwl.
static ossimSupportFilesList * instance()
static ossimSupportFilesList * m_instance