ArrayCache.h
Go to the documentation of this file.
1 // BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
2 
3 #ifndef AWKWARD_ARRAYCACHE_H_
4 #define AWKWARD_ARRAYCACHE_H_
5 
6 #include "awkward/Content.h"
7 
8 namespace awkward {
18  public:
25  static const std::string
26  newkey();
27 
29  virtual ContentPtr
30  get(const std::string& key) const = 0;
31 
33  virtual void
34  set(const std::string& key, const ContentPtr& value) = 0;
35 
37  virtual bool
38  is_broken() const = 0;
39 
40  virtual const std::string
41  tostring_part(const std::string& indent,
42  const std::string& pre,
43  const std::string& post) const = 0;
44  };
45 
46  using ArrayCachePtr = std::shared_ptr<ArrayCache>;
47 
48  // Note: if you're creating a pure C++ cache (and it's not ridiculously
49  // large), define it in this file and implement it in
50  // src/libawkward/virtual/ArrayCache.cpp.
51 
52 }
53 
54 #endif // AWKWARD_ARRAYCACHE_H_
Abstract superclass of cache for VirtualArray, defining the interface.
Definition: ArrayCache.h:17
#define LIBAWKWARD_EXPORT_SYMBOL
Definition: common.h:45
const std::string key(const RecordLookupPtr &recordlookup, int64_t fieldindex, int64_t numfields)
Returns the key associated with a field index, given a RecordLookup and a number of fields...
Definition: BitMaskedArray.h:15
std::shared_ptr< ArrayCache > ArrayCachePtr
Definition: Content.h:21
Mapping::value_type::value_type value(Mapping a, const std::string &name)
Definition: datetime_util.h:49
std::shared_ptr< Content > ContentPtr
Definition: Content.h:15