{"id":14985677,"url":"https://github.com/lishen1/proplib","last_synced_at":"2025-04-11T22:06:31.965Z","repository":{"id":53594210,"uuid":"126867558","full_name":"Lishen1/proplib","owner":"Lishen1","description":"Properties serialization library","archived":false,"fork":false,"pushed_at":"2023-07-04T13:32:02.000Z","size":936,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T22:06:21.567Z","etag":null,"topics":["c-plus-plus","deserialize","imgui","qt","serialization","yaml","yml"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lishen1.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-26T17:51:05.000Z","updated_at":"2024-07-14T11:45:51.000Z","dependencies_parsed_at":"2024-09-25T00:32:27.061Z","dependency_job_id":null,"html_url":"https://github.com/Lishen1/proplib","commit_stats":{"total_commits":74,"total_committers":6,"mean_commits":"12.333333333333334","dds":0.6081081081081081,"last_synced_commit":"a56b9421d91676e3c9b5179ef1147127c2d7985a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lishen1%2Fproplib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lishen1%2Fproplib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lishen1%2Fproplib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lishen1%2Fproplib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lishen1","download_url":"https://codeload.github.com/Lishen1/proplib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487715,"owners_count":21112191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","deserialize","imgui","qt","serialization","yaml","yml"],"created_at":"2024-09-24T14:11:28.333Z","updated_at":"2025-04-11T22:06:31.926Z","avatar_url":"https://github.com/Lishen1.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/Lishen1/proplib.svg?branch=master)](https://travis-ci.org/Lishen1/proplib)\r\n# Properties serialization library\r\n**proplib** is a set of crossplatform c++11 libraries and tools which allow serialize, deserialize, visualize and edit c++ objects without codegeneration what well suitable for algorithms  properties configuration.\r\n\r\n## Example of usage\r\n\r\n```cpp\r\n#include \u003cfstream\u003e\r\n#include \u003ciostream\u003e\r\n\r\n#include \u003cserialize/serializable.h\u003e\r\n#include \u003cserialize/serialize.h\u003e\r\n#include \u003cyaml-cpp/yaml.h\u003e\r\n\r\nclass Box : public proplib::Serializable\r\n{\r\n\r\npublic:\r\n  float height;\r\n  float width;\r\n  std::string name;\r\n\r\nprivate:\r\n  SERIALIZE(height, \"height of the box\");\r\n  SERIALIZE(width, \"width of the box\");\r\n  SERIALIZE(name, \"name of the box\");\r\n};\r\n\r\nint main()\r\n{\r\n  Box box; \r\n  box.height = 1.0;\r\n  box.width = 1.4;\r\n  box.name = \"just a small box in the big world\";\r\n\r\n  YAML::Emitter out;\r\n  box.serialize(out, false);\r\n  std::ofstream outfile;\r\n  outfile.open(\"box.prop.yml\");\r\n  outfile \u003c\u003c out.c_str() \u003c\u003c std::endl;\r\n  outfile.close();\r\n\r\n  box.height = 0.0;\r\n  box.width = 0.0;\r\n  box.name = \"--\";\r\n\r\n  box.deserialize(YAML::LoadFile(\"box.prop.yml\"));\r\n\r\n  std::cout \u003c\u003c \"box.height \" \u003c\u003c box.height \u003c\u003c std::endl;\r\n  std::cout \u003c\u003c \"box.width \" \u003c\u003c box.width \u003c\u003c std::endl;\r\n  std::cout \u003c\u003c \"box.name \" \u003c\u003c box.name \u003c\u003c std::endl;\r\n\r\n  system(\"pause\");\r\n  return 0;\r\n}\r\n```\r\nbox.prop.yml file content:\r\n``` yaml\r\nheight: 1\r\nname: just a small box in the big world\r\nwidth: 1.4\r\n```\r\n\r\nconsole output:\r\n```\r\nbox.height 1\r\nbox.width 1.4\r\nbox.name just a small box in the big world\r\nДля продолжения нажмите любую клавишу . . .\r\n```\r\nAlso we can serialize **box** with **docstrings** and metainfo for gui generation\r\n\r\n```cpp\r\nbox.serialize(out, true);\r\n```\r\n\r\nbox.prop.yml file content:\r\n``` yaml\r\nheight: !\u003cfloat\u003e 1\r\nheight_doc: !\u003cdoc\u003e height of the box\r\nname: !\u003cstring\u003e just a small box in the big world\r\nname_doc: !\u003cdoc\u003e name of the box\r\nwidth: !\u003cfloat\u003e 1.4\r\nwidth_doc: !\u003cdoc\u003e width of the box\r\n```\r\nthen we can open, edit and save this file in **proplib-qt-editor**\r\n\r\n![alt text](doc/img/qt-editor.png \"proplib-qt-editor\")\r\n\r\nor in ImGui based **proplib-imgui-editor**\r\n\r\n![alt text](doc/img/imgui-editor.png \"proplib-imgui-editor\")\r\n\r\n## Supported types\r\n- arithmetic\r\n- bool\r\n- std::string \r\n- std::map\r\n- std::vector\r\n\r\n## Supported formats\r\n- YAML\r\n\r\n## Components\r\n- **proplib-serialize** - serialization/deserialization lib\r\n- **proplib-gui**\r\n  - **proplib-qt-gui**  - qt based qui lib\r\n- **proplib-qt-editor** -  qt based editor app\r\n- **propsdk-imgui-editor** -  imgui based editor app\r\n- **tests**\r\n  - **prop-serialize** - serialization/deserialization test\r\n  - **http-client** - remote transfer test\r\n\r\n## Future work\r\n- support JSON format\r\n- support binary format\r\n- support enums serialization/deserialization\r\n- add meta info in **docstring** like hints for better data representation and hins about possible values of object fields\r\n- minimize transferred data size\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flishen1%2Fproplib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flishen1%2Fproplib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flishen1%2Fproplib/lists"}