| 1 | #include "Library/Area/AreaObjFactory.h" |
|---|---|
| 2 | |
| 3 | #include "Library/Base/StringUtil.h" |
| 4 | |
| 5 | namespace al { |
| 6 | |
| 7 | AreaObjFactory::AreaObjFactory(const char* factoryName) |
| 8 | : Factory<AreaCreatorFunction>(factoryName) {} |
| 9 | |
| 10 | s32 AreaObjFactory::tryFindAddBufferSize(const char* bufferName) const { |
| 11 | if (!mAreaGroupInfos || mAreaGroupInfoCount < 1) |
| 12 | return 0; |
| 13 | |
| 14 | for (s32 i = 0; i < mAreaGroupInfoCount; i++) |
| 15 | if (isEqualString(str1: bufferName, str2: mAreaGroupInfos[i].name)) |
| 16 | return mAreaGroupInfos[i].size; |
| 17 | return 0; |
| 18 | } |
| 19 | |
| 20 | } // namespace al |
| 21 |