-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
24 changed files
with
1,801 additions
and
1,141 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
wsjcpp-storages | ||
tmp/* | ||
.wsjcpp/* | ||
|
||
# Prerequisites | ||
*.d | ||
|
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,81 @@ | ||
#!/usr/bin/wsjcpp-safe-scripting | ||
|
||
# log_info rootdir | ||
# log_info script_filename | ||
|
||
make_dir "src" | ||
|
||
var user_class_name | ||
set_value user_class_name arg1 | ||
normalize_class_name user_class_name | ||
convert_CamelCase_to_snake_case user_class_name user_class_name | ||
|
||
var class_name | ||
set_value class_name arg1 | ||
normalize_class_name class_name | ||
|
||
var base_filename | ||
convert_CamelCase_to_snake_case class_name base_filename | ||
# log_info base_filename | ||
|
||
var filename_cpp | ||
concat filename_cpp "./src/" base_filename ".cpp" | ||
|
||
var filename_h | ||
concat filename_h "./src/" base_filename ".h" | ||
|
||
var ifndef_header | ||
set_value ifndef_header base_filename | ||
concat ifndef_header "_H" | ||
|
||
to_upper_case ifndef_header | ||
|
||
var content_header | ||
concat content_header "#ifndef " ifndef_header " | ||
#define " ifndef_header " | ||
|
||
#include <string> | ||
|
||
class " class_name " { | ||
public: | ||
" class_name "(); | ||
|
||
private: | ||
std::string TAG; | ||
}; | ||
|
||
#endif // " ifndef_header | ||
|
||
|
||
var content_source | ||
concat content_source " | ||
#include \"" base_filename ".h\" | ||
#include <wsjcpp_core.h> | ||
|
||
// --------------------------------------------------------------------- | ||
// " class_name " | ||
|
||
" class_name "::" class_name "() { | ||
TAG = \"" class_name "\"; | ||
} | ||
|
||
" | ||
|
||
var file_source | ||
concat file_source "src/" filename_cpp | ||
|
||
write_file filename_h content_header | ||
write_file filename_cpp content_source | ||
|
||
log_info " | ||
====== | ||
Generated class: | ||
- " class_name " | ||
Generated files: | ||
- " filename_h " | ||
- " filename_cpp " | ||
====== | ||
" | ||
|
||
cmakelists_txt_append_wsjcpp filename_h | ||
cmakelists_txt_append_wsjcpp filename_cpp |
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,81 @@ | ||
wsjcpp_version: v0.0.1 | ||
cmake_cxx_standard: 11 | ||
cmake_minimum_required: 3.0 | ||
|
||
name: wsjcpp-core | ||
version: v0.1.4 | ||
description: Basic Utils for wsjcpp | ||
issues: https://github.com/wsjcpp/wsjcpp-core/issues | ||
repositories: | ||
- type: main | ||
url: "https://github.com/wsjcpp/wsjcpp-core" | ||
keywords: | ||
- c++ | ||
- wsjcpp | ||
|
||
authors: | ||
- name: Evgenii Sopov | ||
email: mrseakg@gmail.com | ||
|
||
distribution: | ||
- source-file: src/wsjcpp_core.cpp | ||
target-file: wsjcpp_core.cpp | ||
type: "source-code" | ||
- source-file: src/wsjcpp_core.h | ||
target-file: wsjcpp_core.h | ||
type: "source-code" # todo must be header-file | ||
- source-file: "src/wsjcpp_unit_tests.cpp" | ||
target-file: "wsjcpp_unit_tests.cpp" | ||
type: "unit-tests" | ||
- source-file: "src/wsjcpp_unit_tests.h" | ||
target-file: "wsjcpp_unit_tests.h" | ||
type: "unit-tests" | ||
- source-file: "src/wsjcpp_unit_tests_main.cpp" | ||
target-file: "wsjcpp_unit_tests_main.cpp" | ||
type: "unit-tests" | ||
- source-file: "scripts.wsjcpp/generate.Class" | ||
target-file: "generate.Class" | ||
type: "safe-scripting-generate" | ||
- source-file: "src/wsjcpp_resources_manager.h" | ||
target-file: "wsjcpp_resources_manager.h" | ||
type: "source-code" | ||
- source-file: "src/wsjcpp_resources_manager.cpp" | ||
target-file: "wsjcpp_resources_manager.cpp" | ||
type: "source-code" | ||
|
||
unit-tests: | ||
cases: | ||
- name: CoreNormalizePath | ||
description: Check function normalizePath | ||
- name: CoreUuid | ||
description: Check test generate uuid function | ||
- name: CoreExtractFilename | ||
description: Check function extract filenane from path | ||
- name: "ToUpper" | ||
description: "String to upper" | ||
- name: "CreateUuid" | ||
description: "Test generation uuids" | ||
- name: "GetEnv" | ||
description: "Test getEnv function" | ||
- name: "ToLower" | ||
description: "Test toLower" | ||
- name: "ReplaceAll" | ||
description: "Test replace all" | ||
- name: "DecodeUriComponent" | ||
description: "Check decoding" | ||
- name: "EncodeUriComponent" | ||
description: "Check encoding" | ||
- name: "Uint2HexString" | ||
description: "Test convert unsigned int to hex string" | ||
- name: "Split" | ||
description: "Test split function" | ||
- name: "CreateEmptyFile" | ||
description: "Test create empty file" | ||
- name: "ReadFileToBuffer" | ||
description: "test for readFileToBuffer" | ||
- name: "Join" | ||
description: "Test join function" | ||
- name: "getHumanSizeBytes" | ||
description: "Test function get human size in bytes" | ||
- name: "TestResources" | ||
description: "Test basic resources" |
Oops, something went wrong.