File: generate-cpp-files.sh

package info (click to toggle)
camitk 6.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 389,496 kB
  • sloc: cpp: 103,476; sh: 2,448; python: 1,618; xml: 984; makefile: 128; perl: 84; sed: 20
file content (34 lines) | stat: -rwxr-xr-x 736 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

echo "===== Extracting Test library C++ source code files ====="

# ---------------------- TestLib.h ----------------------
# Example taken from distributed source ./sdk/libraries/cepcoreschema/testdata/TestLib.h
cat <<EOF > TestLib.h
#ifndef TESTLIB_H
#define TESTLIB_H

// A simple test library
class TestLib {

public:
    static void test();
};

#endif // TESTLIB_H
EOF

# ---------------------- TestLib.cpp ----------------------
# Example taken from distributed source ./sdk/libraries/cepcoreschema/testdata/TestLib.cpp
cat <<EOF > TestLib.cpp
#include "TestLib.h"

#include <iostream>

// --------------- test -------------------
void TestLib::test() {
    std::cout << "Test output" << std::endl;
}
EOF

echo "[OK]"