|
||
---|---|---|
.. | ||
README.md | ||
ceev.cc | ||
ceev.h |
README.md
CeeV Documentation
Includes
#include <SDL2/SDL.h>
#include <algorithm>
#include <ceev/colors.h>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <sstream>
Statics
#define __ceev_version
- The current version of CeeV
#define CONFIG_FILENAME
- The filename used in
ceev init
#define GIT_COMMIT_HASH
- The latest git commit hash, defined by cmake.
#define GIT_COMMIT_MSG
- The latest git commit message, defined by cmake.
#define GIT_COMMIT_DATE
- The latest git commit date, defined by cmake.
#define GIT_COMMIT_AUTHOR
- The author of the latest git commit, defined by cmake.
#define GET_PROGRAM_NAME()
- The program invocation name.
#define INPROG
- Shorthand for marking item as in progress in devel_roadmap()
#define TODO
- Shorthand for marking item as todo in devel_roadmap()
#define HALTED
- Shorthand for marking item as halted in devel_roadmap()
#define STATUS
- Shorthand for the status in devel_roadmap()
Structures
struct config_data {
std::string name = "";
std::string version = "";
std::string author = "";
std::string email = "";
};
- The struct for the configuration
Functions
static int usage();
-
Returns: int exit_code - Always 1
-
Shows the usage of the program.
static int show_help();
-
Returns: int exit_code - Always 0
-
Shows the help for the program when the user runs
ceev -h
.
static int buildinfo();
-
Returns: int exit_code - Always 0
-
Shows the build information when the user runs
ceev -B
.
bool replace(std::string& str, const std::string& from, const std::string& to);
-
Param: std::string& str - The input string to be modifyed
-
Param: const std::string& from - What to replace
-
Param: const std::string& to - What to replace with
-
Returns: bool success - Whether it was successful or not.
-
Replaces
from
withto
within the string.
static std::string query_author();
-
Returns: The string input in the function
-
Queries the user for a string to be used as the project author.
struct config_data get_config(bool ignore_err = false)
-
Param: int ignore_err - Normally false
-
Returns: struct config_data
-
Reads the config file and builds the config_data struct. Returns an empty struct if it cannot open the file. ignore_err suppresses the error message, used for
ceev devel sdl2 --use-defaults
.
int create_fs(std::deque<std::string> args);
-
Param: std::deque<std::string> args - The arguments from main(), with used values stripped out.
-
Returns: int exit_code
-
Creates the default file system.
int build_project(std::deque<std::string> args);
-
Param: std::deque<std::string> args - The arguments from main(), with used values stripped out.
-
Returns: int exit_code
-
Not yet implemented.
int run_project(std::deque<std::string> args);
-
Param: std::deque<std::string> args - The arguments from main(), with used values stripped out.
-
Returns: int exit_code
-
Not properly implemented yet, but prints out the config data and runs the SDL2 demo.
int clean_project(std::deque<std::string> args);
-
Param: std::deque<std::string> args - The arguments from main(), with used values stripped out.
-
Returns: int exit_code
-
Not yet implemented
int devel(std::deque<std::string> args);
-
Param: std::deque<std::string> args - The arguments from main(), with used values stripped out.
-
Returns: int exit_code
-
The subcommand
ceev devel
. Parses the inputs and runs supplementary functions.
int devel_help();
-
Returns: int exit_code
-
Shows the help page for
ceev devel
.
int devel_roadmap();
-
Returns: int exit_code
-
Shows the current roadmap.
int devel_sdl2(std::deque<std::string> args);
-
Param: std::deque<std::string> args - The arguments from main(), with used values stripped out.
-
Returns: int exit_code
-
Runs a small demo with SDL2. Running with the
--use-defaults
flag doesn't require you to use a config file.
int devel_lang(std::deque<std::string> args);
-
Param: std::deque<std::string> args - The arguments from main(), with used values stripped out.
-
Returns: int exit_code
-
Not yet implemented
int main(int argc, char **argv);
-
Param: int argc - The number of arguments
-
Param: char **argv - An array of the arguments
-
Returns: int exit_code
-
The entrypoint. Parses the arguments and puts them into a deque. It then runs the other functions based on what has been input in the arguments.