bes  Updated for version 3.20.6
BESContainerStorageVolatile.h
1 
2 // BESContainerStorageVolatile.h
3 
4 // This file is part of bes, A C++ back-end server implementation framework
5 // for the OPeNDAP Data Access Protocol.
6 
7 // Copyright (c) 2004-2009 University Corporation for Atmospheric Research
8 // Author: Patrick West <pwest@ucar.edu> and Jose Garcia <jgarcia@ucar.edu>
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 //
24 // You can contact University Corporation for Atmospheric Research at
25 // 3080 Center Green Drive, Boulder, CO 80301
26 
27 // (c) COPYRIGHT University Corporation for Atmospheric Research 2004-2005
28 // Please read the full copyright statement in the file COPYRIGHT_UCAR.
29 //
30 // Authors:
31 // pwest Patrick West <pwest@ucar.edu>
32 // jgarcia Jose Garcia <jgarcia@ucar.edu>
33 
34 #ifndef BESContainerStorageVolatile_h_
35 #define BESContainerStorageVolatile_h_ 1
36 
37 #include <map>
38 #include <list>
39 #include <string>
40 #include <ostream>
41 
42 #include "BESContainerStorage.h"
43 
58 private:
59  std::map<std::string, BESContainer *> _container_list;
60 
61 protected:
62  std::string _root_dir;
63  bool _follow_sym_links;
64 
65  virtual void add_container(BESContainer *c);
66 public:
67  BESContainerStorageVolatile(const std::string &n);
68  virtual ~BESContainerStorageVolatile();
69 
70  typedef std::map<std::string, BESContainer *>::const_iterator Container_citer;
71  typedef std::map<std::string, BESContainer *>::iterator Container_iter;
72 
73  virtual BESContainer * look_for(const std::string &sym_name);
74  virtual void add_container(const std::string &sym_name, const std::string &real_name, const std::string &type);
75  virtual bool del_container(const std::string &s_name);
76  virtual bool del_containers();
77 
78  virtual bool isData(const std::string &inQuestion, std::list<std::string> &provides);
79 
80  virtual void show_containers(BESInfo &info);
81 
82  virtual void dump(std::ostream &strm) const;
83 };
84 
85 #endif // BESContainerStorageVolatile_h_
BESContainerStorageVolatile::isData
virtual bool isData(const std::string &inQuestion, std::list< std::string > &provides)
determine if the given container is data and what servies are available for it
Definition: BESContainerStorageVolatile.cc:250
BESContainerStorage
provides persistent storage for data storage information represented by a container.
Definition: BESContainerStorage.h:67
BESContainerStorageVolatile::dump
virtual void dump(std::ostream &strm) const
dumps information about this object
Definition: BESContainerStorageVolatile.cc:303
BESContainerStorageVolatile::add_container
virtual void add_container(BESContainer *c)
add the passed container to the list of containers in volatile storage
Definition: BESContainerStorageVolatile.cc:183
BESInfo
informational response object
Definition: BESInfo.h:63
BESContainerStorageVolatile::look_for
virtual BESContainer * look_for(const std::string &sym_name)
looks for the specified container using the symbolic name passed
Definition: BESContainerStorageVolatile.cc:98
BESContainerStorageVolatile::del_containers
virtual bool del_containers()
removes all container
Definition: BESContainerStorageVolatile.cc:230
BESContainerStorageVolatile
implementation of BESContainerStorage that stores containers in memory for the duration of this proce...
Definition: BESContainerStorageVolatile.h:57
BESContainerStorageVolatile::BESContainerStorageVolatile
BESContainerStorageVolatile(const std::string &n)
create an instance of this persistent store with the given name.
Definition: BESContainerStorageVolatile.cc:62
BESContainerStorageVolatile::show_containers
virtual void show_containers(BESInfo &info)
show information for each container in this persistent store
Definition: BESContainerStorageVolatile.cc:276
BESContainer
A container is something that holds data. E.G., a netcdf file or a database entry.
Definition: BESContainer.h:65
BESContainerStorageVolatile::del_container
virtual bool del_container(const std::string &s_name)
removes a container with the given symbolic name from the list and deletes it.
Definition: BESContainerStorageVolatile.cc:208