File: Loader.h

package info (click to toggle)
glgrib 1.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,861,496 kB
  • sloc: cpp: 20,811; ansic: 6,530; perl: 2,902; sh: 513; makefile: 147; python: 58; sql: 18
file content (49 lines) | stat: -rw-r--r-- 1,195 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once

#include <string>
#include <list>
#include <memory>

#include <eccodes.h>
#include "glGrib/FieldMetadata.h"
#include "glGrib/Buffer.h"
#include "glGrib/Handle.h"
#include "glGrib/Geometry.h"
#include "glGrib/Options.h"

namespace glGrib
{

class Loader 
{
public:
  static void uv2nd (const_GeometryPtr,
                     const BufferPtr<float>, 
                     const BufferPtr<float>,
                     BufferPtr<float> &, 
                     BufferPtr<float> &,
                     const FieldMetadata &, 
                     const FieldMetadata &,
                     FieldMetadata &, 
                     FieldMetadata &);

  HandlePtr handleFromFile (const std::string &);
  void load (BufferPtr<float> *, const std::vector<OptionFieldRef> &, const OptionsGeometry &, 
            float, FieldMetadata *, int = 1, int = 0, bool diff = false);
  void load (BufferPtr<float> *, const OptionFieldRef &, const OptionsGeometry &, FieldMetadata *);
  void setSize (size_t _size) { size = _size; }
private:
  size_t size = 0;

  class entry_t
  {
  public:
    std::string file;
    HandlePtr ghp;
  };

  typedef std::list<entry_t> cache_t;
  cache_t cache;
};

}