|
Dictionary< string, CodeNamespace > | namespaceLookup = new Dictionary<string, CodeNamespace>(StringComparer.Ordinal) |
| List of generated namespaces More...
|
|
Definition at line 30 of file CodeGen.cs.
◆ CodeGen()
Default constructor
Definition at line 55 of file CodeGen.cs.
◆ 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 |
Definition at line 195 of file CodeGen.cs.
◆ 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
Definition at line 84 of file CodeGen.cs.
◆ AddProtocol()
virtual void Avro.CodeGen.AddProtocol |
( |
Protocol |
protocol | ) |
|
|
inlinevirtual |
Adds a protocol object to generate code for
- Parameters
-
Definition at line 65 of file CodeGen.cs.
◆ AddSchema()
virtual void Avro.CodeGen.AddSchema |
( |
Schema |
schema | ) |
|
|
inlinevirtual |
Adds a schema object to generate code for
- Parameters
-
Definition at line 74 of file CodeGen.cs.
◆ createDocComment()
virtual CodeCommentStatement Avro.CodeGen.createDocComment |
( |
string |
comment | ) |
|
|
inlineprotectedvirtual |
Creates an XML documentation for the given comment
- Parameters
-
- Returns
- CodeCommentStatement object
Definition at line 789 of file CodeGen.cs.
◆ 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 |
Definition at line 758 of file CodeGen.cs.
◆ GenerateCode()
virtual CodeCompileUnit Avro.CodeGen.GenerateCode |
( |
| ) |
|
|
inlinevirtual |
Generates code for the given protocol and schema objects
- Returns
- CodeCompileUnit object
Definition at line 107 of file CodeGen.cs.
◆ generateNames() [1/2]
Generate list of named schemas from given protocol
- Parameters
-
protocol | protocol to process |
- Returns
Definition at line 170 of file CodeGen.cs.
◆ generateNames() [2/2]
Generate list of named schemas from given schema
- Parameters
-
- Returns
Definition at line 183 of file CodeGen.cs.
◆ getNullableType()
Gets the schema of a union with null
- Parameters
-
- Returns
- schema that is nullible
Definition at line 734 of file CodeGen.cs.
◆ processEnum()
virtual void Avro.CodeGen.processEnum |
( |
Schema |
schema | ) |
|
|
inlineprotectedvirtual |
Creates an enum declaration
- Parameters
-
schema | enum schema |
ns | namespace |
Definition at line 301 of file CodeGen.cs.
◆ processFixed()
virtual void Avro.CodeGen.processFixed |
( |
Schema |
schema | ) |
|
|
inlineprotectedvirtual |
Creates a class declaration for fixed schema
- Parameters
-
schema | fixed schema |
ns | namespace object |
Definition at line 251 of file CodeGen.cs.
◆ processInterface()
virtual void Avro.CodeGen.processInterface |
( |
Protocol |
protocol | ) |
|
|
inlineprotectedvirtual |
◆ processProtocols()
virtual void Avro.CodeGen.processProtocols |
( |
| ) |
|
|
inlineprotectedvirtual |
Generates code for the protocol objects
Definition at line 143 of file CodeGen.cs.
◆ processRecord()
virtual CodeTypeDeclaration Avro.CodeGen.processRecord |
( |
Schema |
schema | ) |
|
|
inlineprotectedvirtual |
Creates a class declaration
- Parameters
-
schema | record schema |
ns | namespace |
- Returns
Definition at line 515 of file CodeGen.cs.
◆ processSchemas()
virtual void Avro.CodeGen.processSchemas |
( |
| ) |
|
|
inlineprotectedvirtual |
Generates code for the schema objects
Definition at line 120 of file CodeGen.cs.
◆ 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 |
Definition at line 799 of file CodeGen.cs.
◆ 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 |
Definition at line 818 of file CodeGen.cs.
◆ namespaceLookup
Dictionary<string, CodeNamespace> Avro.CodeGen.namespaceLookup = new Dictionary<string, CodeNamespace>(StringComparer.Ordinal) |
|
protected |
List of generated namespaces
Definition at line 50 of file CodeGen.cs.
◆ CompileUnit
CodeCompileUnit Avro.CodeGen.CompileUnit |
|
get |
Object that contains all the generated types
Definition at line 35 of file CodeGen.cs.
◆ Protocols
List of protocols to generate code for
Definition at line 45 of file CodeGen.cs.
◆ Schemas
IList<Schema> Avro.CodeGen.Schemas |
|
get |
List of schemas to generate code for
Definition at line 40 of file CodeGen.cs.
The documentation for this class was generated from the following file:
- _build/public-os_ubuntu24.04-arch_amd64-cc_gcc_13.3.0/install/Avro/src/apache/main/CodeGen/CodeGen.cs