|
Dictionary< string, CodeNamespace > | namespaceLookup = new Dictionary<string, CodeNamespace>(StringComparer.Ordinal) |
| List of generated namespaces More...
|
|
◆ CodeGen()
◆ addName()
Recursively search the given schema for named schemas and adds them to the given container
- Parameters
-
schema | schema object to search |
names | list of named schemas |
◆ addNamespace()
virtual CodeNamespace Avro.CodeGen.addNamespace |
( |
string |
name | ) |
|
|
inlineprotectedvirtual |
Adds a namespace object for the given name into the dictionary if it doesn't exist yet
- Parameters
-
- Returns
◆ AddProtocol()
virtual void Avro.CodeGen.AddProtocol |
( |
Protocol |
protocol | ) |
|
|
inlinevirtual |
Adds a protocol object to generate code for
- Parameters
-
◆ AddSchema()
virtual void Avro.CodeGen.AddSchema |
( |
Schema |
schema | ) |
|
|
inlinevirtual |
Adds a schema object to generate code for
- Parameters
-
◆ createDocComment()
virtual CodeCommentStatement Avro.CodeGen.createDocComment |
( |
string |
comment | ) |
|
|
inlineprotectedvirtual |
Creates an XML documentation for the given comment
- Parameters
-
- Returns
- CodeCommentStatement object
◆ createSchemaField()
virtual void Avro.CodeGen.createSchemaField |
( |
Schema |
schema, |
|
|
CodeTypeDeclaration |
ctd, |
|
|
bool |
overrideFlag |
|
) |
| |
|
inlineprotectedvirtual |
Creates the static schema field for class types
- Parameters
-
schema | schema |
ctd | CodeTypeDeclaration for the class |
◆ GenerateCode()
virtual CodeCompileUnit Avro.CodeGen.GenerateCode |
( |
| ) |
|
|
inlinevirtual |
Generates code for the given protocol and schema objects
- Returns
- CodeCompileUnit object
◆ generateNames() [1/2]
Generate list of named schemas from given protocol
- Parameters
-
protocol | protocol to process |
- Returns
◆ generateNames() [2/2]
Generate list of named schemas from given schema
- Parameters
-
- Returns
◆ getNullableType()
Gets the schema of a union with null
- Parameters
-
- Returns
- schema that is nullible
◆ processEnum()
virtual void Avro.CodeGen.processEnum |
( |
Schema |
schema | ) |
|
|
inlineprotectedvirtual |
Creates an enum declaration
- Parameters
-
schema | enum schema |
ns | namespace |
◆ processFixed()
virtual void Avro.CodeGen.processFixed |
( |
Schema |
schema | ) |
|
|
inlineprotectedvirtual |
Creates a class declaration for fixed schema
- Parameters
-
schema | fixed schema |
ns | namespace object |
◆ processProtocols()
virtual void Avro.CodeGen.processProtocols |
( |
| ) |
|
|
inlineprotectedvirtual |
Generates code for the protocol objects
◆ processRecord()
virtual CodeTypeDeclaration Avro.CodeGen.processRecord |
( |
Schema |
schema | ) |
|
|
inlineprotectedvirtual |
Creates a class declaration
- Parameters
-
schema | record schema |
ns | namespace |
- Returns
◆ processSchemas()
virtual void Avro.CodeGen.processSchemas |
( |
| ) |
|
|
inlineprotectedvirtual |
Generates code for the schema objects
◆ WriteCompileUnit()
virtual void Avro.CodeGen.WriteCompileUnit |
( |
string |
outputFile | ) |
|
|
inlinevirtual |
Writes the generated compile unit into one file
- Parameters
-
outputFile | name of output file to write to |
◆ WriteTypes()
virtual void Avro.CodeGen.WriteTypes |
( |
string |
outputdir | ) |
|
|
inlinevirtual |
Writes each types in each namespaces into individual files
- Parameters
-
outputdir | name of directory to write to |
◆ namespaceLookup
Dictionary<string, CodeNamespace> Avro.CodeGen.namespaceLookup = new Dictionary<string, CodeNamespace>(StringComparer.Ordinal) |
|
protected |
List of generated namespaces
◆ CompileUnit
CodeCompileUnit Avro.CodeGen.CompileUnit |
|
get |
Object that contains all the generated types
◆ NamespaceMapping
IDictionary<string, string> Avro.CodeGen.NamespaceMapping |
|
get |
Mapping of Avro namespaces to C# namespaces
◆ Protocols
List of protocols to generate code for
◆ Schemas
IList<Schema> Avro.CodeGen.Schemas |
|
get |
List of schemas to generate code for
The documentation for this class was generated from the following file:
- src/apache/main/CodeGen/CodeGen.cs