Lemma is an Electromagnetics API
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

TEMSurveyLine.h 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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/10/2014 11:14:39 AM
  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. #ifndef TEMSURVEYLINE_INC
  18. #define TEMSURVEYLINE_INC
  19. #include "LemmaObject.h"
  20. #include "TEMSurveyLineRecord.h"
  21. #include "TEMSurveyLineData.h"
  22. namespace Lemma {
  23. /**
  24. \brief Represents a TEM survey line.
  25. \details This class is managed by TEMSurvey. You cannot create a TEMSurvey line directly
  26. this should be done through a TEMSurvey.
  27. @todo neeed to impliment a BaseClass besides LemmaObject without pure virtual Delete.
  28. */
  29. class TEMSurveyLine : public LemmaObject {
  30. friend std::ostream &operator<<(std::ostream &stream,
  31. const TEMSurveyLine &ob);
  32. friend class TEMSurvey;
  33. public:
  34. // ==================== LIFECYCLE =======================
  35. // ==================== OPERATORS =======================
  36. // ==================== OPERATIONS =======================
  37. // ==================== ACCESS =======================
  38. /**
  39. @return returns pointer to a specific record along the line
  40. */
  41. TEMSurveyLineRecord* GetRecord(const unsigned int& irec);
  42. /**
  43. @param[in] nrec is the number of records along the line
  44. */
  45. void SetNumberOfRecords( const int& nrec );
  46. // ==================== INQUIRY =======================
  47. #ifdef HAVE_YAMLCPP
  48. /**
  49. * Uses YAML to serialize this object.
  50. * @return a YAML::Node
  51. */
  52. YAML::Node Serialize() const;
  53. /**
  54. * Constructs an object from a YAML::Node.
  55. */
  56. static TEMSurveyLine* DeSerialize(const YAML::Node& node);
  57. #endif
  58. protected:
  59. TEMSurveyLineData* ForwardModel(LayeredEarthEM* model, bool additiveNoise = false);
  60. // ==================== LIFECYCLE =======================
  61. /** Default protected constructor, use New */
  62. TEMSurveyLine (const std::string& name);
  63. #ifdef HAVE_YAMLCPP
  64. /** Protected DeDerializing constructor, use factory DeSerialize method*/
  65. TEMSurveyLine (const YAML::Node& node);
  66. #endif
  67. /** Default protected destructor, use Delete */
  68. ~TEMSurveyLine ();
  69. /**
  70. * @copybrief LemmaObject::Release()
  71. * @copydetails LemmaObject::Release()
  72. */
  73. void Release();
  74. private:
  75. /**
  76. * Delete should not be called...
  77. */
  78. void Delete();
  79. // ==================== DATA MEMBERS =========================
  80. std::vector<TEMSurveyLineRecord*> Records;
  81. }; // ----- end of class TEMSurveyLine -----
  82. } // ----- end of Lemma name -----
  83. #endif // ----- #ifndef TEMSURVEYLINE_INC -----