24#define AUTODOC_SUCCESS 0
25#define AUTODOC_FAILURE 1
85 AutoDoc(
unsigned int string_alloc=4096);
96 int file(
const std::string &filename);
97 std::string
file() {
return _filename;}
104 int title(
const std::string &str);
112 int author(
const std::string &name,
const std::string &email=
"");
127 int addText(
const std::string &str);
133 int addImage(
const std::string &
file,
const std::string &alias=
"");
150 int addTable(
const std::vector<std::vector<std::string>> &data,
151 const std::vector<std::string> &col_headers={},
152 const std::vector<std::string> &row_headers={},
153 bool write_method=
true);
169 int addTable(
const std::vector<std::vector<long int>> &data,
170 const std::vector<std::string> &col_headers={},
171 const std::vector<std::string> &row_headers={},
172 bool write_method=
true);
188 int addTable(
const std::vector<std::vector<double>> &data,
189 const std::vector<std::string> &col_headers={},
190 const std::vector<std::string> &row_headers={},
191 bool write_method=
true);
202 int addLink(
const std::string &link,
const std::string &alias=
"");
208 int addDocReference(
const std::string &name,
const std::string &alias=
"");
217 template <
typename T>
218 int _addTable(
const std::vector<std::vector<T>> &data,
219 const std::vector<std::string> &col_headers,
220 const std::vector<std::string> &row_headers,
226 void _write(
const std::string &str);
231 void _write(
long int val);
236 void _write(
double val);
244 std::string _filename;
249 std::string _internal_str =
"";
254 bool _file_lock =
false;
255 bool _title_lock =
false;
256 bool _author_lock =
false;
int addText(const std::string &str)
Function to add an exact string to a document.
Definition AutoDoc.cpp:114
void closeFile()
Function to close the file held internally by AutoDoc.
Definition AutoDoc.cpp:213
int addLink(const std::string &link, const std::string &alias="")
Function to add an external link to the document.
Definition AutoDoc.cpp:178
int addCodeBlock(const std::string &str)
Function to add a code block to a document.
Definition AutoDoc.cpp:164
std::string file()
Definition AutoDoc.h:97
~AutoDoc()
Destructor – just closes our file.
Definition AutoDoc.h:88
AutoDoc(unsigned int string_alloc=4096)
Default constructor for the AutoDoc class.
Definition AutoDoc.cpp:22
int addDocReference(const std::string &name, const std::string &alias="")
Function to add a link to another asciidoc document.
Definition AutoDoc.cpp:196
int addTable(const std::vector< std::vector< std::string > > &data, const std::vector< std::string > &col_headers={}, const std::vector< std::string > &row_headers={}, bool write_method=true)
Function to write a table to our document.
Definition AutoDoc.cpp:143
int addPrimaryHeader(const std::string &str)
Function to add a primary header to document.
Definition AutoDoc.cpp:88
int addSecondaryHeader(const std::string &str)
Function to add a secondary header to document.
Definition AutoDoc.cpp:101
int title(const std::string &str)
Function to write a title to the document.
Definition AutoDoc.cpp:51
int addImage(const std::string &file, const std::string &alias="")
Function to add an image to the document.
Definition AutoDoc.cpp:127
int author(const std::string &name, const std::string &email="")
Function to write author name and email to document.
Definition AutoDoc.cpp:68
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
const std::string TABLE_LINE_START
Definition AutoDoc.h:44
const std::string ALIAS_END
Definition AutoDoc.h:48
const std::string DOC_REF_START
Definition AutoDoc.h:53
const std::string TITLE
Definition AutoDoc.h:30
const std::string HEADER_TWO
Definition AutoDoc.h:37
const std::string TABLE_HEADER_START
Definition AutoDoc.h:41
const std::string TABLE_MARKER
Definition AutoDoc.h:43
const std::string AUTHOR_EMAIL_END
Definition AutoDoc.h:33
const std::string LINK_START
Definition AutoDoc.h:50
const std::string TABLE_HEADER_END
Definition AutoDoc.h:42
const std::string AUTHOR_EMAIL_START
Definition AutoDoc.h:32
const std::string ALIAS_START
Definition AutoDoc.h:47
const std::string LINK_END
Definition AutoDoc.h:51
const std::string CODE_LITERAL
Definition AutoDoc.h:39
const std::string HEADER_ONE
Definition AutoDoc.h:35
const std::string IMAGE_START
Definition AutoDoc.h:46