-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da2be14
commit ae135a5
Showing
34 changed files
with
1,398 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
add_subdirectory(c-cursor-no-gen) | ||
add_subdirectory(c-gen) | ||
add_subdirectory(cpp-gen) | ||
add_subdirectory(cpp-gen-sync) | ||
add_subdirectory(cpp-gen-sync) | ||
|
||
find_package(ObjectBoxGenerator 4.0.0) | ||
# Some platforms such as Linux ARM(64) and Windows ARM(64) are not supported. | ||
# We exclude this example for these cases where the generator was not found. | ||
if (ObjectBoxGenerator_FOUND) | ||
add_subdirectory(cpp-autogen) | ||
else () | ||
message(WARNING "Did not add all examples, as the ObjectBoxGenerator CMake was not found") | ||
endif () | ||
add_subdirectory(vectorsearch-cities) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.obx.* | ||
objectbox-model.h | ||
objectbox-model.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# C++ local-only example using objectbox-generator via cmake | ||
set(PROJECT_NAME objectbox-c-examples-tasks-cpp-autogen) | ||
project(${PROJECT_NAME} CXX) | ||
add_executable(${PROJECT_NAME} | ||
main.cpp | ||
) | ||
|
||
# add_obx_schema provided by ObjectBoxGenerator package. | ||
add_obx_schema(TARGET ${PROJECT_NAME} SCHEMA_FILES tasklist.fbs INSOURCE) | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES | ||
CXX_STANDARD 14 | ||
CXX_STANDARD_REQUIRED YES | ||
) | ||
target_link_libraries(${PROJECT_NAME} objectbox) | ||
target_include_directories(${PROJECT_NAME} PRIVATE ../../include ../../external) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2018-2020 ObjectBox Ltd. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#define OBX_CPP_FILE | ||
#include "tasklist-example-app.hpp" | ||
|
||
int main(int argc, char* argv[]) { | ||
// create_obx_model() provided by objectbox-model.h | ||
// obx interface contents provided by objectbox.hpp | ||
obx::Options options(create_obx_model()); | ||
|
||
if (int err = processArgs(argc, argv, options)) { | ||
return err; | ||
} | ||
|
||
obx::Store store(options); | ||
TasklistCmdlineApp app(store); | ||
return app.run(); | ||
} |
Oops, something went wrong.