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.

DataReader.h 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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: datareader.h 193 2014-11-10 23:51:41Z tirons $
  10. **/
  11. #ifndef DATAREADER_H_INC
  12. #define DATAREADER_H_INC
  13. #include "LemmaObject.h"
  14. #include "Data.h"
  15. namespace Lemma {
  16. // ===================================================================
  17. // Class: DataReader
  18. /// \ingroup LemmaCore
  19. /// \brief Abstract class whose derived members read data files and
  20. /// converts them to Data Classes
  21. /// \details
  22. // ===================================================================
  23. class DataReader : public LemmaObject {
  24. friend std::ostream &operator<<(std::ostream &stream,
  25. const DataReader &ob);
  26. public:
  27. // ==================== LIFECYCLE =======================
  28. // ==================== OPERATORS =======================
  29. // ==================== OPERATIONS =======================
  30. // ==================== ACCESS =======================
  31. virtual Data* GetData()=0;
  32. // ==================== INQUIRY =======================
  33. /** Returns the name of the underlying class, similiar to Python's type */
  34. virtual inline std::string GetName() const {
  35. return CName;
  36. }
  37. protected:
  38. // ==================== LIFECYCLE =======================
  39. /// Default protected constructor.
  40. DataReader ( );
  41. /// Default protected constructor.
  42. ~DataReader ( );
  43. // ==================== DATA MEMBERS =========================
  44. private:
  45. /** ASCII string representation of the class name */
  46. static constexpr auto CName = "DataReader";
  47. }; // ----- end of class DataReader -----
  48. } // ----- end of Lemma name -----
  49. #endif // ----- #ifndef DATAREADER_H_INC -----
  50. /* vim: set tabstop=4 expandtab: */
  51. /* vim: set filetype=cpp: */