Avro C++

Compiler.hh
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * https://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 #ifndef avro_Compiler_hh__
20 #define avro_Compiler_hh__
21
22 #include "Config.hh"
23 #include <cstdint>
24 #include <istream>
25
26 namespace avro {
27
28 class AVRO_DECL InputStream;
29
34
35 class AVRO_DECL ValidSchema;
36
40
41 AVRO_DECL void compileJsonSchema(std::istream &is, ValidSchema &schema);
42
47
48 AVRO_DECL bool compileJsonSchema(std::istream &is, ValidSchema &schema,
49 std::string &error);
50
51 AVRO_DECL ValidSchema compileJsonSchemaFromStream(InputStream &is);
52
53 AVRO_DECL ValidSchema compileJsonSchemaFromMemory(const uint8_t *input, size_t len);
54
55 AVRO_DECL ValidSchema compileJsonSchemaFromString(const char *input);
56
57 AVRO_DECL ValidSchema compileJsonSchemaFromString(const std::string &input);
58
59 AVRO_DECL ValidSchema compileJsonSchemaFromFile(const char *filename);
60
61 } // namespace avro
62
63 #endif
avro::compileJsonSchema
AVRO_DECL void compileJsonSchema(std::istream &is, ValidSchema &schema)
Given a stream containing a JSON schema, compiles the schema to a ValidSchema object.
avro::InputStream
A no-copy input stream.
Definition: Stream.hh:36
avro
A bunch of templates and specializations for encoding and decoding specific types.
Definition: AvroParse.hh:30
avro::ValidSchema
A ValidSchema is basically a non-mutable Schema that has passed some minimum of sanity checks.
Definition: ValidSchema.hh:40