This is an automated email from the ASF dual-hosted git repository. dbarnes pushed a commit to branch feature/code-snippet in repository https://gitbox.apache.org/repos/asf/geode-native.git
commit 5f97ea86862dcb1f401bc10ea92245a148921868 Author: Dave Barnes <[email protected]> AuthorDate: Fri Sep 14 14:13:03 2018 -0700 Proof of concept - WIP --- docs/examples | 1 + docs/geode-native-book/config.yml | 4 ++++ .../getting-started/getting-started-nc-client.html.md.erb | 4 ++++ examples/cpp/put-get-remove/main.cpp | 2 ++ 4 files changed, 11 insertions(+) diff --git a/docs/examples b/docs/examples new file mode 120000 index 0000000..a6573af --- /dev/null +++ b/docs/examples @@ -0,0 +1 @@ +../examples \ No newline at end of file diff --git a/docs/geode-native-book/config.yml b/docs/geode-native-book/config.yml index 64645fc..b459a65 100644 --- a/docs/geode-native-book/config.yml +++ b/docs/geode-native-book/config.yml @@ -23,6 +23,10 @@ sections: name: geode-native-docs directory: docs/guide-native/18 subnav_template: geode-nc-nav + dependent_sections: + - repository: + name: examples + no-docs: true template_variables: product_name_long: Apache Geode diff --git a/docs/geode-native-docs/getting-started/getting-started-nc-client.html.md.erb b/docs/geode-native-docs/getting-started/getting-started-nc-client.html.md.erb index 187f340..fe0d104 100644 --- a/docs/geode-native-docs/getting-started/getting-started-nc-client.html.md.erb +++ b/docs/geode-native-docs/getting-started/getting-started-nc-client.html.md.erb @@ -41,6 +41,10 @@ To connect to a server, your application must follow these steps: Once the connection pool and the shared region are in place, your client application is ready to share data with the server. +**Code Snippet Test** + +<%= yield_for_code_snippet from: 'examples', at: 'put-get-remove-snippetA' %> + **C++ Example** This example of connecting to the server is taken from the C++ `put-get-remove` example. diff --git a/examples/cpp/put-get-remove/main.cpp b/examples/cpp/put-get-remove/main.cpp index 8005682..c0ba100 100644 --- a/examples/cpp/put-get-remove/main.cpp +++ b/examples/cpp/put-get-remove/main.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +// code_snippet put-get-remove-snippetA start cpp #include <iostream> #include <geode/CacheFactory.hpp> @@ -60,3 +61,4 @@ int main(int argc, char** argv) { cache.close(); } +// code_snippet put-get-remove-snippetA end
