mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-20 12:45:07 +00:00
- fix CSharp comments generation - fix Python comments generation - fix Lua comments generation - fix PHP comments generation - fix Dart comments generation - add brief description of Color enum - add multi-line comments to the Monster:Color
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
bc7ede8fb3
commit
95004218f7
@@ -7,10 +7,10 @@ namespace MyGame.Example
|
||||
|
||||
public enum Any : byte
|
||||
{
|
||||
NONE = 0,
|
||||
Monster = 1,
|
||||
TestSimpleTableWithEnum = 2,
|
||||
MyGame_Example2_Monster = 3,
|
||||
NONE = 0,
|
||||
Monster = 1,
|
||||
TestSimpleTableWithEnum = 2,
|
||||
MyGame_Example2_Monster = 3,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace MyGame.Example
|
||||
|
||||
public enum AnyAmbiguousAliases : byte
|
||||
{
|
||||
NONE = 0,
|
||||
M1 = 1,
|
||||
M2 = 2,
|
||||
M3 = 3,
|
||||
NONE = 0,
|
||||
M1 = 1,
|
||||
M2 = 2,
|
||||
M3 = 3,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace MyGame.Example
|
||||
|
||||
public enum AnyUniqueAliases : byte
|
||||
{
|
||||
NONE = 0,
|
||||
M = 1,
|
||||
TS = 2,
|
||||
M2 = 3,
|
||||
NONE = 0,
|
||||
M = 1,
|
||||
TS = 2,
|
||||
M2 = 3,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -5,12 +5,16 @@
|
||||
namespace MyGame.Example
|
||||
{
|
||||
|
||||
/// Composite components of Monster color.
|
||||
[System.FlagsAttribute]
|
||||
public enum Color : byte
|
||||
{
|
||||
Red = 1,
|
||||
Green = 2,
|
||||
Blue = 8,
|
||||
Red = 1,
|
||||
/// \brief color Green
|
||||
/// Green is bit_flag with value (1u << 1)
|
||||
Green = 2,
|
||||
/// \brief color Blue (1u << 3)
|
||||
Blue = 8,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4,11 +4,15 @@ package Example
|
||||
|
||||
import "strconv"
|
||||
|
||||
/// Composite components of Monster color.
|
||||
type Color byte
|
||||
|
||||
const (
|
||||
ColorRed Color = 1
|
||||
/// \brief color Green
|
||||
/// Green is bit_flag with value (1u << 1)
|
||||
ColorGreen Color = 2
|
||||
/// \brief color Blue (1u << 3)
|
||||
ColorBlue Color = 8
|
||||
)
|
||||
|
||||
|
||||
@@ -2,10 +2,20 @@
|
||||
|
||||
package MyGame.Example;
|
||||
|
||||
/**
|
||||
* Composite components of Monster color.
|
||||
*/
|
||||
public final class Color {
|
||||
private Color() { }
|
||||
public static final byte Red = 1;
|
||||
/**
|
||||
* \brief color Green
|
||||
* Green is bit_flag with value (1u << 1)
|
||||
*/
|
||||
public static final byte Green = 2;
|
||||
/**
|
||||
* \brief color Blue (1u << 3)
|
||||
*/
|
||||
public static final byte Blue = 8;
|
||||
|
||||
public static final String[] names = { "Red", "Green", "", "", "", "", "", "Blue", };
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
|
||||
-- namespace: Example
|
||||
|
||||
-- Composite components of Monster color.
|
||||
local Color = {
|
||||
Red = 1,
|
||||
-- \brief color Green
|
||||
-- Green is bit_flag with value (1u << 1)
|
||||
Green = 2,
|
||||
-- \brief color Blue (1u << 3)
|
||||
Blue = 8,
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,14 @@
|
||||
|
||||
namespace MyGame\Example;
|
||||
|
||||
/// Composite components of Monster color.
|
||||
class Color
|
||||
{
|
||||
const Red = 1;
|
||||
/// \brief color Green
|
||||
/// Green is bit_flag with value (1u << 1)
|
||||
const Green = 2;
|
||||
/// \brief color Blue (1u << 3)
|
||||
const Blue = 8;
|
||||
|
||||
private static $names = array(
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
|
||||
# namespace: Example
|
||||
|
||||
# Composite components of Monster color.
|
||||
class Color(object):
|
||||
Red = 1
|
||||
# \brief color Green
|
||||
# Green is bit_flag with value (1u << 1)
|
||||
Green = 2
|
||||
# \brief color Blue (1u << 3)
|
||||
Blue = 8
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
local flatbuffers = require('flatbuffers')
|
||||
|
||||
-- /// an example documentation comment: monster object
|
||||
-- an example documentation comment: monster object
|
||||
local Monster = {} -- the module
|
||||
local Monster_mt = {} -- the class metatable
|
||||
|
||||
@@ -120,8 +120,8 @@ function Monster_mt:TestarrayofstringLength()
|
||||
end
|
||||
return 0
|
||||
end
|
||||
-- /// an example documentation comment: this will end up in the generated code
|
||||
-- /// multiline too
|
||||
-- an example documentation comment: this will end up in the generated code
|
||||
-- multiline too
|
||||
function Monster_mt:Testarrayoftables(j)
|
||||
local o = self.view:Offset(26)
|
||||
if o ~= 0 then
|
||||
|
||||
@@ -171,8 +171,8 @@ class Monster extends Table
|
||||
return $o != 0 ? $this->__vector_len($o) : 0;
|
||||
}
|
||||
|
||||
/// an example documentation comment: this will end up in the generated code
|
||||
/// multiline too
|
||||
/// an example documentation comment: this will end up in the generated code
|
||||
/// multiline too
|
||||
/**
|
||||
* @returnVectorOffset
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import flatbuffers
|
||||
|
||||
# /// an example documentation comment: monster object
|
||||
# an example documentation comment: monster object
|
||||
class Monster(object):
|
||||
__slots__ = ['_tab']
|
||||
|
||||
@@ -131,8 +131,8 @@ class Monster(object):
|
||||
return self._tab.VectorLen(o)
|
||||
return 0
|
||||
|
||||
# /// an example documentation comment: this will end up in the generated code
|
||||
# /// multiline too
|
||||
# an example documentation comment: this will end up in the generated code
|
||||
# multiline too
|
||||
# Monster
|
||||
def Testarrayoftables(self, j):
|
||||
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26))
|
||||
|
||||
Reference in New Issue
Block a user