Main Lemma Repository
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Instrument.h 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* This file is part of Lemma, a geophysical modelling and inversion API */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. /**
  6. @file
  7. @author Trevor Irons
  8. @date 02/05/2010
  9. @version $Id: instrument.h 193 2014-11-10 23:51:41Z tirons $
  10. **/
  11. #ifndef __INSTRUMENT_H
  12. #define __INSTRUMENT_H
  13. #include "LemmaObject.h"
  14. namespace Lemma {
  15. // =======================================================================
  16. // Class: Instrument
  17. /// \ingroup LemmaCore
  18. /// \brief Abstract class for instruments
  19. /// \details
  20. // =======================================================================
  21. class Instrument : public LemmaObject {
  22. friend std::ostream &operator<<(std::ostream &stream,
  23. const Instrument &ob);
  24. public:
  25. // ==================== LIFECYCLE ===========================
  26. /**
  27. * Uses YAML to serialize this object.
  28. * @return a YAML::Node
  29. */
  30. YAML::Node Serialize() const;
  31. // ==================== OPERATORS ===========================
  32. // ==================== OPERATIONS ===========================
  33. //virtual void ForwardModelOnOctreeMesh()=0;
  34. // ==================== ACCESS ===========================
  35. // ==================== INQUIRY ===========================
  36. /** Returns the name of the underlying class, similiar to Python's type */
  37. virtual std::string GetName() const = 0;
  38. // ==================== DATA MEMBERS ===========================
  39. protected:
  40. // ==================== LIFECYCLE ===========================
  41. /// Default protected constructor.
  42. Instrument ( const YAML::Node& node );
  43. /// Default protected constructor.
  44. Instrument ( );
  45. /// Default protected constructor.
  46. ~Instrument ();
  47. private:
  48. /** ASCII string representation of the class name */
  49. static constexpr auto CName = "Instrument";
  50. }; // ----- end of class Instrument -----
  51. } // ----- end of Lemma name -----
  52. #endif // __INSTRUMENT_H