1
This commit is contained in:
parent
d33036398d
commit
36d83c3303
10
a8/reflect.h
10
a8/reflect.h
@ -78,6 +78,16 @@ namespace a8
|
|||||||
return fields_;
|
return fields_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Field* GetFieldByName(const std::string& name)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < FieldNum(); ++i) {
|
||||||
|
if (name == fields_[i].field_name) {
|
||||||
|
return &fields_[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
int FieldNum()
|
int FieldNum()
|
||||||
{
|
{
|
||||||
return fieldnum_;
|
return fieldnum_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user