{"id":21417851,"url":"https://github.com/adonmo/meos-cpp-example","last_synced_at":"2026-01-03T00:49:37.219Z","repository":{"id":71198633,"uuid":"277301268","full_name":"adonmo/meos-cpp-example","owner":"adonmo","description":"An example C++ application built using MEOS","archived":false,"fork":false,"pushed_at":"2020-08-07T16:02:46.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T05:46:24.699Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adonmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-07-05T12:50:45.000Z","updated_at":"2020-08-07T16:02:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"2333a326-b989-4b88-90e5-69ece7aa93fd","html_url":"https://github.com/adonmo/meos-cpp-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonmo%2Fmeos-cpp-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonmo%2Fmeos-cpp-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonmo%2Fmeos-cpp-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonmo%2Fmeos-cpp-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adonmo","download_url":"https://codeload.github.com/adonmo/meos-cpp-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243918629,"owners_count":20368745,"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":[],"created_at":"2024-11-22T19:17:38.667Z","updated_at":"2026-01-03T00:49:37.185Z","avatar_url":"https://github.com/adonmo.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MEOS C++ example\n\nThis project shows a minimal example for how [MEOS](https://github.com/adonmo/meos) can be used in C++ projects.\n\n## Code Snippet\n\n```cpp\n#include \u003ciostream\u003e\n#include \u003cmeos/types/temporal/TSequence.hpp\u003e\n#include \"time_utils.cpp\"\n\nusing namespace std;\nusing namespace meos;\n\n\nint main() {\n    set\u003cTInstant\u003cint\u003e\u003e instants = {\n        TInstant\u003cint\u003e(2, unix_time_point(2012, 1, 1)),\n        TInstant\u003cint\u003e(1, unix_time_point(2012, 1, 2)),\n        TInstant\u003cint\u003e(4, unix_time_point(2012, 1, 3)),\n        TInstant\u003cint\u003e(3, unix_time_point(2012, 1, 4)),\n    };\n    TSequence\u003cint\u003e tseq(instants);\n    cout \u003c\u003c tseq \u003c\u003c endl;\n    return 0;\n}\n```\n\n## Building\n\n```sh\ncmake -B build -S .\ncmake --build build\n```\n\nNote: It is assumed you have libgeos-dev installed on your system.\n\n## Running\n\n```sh\n./build/app\n```\nIf you see the following output, you have succesfully ran the example application! :)\n```\n[2@2012-01-01T00:00:00+0000, 1@2012-01-02T00:00:00+0000, 4@2012-01-03T00:00:00+0000, 3@2012-01-04T00:00:00+0000)\n```\n\n## How it works\n\nIn [CMakeLists.txt](CMakeLists.txt) file you can see that MEOS is included and linked using [CPM](https://github.com/TheLartians/CPM.cmake)\n\n```cmake\ninclude(cmake/CPM.cmake)\n\nCPMAddPackage(\n  NAME MEOS\n  GITHUB_REPOSITORY adonmo/meos\n  GIT_TAG 0.1\n)\n```\n\nWhen you run cmake build, specified version of the library is fetched and linked to the application\n\n## Ready for more?\nOf course, you can build much more useful and all sorts of complex applications using MEOS. Here are some links to help you out:\n\n  - [MEOS C++ Documentation](https://adonmo.github.io/meos/)\n  - [MEOS Repository](https://github.com/adonmo/meos)\n  - [MobilityDB](https://github.com/MobilityDB/MobilityDB) and its [documentation](https://docs.mobilitydb.com/MobilityDB/master/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadonmo%2Fmeos-cpp-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadonmo%2Fmeos-cpp-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadonmo%2Fmeos-cpp-example/lists"}