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.

Data.h 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 03/01/2010
  9. @version $Id: data.h 193 2014-11-10 23:51:41Z tirons $
  10. **/
  11. #ifndef _DATA_H_INC
  12. #define _DATA_H_INC
  13. #include "LemmaObject.h"
  14. namespace Lemma {
  15. // ===================================================================
  16. // Class: Data
  17. /** \brief Abstract class for data from an instrument
  18. * \details Currently provides no functionality, but this will likely
  19. * change in the near future.
  20. */
  21. // ===================================================================
  22. class Data : public LemmaObject {
  23. friend std::ostream &operator<<(std::ostream &stream,
  24. const Data &ob);
  25. public:
  26. // ==================== LIFECYCLE =======================
  27. /** Copies the *structure* of this class to a new object and
  28. * returns a pointer to this object. Memory management is
  29. * the responsibility of the receiver!. The data values are
  30. * not copied.
  31. */
  32. virtual Data* Clone()=0;
  33. // ==================== OPERATORS =======================
  34. // ==================== OPERATIONS =======================
  35. /** Clears all data arrays and containers
  36. */
  37. virtual void Zero()=0;
  38. /** Data2 needs to be compatible with the calling class. Data2 will
  39. * be cast into the calling class type. Most of the time this
  40. * cast will not perform anything, as Data2 *is* the same type
  41. * as the calling class.
  42. */
  43. virtual Real Norm(Data* Data2)=0;
  44. // ==================== ACCESS =======================
  45. // ==================== INQUIRY =======================
  46. protected:
  47. // ==================== LIFECYCLE =======================
  48. /** Default protected constructor. */
  49. Data (const std::string &name);
  50. /** Default protected constructor. */
  51. ~Data ();
  52. // ==================== DATA MEMBERS =========================
  53. private:
  54. }; // ----- end of class Data -----
  55. } // ----- end of Lemma name -----
  56. #endif // ----- #ifndef _DATA_H_INC -----
  57. /* vim: set tabstop=4 expandtab: */
  58. /* vim: set filetype=cpp: */