-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
101 changed files
with
2,150 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
"Name","Id","Arr","TestPlainIntArr","TestPlainEnumArr","TestPlainMsg","TestPlainMsgArr" | ||
"10001","10001","((StrArr=(""啦啦啦啦"",""嘞嘞嘞嘞""),IntArr=(101,102),Name=""第一个-A""),(StrArr=(""嘟嘟嘟嘟"",""嚓嚓嚓嚓""),IntArr=(111,112),Name=""第一个-B""))","(1,2,3)","(10001,10001,10001)","(TestId1=1,TestId2=2)","((TestId1=1,TestId2=2),(TestId1=3,TestId2=4),(TestId1=5,TestId2=6))" | ||
"10002","10002","((StrArr=(""biubiubiubiu"",""唰唰唰唰""),IntArr=(201,202),Name=""测试项-A""),(StrArr=(""哦哦哦哦"",""哈哈哈哈""),IntArr=(211,212),Name=""测试项-B""))","(4,5,6)","(10101,10101,10101)","(TestId1=3,TestId2=4)","((TestId1=7,TestId2=8),(TestId1=9,TestId2=10))" | ||
"10003","10003","((StrArr=(),IntArr=(301),Name=""测试项-C""),(StrArr=(""哦哦哦哦""),IntArr=(311),Name=""测试项-B""))","(7,8,9)","(10001,10001,10001)","(TestId1=5,TestId2=6)","((TestId1=11,TestId2=12))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* This file is generated by xresloader 2.7.3, please don't edit it. | ||
* You can find more information about this xresloader on https://xresloader.atframe.work/ . | ||
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues . | ||
*/ | ||
#include "ConfigRec/ArrInArr.h" | ||
|
||
|
||
|
||
UArrInArrHelper::UArrInArrHelper() : Super() | ||
{ | ||
UArrInArrHelper::ClearRow(this->Empty); | ||
} | ||
|
||
void UArrInArrHelper::ClearRow(FArrInArr& TableRow) | ||
{ | ||
TableRow.Name = TEXT(""); | ||
TableRow.IntArr.Reset(0); | ||
TableRow.StrArr.Reset(0); | ||
} | ||
|
||
void UArrInArrHelper::ClearDataRow(FArrInArr& TableRow) const | ||
{ | ||
UArrInArrHelper::ClearRow(TableRow); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/** | ||
* This file is generated by xresloader 2.7.3, please don't edit it. | ||
* You can find more information about this xresloader on https://xresloader.atframe.work/ . | ||
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues . | ||
*/ | ||
// Test arr_in_arr_cfg | ||
|
||
#include "ConfigRec/ArrInArrCfg.h" | ||
|
||
|
||
|
||
UArrInArrCfgHelper::UArrInArrCfgHelper() : Super() | ||
{ | ||
UArrInArrCfgHelper::ClearRow(this->Empty); | ||
this->Loader = MakeShareable(new ConstructorHelpers::FObjectFinder<UDataTable>(TEXT("DataTable'/Game/ConfigRec/ArrInArrCfg'"))); | ||
if (this->Loader && this->Loader->Succeeded()) | ||
{ | ||
this->DataTable = this->Loader->Object; | ||
this->DataTable->OnDataTableChanged().AddUObject(this, &UArrInArrCfgHelper::OnReload); | ||
OnReload(); | ||
} | ||
else | ||
{ | ||
this->DataTable = nullptr; | ||
} | ||
} | ||
|
||
void UArrInArrCfgHelper::OnReload() | ||
{ | ||
// TODO Rebuild Index | ||
} | ||
|
||
FName UArrInArrCfgHelper::GetRowName(int32 Id) | ||
{ | ||
return *FString::Printf(TEXT("%lld"), static_cast<long long>(Id)); | ||
} | ||
|
||
FName UArrInArrCfgHelper::GetDataRowName(int32 Id) const | ||
{ | ||
return UArrInArrCfgHelper::GetRowName(Id); | ||
} | ||
|
||
FName UArrInArrCfgHelper::GetTableRowName(const FArrInArrCfg& TableRow) const | ||
{ | ||
return GetDataRowName(TableRow.Id); | ||
} | ||
|
||
const FArrInArrCfg& UArrInArrCfgHelper::GetDataRowByName(const FName& Name, bool& IsValid) const | ||
{ | ||
IsValid = false; | ||
if (!this->DataTable) { | ||
return this->Empty; | ||
} | ||
|
||
FString Context; | ||
FArrInArrCfg* LookupRow = DataTable->FindRow<FArrInArrCfg>(Name, Context, false); | ||
if (!LookupRow) { | ||
return this->Empty; | ||
}; | ||
|
||
IsValid = true; | ||
return *LookupRow; | ||
} | ||
|
||
const FArrInArrCfg& UArrInArrCfgHelper::GetDataRowByKey(int32 Id, bool& IsValid) const | ||
{ | ||
return GetDataRowByName(GetDataRowName(Id), IsValid); | ||
} | ||
|
||
bool UArrInArrCfgHelper::ForeachRow(TFunctionRef<void (const FName& Key, const FArrInArrCfg& Value)> Predicate) const | ||
{ | ||
if (!this->DataTable) { | ||
return false; | ||
} | ||
|
||
FString Context; | ||
this->DataTable->ForeachRow(Context, Predicate); | ||
return true; | ||
} | ||
|
||
UDataTable* UArrInArrCfgHelper::GetRawDataTable(bool& IsValid) const | ||
{ | ||
IsValid = false; | ||
if (!this->DataTable) { | ||
return NULL; | ||
} | ||
|
||
IsValid = true; | ||
return this->DataTable; | ||
} | ||
|
||
void UArrInArrCfgHelper::ClearRow(FArrInArrCfg& TableRow) | ||
{ | ||
TableRow.Name = TEXT(""); | ||
TableRow.Id = 0; | ||
TableRow.Arr.Reset(0); | ||
TableRow.TestPlainIntArr.Reset(0); | ||
TableRow.TestPlainEnumArr.Reset(0); | ||
TableRow.TestPlainMsg.TestId1 = 0; | ||
TableRow.TestPlainMsg.TestId2 = 0; | ||
TableRow.TestPlainMsgArr.Reset(0); | ||
} | ||
|
||
void UArrInArrCfgHelper::ClearDataRow(FArrInArrCfg& TableRow) const | ||
{ | ||
UArrInArrCfgHelper::ClearRow(TableRow); | ||
} | ||
|
106 changes: 106 additions & 0 deletions
106
sample/proto_v2/csv/Private/ConfigRec/RoleUpgradeCfg.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/** | ||
* This file is generated by xresloader 2.7.3, please don't edit it. | ||
* You can find more information about this xresloader on https://xresloader.atframe.work/ . | ||
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues . | ||
*/ | ||
// Test role_upgrade_cfg with multi keys | ||
|
||
#include "ConfigRec/RoleUpgradeCfg.h" | ||
|
||
|
||
|
||
URoleUpgradeCfgHelper::URoleUpgradeCfgHelper() : Super() | ||
{ | ||
URoleUpgradeCfgHelper::ClearRow(this->Empty); | ||
this->Loader = MakeShareable(new ConstructorHelpers::FObjectFinder<UDataTable>(TEXT("DataTable'/Game/ConfigRec/RoleUpgradeCfg'"))); | ||
if (this->Loader && this->Loader->Succeeded()) | ||
{ | ||
this->DataTable = this->Loader->Object; | ||
this->DataTable->OnDataTableChanged().AddUObject(this, &URoleUpgradeCfgHelper::OnReload); | ||
OnReload(); | ||
} | ||
else | ||
{ | ||
this->DataTable = nullptr; | ||
} | ||
} | ||
|
||
void URoleUpgradeCfgHelper::OnReload() | ||
{ | ||
// TODO Rebuild Index | ||
} | ||
|
||
FName URoleUpgradeCfgHelper::GetRowName(int32 Id, int32 Level) | ||
{ | ||
return *FString::Printf(TEXT("%lld"), static_cast<long long>(Id) * 1000 + static_cast<long long>(Level)); | ||
} | ||
|
||
FName URoleUpgradeCfgHelper::GetDataRowName(int32 Id, int32 Level) const | ||
{ | ||
return URoleUpgradeCfgHelper::GetRowName(Id, Level); | ||
} | ||
|
||
FName URoleUpgradeCfgHelper::GetTableRowName(const FRoleUpgradeCfg& TableRow) const | ||
{ | ||
return GetDataRowName(TableRow.Id, TableRow.Level); | ||
} | ||
|
||
const FRoleUpgradeCfg& URoleUpgradeCfgHelper::GetDataRowByName(const FName& Name, bool& IsValid) const | ||
{ | ||
IsValid = false; | ||
if (!this->DataTable) { | ||
return this->Empty; | ||
} | ||
|
||
FString Context; | ||
FRoleUpgradeCfg* LookupRow = DataTable->FindRow<FRoleUpgradeCfg>(Name, Context, false); | ||
if (!LookupRow) { | ||
return this->Empty; | ||
}; | ||
|
||
IsValid = true; | ||
return *LookupRow; | ||
} | ||
|
||
const FRoleUpgradeCfg& URoleUpgradeCfgHelper::GetDataRowByKey(int32 Id, int32 Level, bool& IsValid) const | ||
{ | ||
return GetDataRowByName(GetDataRowName(Id, Level), IsValid); | ||
} | ||
|
||
bool URoleUpgradeCfgHelper::ForeachRow(TFunctionRef<void (const FName& Key, const FRoleUpgradeCfg& Value)> Predicate) const | ||
{ | ||
if (!this->DataTable) { | ||
return false; | ||
} | ||
|
||
FString Context; | ||
this->DataTable->ForeachRow(Context, Predicate); | ||
return true; | ||
} | ||
|
||
UDataTable* URoleUpgradeCfgHelper::GetRawDataTable(bool& IsValid) const | ||
{ | ||
IsValid = false; | ||
if (!this->DataTable) { | ||
return NULL; | ||
} | ||
|
||
IsValid = true; | ||
return this->DataTable; | ||
} | ||
|
||
void URoleUpgradeCfgHelper::ClearRow(FRoleUpgradeCfg& TableRow) | ||
{ | ||
TableRow.Name = TEXT(""); | ||
TableRow.Id = 0; | ||
TableRow.Level = 0; | ||
TableRow.CostType = 0; | ||
TableRow.CostValue = 0; | ||
TableRow.ScoreAdd = 0; | ||
} | ||
|
||
void URoleUpgradeCfgHelper::ClearDataRow(FRoleUpgradeCfg& TableRow) const | ||
{ | ||
URoleUpgradeCfgHelper::ClearRow(TableRow); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* This file is generated by xresloader 2.7.3, please don't edit it. | ||
* You can find more information about this xresloader on https://xresloader.atframe.work/ . | ||
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues . | ||
*/ | ||
#include "ConfigRec/TestMsgVerifier.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.