Main Lemma Repository
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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 03/03/2015 10:16:47
  11. * @version $Id$
  12. * @author Trevor Irons (ti)
  13. * @email Trevor.Irons@xri-geo.com
  14. * @copyright Copyright (c) 2015, XRI Geophysics, LLC
  15. * @copyright Copyright (c) 2015, Trevor Irons
  16. */
  17. #ifndef TEMSURVEYLINEDATA_INC
  18. #define TEMSURVEYLINEDATA_INC
  19. #include "LemmaObject.h"
  20. #include "TEMSurveyLineRecordData.h"
  21. namespace Lemma {
  22. /**
  23. \brief Holds Data for a TEM survey line
  24. \details An entire flight line worth of data is stored here.
  25. */
  26. class TEMSurveyLineData : public LemmaObject {
  27. friend std::ostream &operator<<(std::ostream &stream,
  28. const TEMSurveyLineData &ob);
  29. //friend class TEMSurveyData;
  30. friend class TEMSurveyLine;
  31. public:
  32. // ==================== LIFECYCLE =======================
  33. /**
  34. * @copybrief LemmaObject::New()
  35. * @copydetails LemmaObject::New()
  36. */
  37. static TEMSurveyLineData* New();
  38. /**
  39. * @return a deep copy of this, this is acomplished through Serialize
  40. * and DeSerialize methods.
  41. */
  42. TEMSurveyLineData* Clone();
  43. /**
  44. * @copybrief LemmaObject::Delete()
  45. * @copydetails LemmaObject::Delete()
  46. */
  47. void Delete();
  48. // ==================== OPERATORS =======================
  49. /** Survey lines can be added or subtracted from each other
  50. */
  51. TEMSurveyLineData* operator+(const TEMSurveyLineData& Survey);
  52. /** Survey lines can be added or subtracted from each other
  53. */
  54. TEMSurveyLineData* operator-(const TEMSurveyLineData& Survey);
  55. /** Survey lines can be added or subtracted from each other
  56. */
  57. void operator+=(const TEMSurveyLineData& Survey);
  58. /** Survey lines can be added or subtracted from each other
  59. */
  60. void operator-=(const TEMSurveyLineData& Survey);
  61. /** @param[in] ir the index to return
  62. * @return the SurveyLineRecord with index ir
  63. */
  64. TEMSurveyLineRecordData* operator( ) ( const int& ir ) const ;
  65. // ==================== OPERATIONS =======================
  66. // ==================== ACCESS =======================
  67. /**
  68. * @return pointer to specified record
  69. */
  70. TEMSurveyLineRecordData* GetRecord(const int& ir) const ;
  71. /**
  72. * @return the number of records
  73. */
  74. int GetNumberOfRecords() const;
  75. // ==================== INQUIRY =======================
  76. #ifdef HAVE_YAMLCPP
  77. /**
  78. * Uses YAML to serialize this object.
  79. * @return a YAML::Node
  80. */
  81. YAML::Node Serialize() const;
  82. /**
  83. * Constructs an object from a YAML::Node.
  84. */
  85. static TEMSurveyLineData* DeSerialize(const YAML::Node& node);
  86. #endif
  87. protected:
  88. // ==================== LIFECYCLE =======================
  89. /** Default protected constructor, use New */
  90. TEMSurveyLineData (const std::string& name);
  91. #ifdef HAVE_YAMLCPP
  92. /** Protected DeDerializing constructor, use factory DeSerialize method*/
  93. TEMSurveyLineData (const YAML::Node& node);
  94. #endif
  95. /** Default protected destructor, use Delete */
  96. ~TEMSurveyLineData ();
  97. /**
  98. * @copybrief LemmaObject::Release()
  99. * @copydetails LemmaObject::Release()
  100. */
  101. void Release();
  102. private:
  103. // ==================== DATA MEMBERS =========================
  104. std::vector<TEMSurveyLineRecordData*> RecordData;
  105. }; // ----- end of class TEMSurveyLineData -----
  106. } // ----- end of Lemma name -----
  107. #endif // ----- #ifndef TEMSURVEYLINEDATA_INC -----