123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- #ifndef DOC_DATA_H
- #define DOC_DATA_H
- #include "core/io/xml_parser.h"
- #include "core/map.h"
- #include "core/variant.h"
- class DocData {
- public:
- struct ArgumentDoc {
- String name;
- String type;
- String enumeration;
- String default_value;
- };
- struct MethodDoc {
- String name;
- String return_type;
- String return_enum;
- String qualifiers;
- String description;
- Vector<ArgumentDoc> arguments;
- bool operator<(const MethodDoc &p_md) const {
- return name < p_md.name;
- }
- };
- struct ConstantDoc {
- String name;
- String value;
- String enumeration;
- String description;
- };
- struct PropertyDoc {
- String name;
- String type;
- String enumeration;
- String description;
- String setter, getter;
- bool operator<(const PropertyDoc &p_prop) const {
- return name < p_prop.name;
- }
- };
- struct ClassDoc {
- String name;
- String inherits;
- String category;
- String brief_description;
- String description;
- Vector<String> tutorials;
- String demos;
- Vector<MethodDoc> methods;
- Vector<MethodDoc> signals;
- Vector<ConstantDoc> constants;
- Vector<PropertyDoc> properties;
- Vector<PropertyDoc> theme_properties;
- };
- String version;
- Map<String, ClassDoc> class_list;
- Error _load(Ref<XMLParser> parser);
- public:
- void merge_from(const DocData &p_data);
- void remove_from(const DocData &p_data);
- void generate(bool p_basic_types = false);
- Error load_classes(const String &p_dir);
- static Error erase_classes(const String &p_dir);
- Error save_classes(const String &p_default_path, const Map<String, String> &p_class_path);
- Error load_compressed(const uint8_t *p_data, int p_compressed_size, int p_uncompressed_size);
- };
- #endif
|