载入中...
搜索中...
未找到
HouseComponentLibrary.h
浏览该文件的文档.
房屋组件注册表(按 id 索引,支持分类/风格查询)。
Definition HouseComponentLibrary.h:12
bool loadFromFile(const std::string &filename, std::string *error=nullptr)
Definition HouseComponentLibrary.cpp:139
bool loadFromJson(const std::string &json, std::string *error=nullptr)
从 JSON / 文件加载组件。
Definition HouseComponentLibrary.cpp:123
bool registerComponent(const HouseComponent &component, std::string *error=nullptr)
注册单个组件(id 重复会报错)。
Definition HouseComponentLibrary.cpp:88
const HouseComponent * find(const std::string &id) const
按 id 查询组件。
Definition HouseComponentLibrary.cpp:160
std::vector< const HouseComponent * > byCategory(const std::string &category, const std::string &style={}) const
按分类(可选风格)查询组件。
Definition HouseComponentLibrary.cpp:163
Definition HouseComponentLibrary.cpp:10