From b57809aaef8d884f645f808f66ad56c30afd6d01 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 27 Jun 2016 12:38:35 -0400 Subject: [PATCH] Doc: cmake example: fix coding style Signed-off-by: Mathieu Desnoyers --- .../cmake-multiple-shared-libraries/README.md | 4 ++-- .../cmake-multiple-shared-libraries/aligner-lib.cpp | 4 ++-- .../cmake-multiple-shared-libraries/aligner-lib.h | 2 +- .../cmake-multiple-shared-libraries/aligner.cpp | 2 +- .../cmake-multiple-shared-libraries/tester-lib.cpp | 4 ++-- .../cmake-multiple-shared-libraries/tester-lib.h | 2 +- .../cmake-multiple-shared-libraries/tester.cpp | 4 ++-- .../tracepoint-provider.h | 12 +++++------- 8 files changed, 16 insertions(+), 18 deletions(-) diff --git a/doc/examples/cmake-multiple-shared-libraries/README.md b/doc/examples/cmake-multiple-shared-libraries/README.md index 8b58246e..fc97a269 100644 --- a/doc/examples/cmake-multiple-shared-libraries/README.md +++ b/doc/examples/cmake-multiple-shared-libraries/README.md @@ -47,6 +47,6 @@ cat trace.txt The content of trace.txt should be: ``` -[21:45:34.940246019] (+?.?????????) osiris gydle_om:alignQuery: { cpu_id = 2 }, { queryName = "moleculeX" } -[21:45:34.940263188] (+0.000017169) osiris gydle_om:testAlignment: { cpu_id = 2 }, { alignment = "my-alignment" } +[21:45:34.940246019] (+?.?????????) osiris gydle_om:align_query: { cpu_id = 2 }, { query_name = "moleculeX" } +[21:45:34.940263188] (+0.000017169) osiris gydle_om:test_alignment: { cpu_id = 2 }, { alignment = "my-alignment" } ``` diff --git a/doc/examples/cmake-multiple-shared-libraries/aligner-lib.cpp b/doc/examples/cmake-multiple-shared-libraries/aligner-lib.cpp index 946e5e3a..77011665 100644 --- a/doc/examples/cmake-multiple-shared-libraries/aligner-lib.cpp +++ b/doc/examples/cmake-multiple-shared-libraries/aligner-lib.cpp @@ -25,9 +25,9 @@ #include "aligner-lib.h" #include "tracepoint-provider.h" -void alignQuery(const std::string & queryName) +void align_query(const std::string &query_name) { - tracepoint(gydle_om, alignQuery, queryName.c_str()); + tracepoint(gydle_om, align_query, query_name.c_str()); /* Do the actual alignment */ /* ... */ diff --git a/doc/examples/cmake-multiple-shared-libraries/aligner-lib.h b/doc/examples/cmake-multiple-shared-libraries/aligner-lib.h index d3b40c56..16fb4fc8 100644 --- a/doc/examples/cmake-multiple-shared-libraries/aligner-lib.h +++ b/doc/examples/cmake-multiple-shared-libraries/aligner-lib.h @@ -25,6 +25,6 @@ #include -void alignQuery(const std::string & queryName); +void align_query(const std::string &queryName); #endif diff --git a/doc/examples/cmake-multiple-shared-libraries/aligner.cpp b/doc/examples/cmake-multiple-shared-libraries/aligner.cpp index 19adfcee..d6933686 100644 --- a/doc/examples/cmake-multiple-shared-libraries/aligner.cpp +++ b/doc/examples/cmake-multiple-shared-libraries/aligner.cpp @@ -24,7 +24,7 @@ int main(int argc, char **argv) { - alignQuery("molecule-foo"); + align_query("molecule-foo"); return 0; } diff --git a/doc/examples/cmake-multiple-shared-libraries/tester-lib.cpp b/doc/examples/cmake-multiple-shared-libraries/tester-lib.cpp index 8fb90a07..bc893ccf 100644 --- a/doc/examples/cmake-multiple-shared-libraries/tester-lib.cpp +++ b/doc/examples/cmake-multiple-shared-libraries/tester-lib.cpp @@ -25,7 +25,7 @@ #include "tester-lib.h" #include "tracepoint-provider.h" -void testAlignment(const std::string & alignment) +void test_alignment(const std::string &alignment) { - tracepoint(gydle_om, testAlignment, alignment.c_str()); + tracepoint(gydle_om, test_alignment, alignment.c_str()); } diff --git a/doc/examples/cmake-multiple-shared-libraries/tester-lib.h b/doc/examples/cmake-multiple-shared-libraries/tester-lib.h index 994fa00d..764d7d36 100644 --- a/doc/examples/cmake-multiple-shared-libraries/tester-lib.h +++ b/doc/examples/cmake-multiple-shared-libraries/tester-lib.h @@ -25,6 +25,6 @@ #include -void testAlignment(const std::string & alignment); +void test_alignment(const std::string &alignment); #endif diff --git a/doc/examples/cmake-multiple-shared-libraries/tester.cpp b/doc/examples/cmake-multiple-shared-libraries/tester.cpp index 6bc486df..8368c932 100644 --- a/doc/examples/cmake-multiple-shared-libraries/tester.cpp +++ b/doc/examples/cmake-multiple-shared-libraries/tester.cpp @@ -26,10 +26,10 @@ int main(int argc, char **argv) { /* Generate alignment */ - alignQuery("moleculeX"); + align_query("moleculeX"); /* Test alignment */ - testAlignment("my-alignment"); + test_alignment("my-alignment"); return 0; } diff --git a/doc/examples/cmake-multiple-shared-libraries/tracepoint-provider.h b/doc/examples/cmake-multiple-shared-libraries/tracepoint-provider.h index 301f3571..5c5c480e 100644 --- a/doc/examples/cmake-multiple-shared-libraries/tracepoint-provider.h +++ b/doc/examples/cmake-multiple-shared-libraries/tracepoint-provider.h @@ -33,28 +33,26 @@ TRACEPOINT_EVENT( TRACEPOINT_PROVIDER, - alignQuery, + align_query, TP_ARGS( - const char*, queryName + const char *, query_name ), TP_FIELDS( - ctf_string(queryName, queryName) + ctf_string(query_name, query_name) ) ) TRACEPOINT_EVENT( TRACEPOINT_PROVIDER, - testAlignment, + test_alignment, TP_ARGS( - const char*, alignment + const char *, alignment ), TP_FIELDS( ctf_string(alignment, alignment) ) ) - - #endif /* MY_TRACEPOINT_PROVIDER_H */ #include -- 2.34.1