From cc5b6fd2d1f66356f3b26486955d6ca6ea0e96c6 Mon Sep 17 00:00:00 2001
From: Walter Van Herck <w.van.herck@fz-juelich.de>
Date: Wed, 1 Feb 2017 17:05:17 +0100
Subject: [PATCH] New class for holding Fresnel maps of all layers

---
 Core/Computation/FullFresnelMap.cpp | 27 ++++++++++++++++++++++
 Core/Computation/FullFresnelMap.h   | 36 +++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 Core/Computation/FullFresnelMap.cpp
 create mode 100644 Core/Computation/FullFresnelMap.h

diff --git a/Core/Computation/FullFresnelMap.cpp b/Core/Computation/FullFresnelMap.cpp
new file mode 100644
index 00000000000..a6780eb9ce5
--- /dev/null
+++ b/Core/Computation/FullFresnelMap.cpp
@@ -0,0 +1,27 @@
+// ************************************************************************** //
+//
+//  BornAgain: simulate and fit scattering at grazing incidence
+//
+//! @file      Core/Computation/FullFresnelMap.cpp
+//! @brief     Implements class FullFresnelMap.
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2017
+//! @authors   Scientific Computing Group at MLZ Garching
+//! @authors   J. Burle, J. M. Fisher, M. Ganeva, G. Pospelov, W. Van Herck, J. Wuttke
+//
+// ************************************************************************** //
+
+#include "FullFresnelMap.h"
+#include "ILayerSpecularInfo.h"
+
+void FullFresnelMap::push_back(ILayerSpecularInfo* p_layer_map)
+{
+    m_full_map.push_back(p_layer_map);
+}
+
+const ILayerSpecularInfo*FullFresnelMap::layerFresnelMap(size_t index) const
+{
+    return m_full_map[index];
+}
diff --git a/Core/Computation/FullFresnelMap.h b/Core/Computation/FullFresnelMap.h
new file mode 100644
index 00000000000..fb27ad13634
--- /dev/null
+++ b/Core/Computation/FullFresnelMap.h
@@ -0,0 +1,36 @@
+// ************************************************************************** //
+//
+//  BornAgain: simulate and fit scattering at grazing incidence
+//
+//! @file      Core/Computation/FullFresnelMap.h
+//! @brief     Defines class FullFresnelMap.
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2017
+//! @authors   Scientific Computing Group at MLZ Garching
+//! @authors   J. Burle, J. M. Fisher, M. Ganeva, G. Pospelov, W. Van Herck, J. Wuttke
+//
+// ************************************************************************** //
+
+#ifndef FULLFRESNELMAP_H
+#define FULLFRESNELMAP_H
+
+#include "SafePointerVector.h"
+
+class ILayerSpecularInfo;
+
+class FullFresnelMap
+{
+public:
+    FullFresnelMap() {}
+    ~FullFresnelMap() {}
+
+    void push_back(ILayerSpecularInfo* layer_map);
+
+    const ILayerSpecularInfo* layerFresnelMap(size_t index) const;
+private:
+    SafePointerVector<ILayerSpecularInfo> m_full_map;
+};
+
+#endif // FULLFRESNELMAP_H
-- 
GitLab