3 #ifndef AWKWARD_RECORDTYPE_H_ 4 #define AWKWARD_RECORDTYPE_H_ 34 const std::string& typestr,
35 const std::vector<TypePtr>& types,
43 const std::string& typestr,
44 const std::vector<TypePtr>& types);
47 const std::vector<TypePtr>
63 tostring_part(
const std::string& indent,
64 const std::string& pre,
65 const std::string& post)
const override;
68 shallow_copy()
const override;
71 equal(
const TypePtr& other,
bool check_parameters)
const override;
74 numfields()
const override;
80 key(int64_t fieldindex)
const override;
83 haskey(
const std::string& key)
const override;
85 const std::vector<std::string>
86 keys()
const override;
89 empty()
const override;
95 field(int64_t fieldindex)
const;
101 field(
const std::string& key)
const;
106 const std::vector<TypePtr>
110 const std::vector<std::pair<std::string, TypePtr>>
120 const std::vector<TypePtr> types_;
126 #endif // AWKWARD_RECORDTYPE_H_ Describes the high level type of data containing tuples or records.
Definition: RecordType.h:20
#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
Abstract superclass of all high level types (flat hierarchy).
Definition: Type.h:23
const std::vector< std::string > keys(const RecordLookupPtr &recordlookup, int64_t numfields)
Returns a given RecordLookup as keys or generate anonymous ones form a number of fields.
std::map< std::string, std::string > Parameters
Definition: util.h:165
int64_t fieldindex(const RecordLookupPtr &recordlookup, const std::string &key, int64_t numfields)
Returns the field index associated with a key, given a RecordLookup and a number of fields...
bool haskey(const RecordLookupPtr &recordlookup, const std::string &key, int64_t numfields)
Returns true if a RecordLookup has a given key; false otherwise.
std::shared_ptr< Type > TypePtr
Definition: Content.h:23
std::shared_ptr< RecordLookup > RecordLookupPtr
Definition: util.h:130
std::shared_ptr< Content > ContentPtr
Definition: ArrayBuilder.h:16