Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
source
algorithms
general_data_storage.cc
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
17
#include <deal.II/algorithms/general_data_storage.h>
18
19
20
DEAL_II_NAMESPACE_OPEN
21
22
23
std::size_t
24
GeneralDataStorage::size
()
const
25
{
26
return
any_data
.size();
27
}
28
29
30
void
31
GeneralDataStorage::merge
(
const
GeneralDataStorage
&other)
32
{
33
any_data
.insert(other.
any_data
.begin(), other.
any_data
.end());
34
}
35
36
37
void
38
GeneralDataStorage::reset
()
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
52
GeneralDataStorage::remove_object_with_name
(
const
std::string &name)
53
{
54
const
auto
it =
any_data
.find(name);
55
if
(it !=
any_data
.end())
56
any_data
.erase(it);
57
}
58
59
60
61
DEAL_II_NAMESPACE_CLOSE
GeneralDataStorage
Definition:
general_data_storage.h:56
GeneralDataStorage::size
std::size_t size() const
Definition:
general_data_storage.cc:24
GeneralDataStorage::stores_object_with_name
bool stores_object_with_name(const std::string &name) const
Definition:
general_data_storage.cc:45
GeneralDataStorage::any_data
std::map< std::string, boost::any > any_data
Definition:
general_data_storage.h:340
GeneralDataStorage::merge
void merge(const GeneralDataStorage &other_data)
Definition:
general_data_storage.cc:31
GeneralDataStorage::reset
void reset()
Definition:
general_data_storage.cc:38
GeneralDataStorage::remove_object_with_name
void remove_object_with_name(const std::string &name)
Definition:
general_data_storage.cc:52
Generated by
1.8.14