aboutsummaryrefslogtreecommitdiff
path: root/src/environment.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2018-12-11 07:42:05 +0100
committerFelix Morgner <felix.morgner@gmail.com>2018-12-11 07:42:05 +0100
commited419140280553b070943b7ba539120a26ff5686 (patch)
tree3d134977a6dfae71a45c318305166d044b50320d /src/environment.hpp
parentd3e691c9200b7b782c8acf17468068a699588a73 (diff)
downloadwanda-ed419140280553b070943b7ba539120a26ff5686.tar.xz
wanda-ed419140280553b070943b7ba539120a26ff5686.zip
wanda: restructure directory hierarchy
Diffstat (limited to 'src/environment.hpp')
-rw-r--r--src/environment.hpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/environment.hpp b/src/environment.hpp
deleted file mode 100644
index 5a702a8..0000000
--- a/src/environment.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * @file environment.hpp
- * @author Felix Morgner (felix.morgner@gmail.com)
- * @since 1.0.0
- */
-
-#ifndef WANDA_ENVIRONMENT_HPP
-#define WANDA_ENVIRONMENT_HPP
-
-#include <unistd.h>
-
-#include <map>
-#include <string>
-
-namespace wanda
-{
- /**
- * @brief A type to provide access to the runtime environment
- */
- struct environment
- {
- using map_type = std::map<std::string, std::string>;
- using iterator = map_type::iterator;
- using const_iterator = map_type::const_iterator;
- using reference = map_type::reference;
- using const_reference = map_type::const_reference;
-
- /**
- * @brief Construct a new environment from the given string array
- */
- explicit environment(char const * const * env = ::environ);
-
- /**
- * @brief Get the value of the given variable
- *
- * @return A mutable reference to the value of the given environment variable
- */
- std::string & operator[](std::string const & variable);
-
- /**
- * @brief Get the value of the given variable
- *
- * @return An immutable reference to the value of the given environment variable
- */
- std::string const & operator[](std::string const & variable) const;
-
- iterator begin();
- const_iterator begin() const;
- const_iterator cbegin() const;
-
- iterator end();
- const_iterator end() const;
- const_iterator cend() const;
-
- private:
- map_type m_cache{};
- };
-
-} // namespace wanda
-
-#endif \ No newline at end of file