123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- /* This file is part of Lemma, a geophysical modelling and inversion API.
- * More information is available at http://lemmasoftware.org
- */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
- /**
- * @file
- * @date 08/28/2017 09:03:03 AM
- * @version $Id$
- * @author Trevor Irons (ti)
- * @email tirons@egi.utah.edu
- * @copyright Copyright (c) 2017, University of Utah
- * @copyright Copyright (c) 2017, Lemma Software, LLC
- */
-
- #include "ForwardFID.h"
-
- namespace Lemma {
-
- // ==================== FRIEND METHODS =====================
-
- std::ostream &operator << (std::ostream &stream, const ForwardFID &ob) {
- stream << ob.Serialize() << "\n---\n"; // End of doc ---
- return stream;
- }
-
- // ==================== LIFECYCLE =======================
-
- //--------------------------------------------------------------------------------------
- // Class: ForwardFID
- // Method: ForwardFID
- // Description: constructor (locked)
- //--------------------------------------------------------------------------------------
- ForwardFID::ForwardFID (const ctor_key&) : MerlinObject( ) {
-
- } // ----- end of method ForwardFID::ForwardFID (constructor) -----
-
- //--------------------------------------------------------------------------------------
- // Class: ForwardFID
- // Method: ForwardFID
- // Description: DeSerializing constructor (locked)
- //--------------------------------------------------------------------------------------
- ForwardFID::ForwardFID (const YAML::Node& node, const ctor_key&) : MerlinObject(node) {
-
- } // ----- end of method ForwardFID::ForwardFID (constructor) -----
-
- //--------------------------------------------------------------------------------------
- // Class: ForwardFID
- // Method: NewSP()
- // Description: public constructor returing a shared_ptr
- //--------------------------------------------------------------------------------------
- std::shared_ptr< ForwardFID > ForwardFID::NewSP() {
- return std::make_shared< ForwardFID >( ctor_key() );
- }
-
- //--------------------------------------------------------------------------------------
- // Class: ForwardFID
- // Method: ~ForwardFID
- // Description: destructor (protected)
- //--------------------------------------------------------------------------------------
- ForwardFID::~ForwardFID () {
-
- } // ----- end of method ForwardFID::~ForwardFID (destructor) -----
-
- //--------------------------------------------------------------------------------------
- // Class: ForwardFID
- // Method: Serialize
- //--------------------------------------------------------------------------------------
- YAML::Node ForwardFID::Serialize ( ) const {
- YAML::Node node = MerlinObject::Serialize();
- node.SetTag( GetName() );
- // FILL IN CLASS SPECIFICS HERE
- if (Kernel != nullptr) {
- node["Kernel"] = Kernel->Serialize();
- }
- node["WindowEdges"] = WindowEdges;
- node["WindowCentres"] = WindowCentres;
- node["RDP"] = RDP;
- return node;
- } // ----- end of method ForwardFID::Serialize -----
-
- //--------------------------------------------------------------------------------------
- // Class: ForwardFID
- // Method: DeSerialize
- //--------------------------------------------------------------------------------------
- std::shared_ptr<ForwardFID> ForwardFID::DeSerialize ( const YAML::Node& node ) {
- if (node.Tag() != "ForwardFID" ) {
- throw DeSerializeTypeMismatch( "ForwardFID", node.Tag());
- }
- return std::make_shared< ForwardFID > ( node, ctor_key() );
- } // ----- end of method ForwardFID::DeSerialize -----
-
-
- //--------------------------------------------------------------------------------------
- // Class: ForwardFID
- // Method: SetWindowEdges
- //--------------------------------------------------------------------------------------
- void ForwardFID::SetWindowEdges ( const VectorXr& Edges ) {
- WindowEdges = Edges;
- return ;
- } // ----- end of method ForwardFID::SetWindowEdges -----
-
-
- //--------------------------------------------------------------------------------------
- // Class: ForwardFID
- // Method: ForwardModel
- //--------------------------------------------------------------------------------------
- std::shared_ptr<DataFID> ForwardFID::ForwardModel ( ) {
- auto FID = DataFID::NewSP();
- return FID;
- } // ----- end of method ForwardFID::ForwardModel -----
-
-
- } // ---- end of namespace Lemma ----
-
- /* vim: set tabstop=4 expandtab: */
- /* vim: set filetype=cpp: */
-
|