BWAPI
Undermind/proxy/cpp/include/google/protobuf/compiler/java/java_generator.h
Go to the documentation of this file.
00001 // Protocol Buffers - Google's data interchange format
00002 // Copyright 2008 Google Inc.  All rights reserved.
00003 // http://code.google.com/p/protobuf/
00004 //
00005 // Redistribution and use in source and binary forms, with or without
00006 // modification, are permitted provided that the following conditions are
00007 // met:
00008 //
00009 //     * Redistributions of source code must retain the above copyright
00010 // notice, this list of conditions and the following disclaimer.
00011 //     * Redistributions in binary form must reproduce the above
00012 // copyright notice, this list of conditions and the following disclaimer
00013 // in the documentation and/or other materials provided with the
00014 // distribution.
00015 //     * Neither the name of Google Inc. nor the names of its
00016 // contributors may be used to endorse or promote products derived from
00017 // this software without specific prior written permission.
00018 //
00019 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00020 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00021 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00022 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00023 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00024 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00025 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00026 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00027 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00028 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00029 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00030 
00031 // Author: kenton@google.com (Kenton Varda)
00032 //  Based on original Protocol Buffers design by
00033 //  Sanjay Ghemawat, Jeff Dean, and others.
00034 //
00035 // Generates Java code for a given .proto file.
00036 
00037 #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__
00038 #define GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__
00039 
00040 #include <string>
00041 #include <google/protobuf/compiler/code_generator.h>
00042 
00043 namespace google {
00044 namespace protobuf {
00045 namespace compiler {
00046 namespace java {
00047 
00048 // CodeGenerator implementation which generates Java code.  If you create your
00049 // own protocol compiler binary and you want it to support Java output, you
00050 // can do so by registering an instance of this CodeGenerator with the
00051 // CommandLineInterface in your main() function.
00052 class LIBPROTOC_EXPORT JavaGenerator : public CodeGenerator {
00053  public:
00054   JavaGenerator();
00055   ~JavaGenerator();
00056 
00057   // implements CodeGenerator ----------------------------------------
00058   bool Generate(const FileDescriptor* file,
00059                 const string& parameter,
00060                 OutputDirectory* output_directory,
00061                 string* error) const;
00062 
00063  private:
00064   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(JavaGenerator);
00065 };
00066 
00067 }  // namespace java
00068 }  // namespace compiler
00069 }  // namespace protobuf
00070 
00071 }  // namespace google
00072 #endif  // GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines