102 const std::vector<std::filesystem::path>& extensions,
103 const std::vector<std::filesystem::path>& mappings,
125 void readDirectory(const
std::filesystem::path& path);
129 void readExtension(const
std::filesystem::path& path);
133 Document& readDocument(const
std::filesystem::path& path, const
std::
string& package,
bool isExtension);
137 void resolveDependencies();
141 [[nodiscard]]
Document* findDocument(const
std::
string& identification) const;
148 void indexDeclarations();
151 void record(const
std::
string& key, pugi::xml_node node,
Document& document);
165 [[nodiscard]]
std::optional<
Declaration> introducedType(const
std::
string& category,
166 const
std::
string& fomName) const;
169 void buildRootTypeSet();
177 void ensureBuilt(
Document& document);
180 void populateTypes(
Document& document);
183 template <typename F>
186 template <typename F>
187 void processTypeSource(
Document& document, const pugi::xpath_node_set& nodes, F func);
190 template <typename F>
192 const
std::
string& query,
193 const
std::
string& queryPostFix,
209 const
std::
string& qualifiedName) const;
215 const char* container;
222 [[nodiscard]]
static const std::array<Category, 5>& dataTypeCategories();
225 [[nodiscard]]
static std::string categoryQuery(
const Category& category);
236 void applyMappings(ClassSpec& classSpec,
237 std::vector<PropertySpec>& propertySpecs,
244 [[nodiscard]]
PropertySpec propertyFromAttribute(pugi::xml_node attrNode,
249 void basicDataRepresentation(pugi::xml_node node,
const Document& document);
258 enum class CallableEnum : uint8_t
264 struct FoundInteraction
267 Document* document {};
270 [[nodiscard]] FoundInteraction findInteraction(
const std::string& path, Document& document);
271 [[nodiscard]] FoundInteraction findInteractionAnywhere(
const std::string& path,
const std::string& askedBy);
272 [[nodiscard]] Arg argFromParameter(pugi::xml_node paramNode, Document& document);
273 [[nodiscard]] std::vector<Arg> collectArgs(pugi::xml_node interactionNode,
274 const std::vector<std::string>& ignoredParams,
278 const std::vector<std::string>& ignoredParams);
279 [[nodiscard]] CallableSpec makeCallableSpec(pugi::xml_node interactionNode,
280 const std::vector<std::string>& ignoredParams,
282 CallableEnum callableEnum,
284 [[nodiscard]] EventSpec makeEventSpec(pugi::xml_node interactionNode,
285 const std::vector<std::string>& ignoredParams,
288 [[nodiscard]] MethodSpec makeMethodSpec(pugi::xml_node interactionNode,
289 pugi::xml_node returnNode,
290 const std::vector<std::string>& ignoredParams,
294 const std::string& qualifiedClassName);
300 [[nodiscard]] std::string senName(
const std::string& fomTypeName)
const;
301 [[nodiscard]] std::string senQualifiedName(
const Document& document,
const std::string& fomTypeName)
const;
302 [[nodiscard]] std::string withPackage(
const Document& document,
const std::string& str)
const;
303 [[nodiscard]]
ConstTypeHandle<> representationToType(
const std::string& representation)
const;
306 TypeSettings settings_;
307 std::vector<std::unique_ptr<Document>> documents_;
308 std::vector<MappingDocument> mappings_;
313 std::map<std::string, std::vector<std::string>> argsStructIgnores_;
319 std::vector<std::string> packedWithIgnores_;
322 std::vector<std::filesystem::path> extensionPaths_;
325 std::map<std::string, Declarations> declarations_;
327 std::unordered_map<std::string, ConstTypeHandle<>> representations_;
328 std::unordered_map<std::string, std::string> units_;
329 std::unique_ptr<TypeSet> rootSet_;
330 std::optional<TypeHandle<ClassType>> rootClass_;
334 std::vector<std::pair<std::string, const Document*>> resolving_;