Compiler.hh

00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one
00003  * or more contributor license agreements.  See the NOTICE file
00004  * distributed with this work for additional information
00005  * regarding copyright ownership.  The ASF licenses this file
00006  * to you under the Apache License, Version 2.0 (the
00007  * "License"); you may not use this file except in compliance
00008  * with the License.  You may obtain a copy of the License at
00009  *
00010  *     http://www.apache.org/licenses/LICENSE-2.0
00011  *
00012  * Unless required by applicable law or agreed to in writing, software
00013  * distributed under the License is distributed on an "AS IS" BASIS,
00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  * See the License for the specific language governing permissions and
00016  * limitations under the License.
00017  */
00018 
00019 #ifndef avro_Compiler_hh__
00020 #define avro_Compiler_hh__
00021 
00022 #include "Config.hh"
00023 #include <stdint.h>
00024 #include <istream>
00025 
00026 namespace avro {
00027 
00028 class AVRO_DECL InputStream;
00029 
00034     
00035 class AVRO_DECL ValidSchema;
00036 
00040 
00041 AVRO_DECL void compileJsonSchema(std::istream &is, ValidSchema &schema);
00042 
00047 
00048 AVRO_DECL bool compileJsonSchema(std::istream &is, ValidSchema &schema,
00049     std::string &error);
00050 
00051 AVRO_DECL ValidSchema compileJsonSchemaFromStream(InputStream& is);
00052 
00053 AVRO_DECL ValidSchema compileJsonSchemaFromMemory(const uint8_t* input, size_t len);
00054 
00055 AVRO_DECL ValidSchema compileJsonSchemaFromString(const char* input);
00056 
00057 AVRO_DECL ValidSchema compileJsonSchemaFromString(const std::string& input);
00058 
00059 AVRO_DECL ValidSchema compileJsonSchemaFromFile(const char* filename);
00060 
00061 } // namespace avro
00062 
00063 #endif