Lemma is an Electromagnetics API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TEMInductiveReceiver.cpp 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /* This file is part of Lemma, a geophysical modelling and inversion API.
  2. * More information is available at http://lemmasoftware.org
  3. */
  4. /* This Source Code Form is subject to the terms of the Mozilla Public
  5. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7. */
  8. /**
  9. * @file
  10. * @date 10/08/2014 03:19:58 PM
  11. * @version $Id$
  12. * @author Trevor Irons (ti)
  13. * @email Trevor.Irons@xri-geo.com
  14. * @copyright Copyright (c) 2014, XRI Geophysics, LLC
  15. * @copyright Copyright (c) 2014, Trevor Irons
  16. */
  17. #include "TEMInductiveReceiver.h"
  18. namespace Lemma {
  19. // ==================== FRIEND METHODS =====================
  20. std::ostream &operator << (std::ostream &stream, const TEMInductiveReceiver &ob) {
  21. stream << ob.Serialize() << "\n";
  22. return stream;
  23. }
  24. // ==================== LIFECYCLE =======================
  25. //--------------------------------------------------------------------------------------
  26. // Class: TEMInductiveReceiver
  27. // Method: TEMInductiveReceiver
  28. // Description: constructor (protected)
  29. //--------------------------------------------------------------------------------------
  30. TEMInductiveReceiver::TEMInductiveReceiver (const ctor_key& key) : TEMReceiver(key) {
  31. } // ----- end of method TEMInductiveReceiver::TEMInductiveReceiver (constructor) -----
  32. //--------------------------------------------------------------------------------------
  33. // Class: TEMInductiveReceiver
  34. // Method: TEMInductiveReceiver
  35. // Description: constructor (protected)
  36. //--------------------------------------------------------------------------------------
  37. TEMInductiveReceiver::TEMInductiveReceiver (const YAML::Node& node, const ctor_key& key) : TEMReceiver(node, key) {
  38. } // ----- end of method TEMInductiveReceiver::TEMInductiveReceiver (constructor) -----
  39. //--------------------------------------------------------------------------------------
  40. // Class: TEMInductiveReceiver
  41. // Method: New()
  42. // Description: public constructor
  43. //--------------------------------------------------------------------------------------
  44. std::shared_ptr<TEMInductiveReceiver> TEMInductiveReceiver::NewSP() {
  45. return std::make_shared<TEMInductiveReceiver>( ctor_key() );
  46. }
  47. //--------------------------------------------------------------------------------------
  48. // Class: TEMInductiveReceiver
  49. // Method: ~TEMInductiveReceiver
  50. // Description: destructor (protected)
  51. //--------------------------------------------------------------------------------------
  52. TEMInductiveReceiver::~TEMInductiveReceiver () {
  53. } // ----- end of method TEMInductiveReceiver::~TEMInductiveReceiver (destructor) -----
  54. //--------------------------------------------------------------------------------------
  55. // Class: TEMInductiveReceiver
  56. // Method: Serialize
  57. //--------------------------------------------------------------------------------------
  58. YAML::Node TEMInductiveReceiver::Serialize ( ) const {
  59. YAML::Node node;
  60. node = TEMReceiver::Serialize();
  61. node.SetTag( this->GetName() ); // Set Tag after doing parents
  62. return node;
  63. } // ----- end of method TEMInductiveReceiver::Serialize -----
  64. //--------------------------------------------------------------------------------------
  65. // Class: TEMInductiveReceiver
  66. // Method: DeSerialize
  67. //--------------------------------------------------------------------------------------
  68. std::shared_ptr<TEMInductiveReceiver> TEMInductiveReceiver::DeSerialize ( const YAML::Node& node ) {
  69. if (node.Tag() != CName) {
  70. throw DeSerializeTypeMismatch( CName, node.Tag());
  71. }
  72. return std::make_shared<TEMInductiveReceiver>(node, ctor_key());
  73. } // ----- end of method TEMInductiveReceiver::DeSerialize -----
  74. } // ----- end of Lemma name -----