Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
general_data_storage.cc
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2019 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 
18 
19 
21 
22 
23 std::size_t
25 {
26  return any_data.size();
27 }
28 
29 
30 void
32 {
33  any_data.insert(other.any_data.begin(), other.any_data.end());
34 }
35 
36 
37 void
39 {
40  any_data.clear();
41 }
42 
43 
44 bool
45 GeneralDataStorage::stores_object_with_name(const std::string &name) const
46 {
47  return any_data.find(name) != any_data.end();
48 }
49 
50 
51 void
53 {
54  const auto it = any_data.find(name);
55  if (it != any_data.end())
56  any_data.erase(it);
57 }
58 
59 
60 
GeneralDataStorage::remove_object_with_name
void remove_object_with_name(const std::string &name)
Definition: general_data_storage.cc:52
GeneralDataStorage
Definition: general_data_storage.h:56
GeneralDataStorage::any_data
std::map< std::string, boost::any > any_data
Definition: general_data_storage.h:340
GeneralDataStorage::stores_object_with_name
bool stores_object_with_name(const std::string &name) const
Definition: general_data_storage.cc:45
general_data_storage.h
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
GeneralDataStorage::merge
void merge(const GeneralDataStorage &other_data)
Definition: general_data_storage.cc:31
GeneralDataStorage::size
std::size_t size() const
Definition: general_data_storage.cc:24
GeneralDataStorage::reset
void reset()
Definition: general_data_storage.cc:38
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359