From adb097edae74a883e6b3fdf919564dd5cb4b3d5e Mon Sep 17 00:00:00 2001 From: ZhuangYumin Date: Fri, 13 Oct 2023 10:56:32 +0800 Subject: [PATCH] set up the file structure --- checker/CMakeLists.txt | 3 ++- checker/casemanager.cpp | 7 +++++++ checker/judger.cpp | 8 ++++++++ src/main.cpp | 39 +++++++++++++++++++++++++++++++-------- 4 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 checker/judger.cpp diff --git a/checker/CMakeLists.txt b/checker/CMakeLists.txt index 9a9fc2e..6057ca8 100644 --- a/checker/CMakeLists.txt +++ b/checker/CMakeLists.txt @@ -2,4 +2,5 @@ set(PROJECT_NAME ${CMAKE_PROJECT_NAME}) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_FLAGS "-g -O2") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/sqlite-amalgamation-3430200) -add_executable(casemanager casemanager.cpp sqlite-amalgamation-3430200/sqlite3.c) \ No newline at end of file +add_executable(casemanager casemanager.cpp sqlite-amalgamation-3430200/sqlite3.c) +add_executable(judger judger.cpp) \ No newline at end of file diff --git a/checker/casemanager.cpp b/checker/casemanager.cpp index 514156d..5636c81 100644 --- a/checker/casemanager.cpp +++ b/checker/casemanager.cpp @@ -1,5 +1,12 @@ +/** + * @file casemanager.cpp + * + * @brief this is the casemanager of ICPC-Management-System to manage the test + * cases. + */ #include #include +#include static int callback(void *NotUsed, int argc, char **argv, char **azColName) { int i; diff --git a/checker/judger.cpp b/checker/judger.cpp new file mode 100644 index 0000000..51f3353 --- /dev/null +++ b/checker/judger.cpp @@ -0,0 +1,8 @@ +/** + * @file judger.cpp + * + * @brief this is the judger of ICPC-Management-System to test the code. +*/ +int main(int argc,char* argv[]){ + return 0; +} \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index bacd2b9..f5dfa71 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,10 +1,33 @@ /** + * @file main.cpp + * * @brief this is the main code of ICPC-Management-System - * - * @details . -*/ -#include -int main() -{ - return 0; -} \ No newline at end of file + * + * @details In the function main(), the program will read the input data and + * call the APIs. Then the APIs will call the detailed functions to do the real + * work. + * + * @codesytle This file is written in a sytle mainly based on Google C++ Style + * Guide. What's sepecial is the comment: + * 1. Multi-line comments are always before the code they comment on. + * Usually the code they comment on is a complex procedure,like the definition + * of a function,a class or a variable with complex operation. If a multi-line + * comment is in one line, it will start with "/*" instead of "/**",otherwise it + * will start with "/**" and in the format of Doxygen. + * 2. Single-line comments are always after the code they comment on. + * Usually they are in the same line with the code they comment on,but sometimes + * they may come in the next lines. single-line comments shouldn't exceed 3 + * lines as they are intended to be short and easy to understand. + * 3. Temporary disabled code will be marked with "//" in the front of each + * 4. Some comments have special meanings,like "//TODO", "//FIXME", "//XXX","// + * clang-format off" and "// clang-format on". They are not controlled by the + * previous rules. + * + * As I use Clang-format to format my code, so the code style may be a little + * bit strange sometimes, in the case I'll manually format the code. + */ +#include +#include +#include +using namespace std; +int main() { return 0; } \ No newline at end of file