Adds GetAttributeLabelsInGroup.

This commit is contained in:
2023-04-24 22:02:28 -07:00
parent 7d6e9ec6b8
commit b4764ff480
2 changed files with 24 additions and 0 deletions

View File

@@ -5,7 +5,10 @@
#include <vector>
namespace SBF {
namespace {
using std::string;
using std::vector;
} // End namespace
string GetAttributeGroupLabel(int attributeGroupId) {
if (attributeGroupId > 0 && attributeGroupId <= kAttributeGroupsCount) {
@@ -116,6 +119,22 @@ void FillAttributeLabelsInGroup(std::vector<std::string>& labels, int groupId) {
}
}
vector<string> GetAttributeLabelsInGroup(int group_id) {
vector<string> labels;
switch (group_id) {
case kAttributeGroupPhysicalId:
FillPhysicalAttributeLabels(labels);
break;
case kAttributeGroupSocialId:
FillSocialAttributeLabels(labels);
break;
case kAttributeGroupMentalId:
FillMentalAttributeLabels(labels);
break;
}
return labels;
}
void FillPhysicalAttributeLabels(std::vector<std::string>& labels) {
labels.clear();
for (int id = 1; id <= kPhysicalAttributesCount; id++) {