Sivelkiria Operating System repository

Commit 60451beb authored by Alexey's avatar Alexey
Browse files

add doxygen description to sdkbuilder.hpp

parent 6d13a5e8
......@@ -22,7 +22,7 @@ sdkbuilder::sdkbuilder(
construct(
_interface_parser->description_template_names,
_interface_parser->templates, _interface_parser->has_template,
"class", class_name, body);
"class", class_name, body );
delete _interface_parser;
} else if ( it->first == "Structure" ) {
_struct_parser= new struct_parser( it->second.c_str() );
......@@ -34,7 +34,7 @@ sdkbuilder::sdkbuilder(
struct_name+= "_" + _struct_parser->minor;
construct(
_struct_parser->description_template_names, _struct_parser->templates,
_struct_parser->has_template, "struct", struct_name, body);
_struct_parser->has_template, "struct", struct_name, body );
delete _struct_parser;
}
}
......@@ -44,7 +44,7 @@ void sdkbuilder::construct(
const std::vector<std::string> &descr_templ,
const std::vector<std::pair<std::string, std::string>> &templ,
const bool &has_template, const std::string type_obj,
const std::string name, const std::string &body) {
const std::string name, const std::string &body ) {
std::string _templ;
std::string description_template;
if ( has_template ) {
......@@ -63,17 +63,17 @@ void sdkbuilder::construct(
_templ.back()= ' '; //вставляем вместо последней запятой
_templ+= ">\n" + description_template;
}
construct_hpp(_templ, type_obj, body, name );
construct_hpp( _templ, type_obj, body, name );
}
void sdkbuilder::construct_hpp(
const std::string _template, const std::string type_obj,
const std::string &body,const std::string &name ) {
const std::string _template, const std::string type_obj,
const std::string &body, const std::string &name ) {
std::ofstream hpp_file( build_dir + name + ".hpp" );
hpp_file << "namespace SivDK{\n" << "namespace ";
if(type_obj == "class")
hpp_file << "Interfaces";
else if (type_obj == "struct")
hpp_file << "namespace SivDK{\n"
<< "namespace ";
if ( type_obj == "class" ) hpp_file << "Interfaces";
else if ( type_obj == "struct" )
hpp_file << "Structures";
else
hpp_file << "Error";
......
......@@ -11,62 +11,62 @@
*/
class sdkbuilder {
std::string build_dir= "./";
/*\brief write sdk
*\details wrtite sdk to build_dir folder
*\date 05.2020
*\param [in] descr_templ all descriptions of templates
*\param [in] templ all templates with default values
*\param [in] has_template flag indicate "is there a template?"
*\param [in] type_obj struct or class
*\param [in] normal_name name with him major and sometimes minor
*\param [in] body body of object
*\return void
*/
/*\brief write sdk
*\details wrtite sdk to build_dir folder
*\date 05.2020
*\param [in] descr_templ all descriptions of templates
*\param [in] templ all templates with default values
*\param [in] has_template flag indicate "is there a template?"
*\param [in] type_obj struct or class
*\param [in] normal_name name with him major and sometimes minor
*\param [in] body body of object
*\return void
*/
void construct(
const std::vector<std::string> &descr_templ,
const std::vector<std::pair<std::string, std::string>> &templ,
const bool &has_template, const std::string type_obj,
const std::string name, const std::string &body);
/*\brief write hpp file
*\details write to build_dir/objname.hpp
*\param [in] _template template code
*\param [in] type_obj struct or class
*\param [in] body body of object
*\param [in] name name of object
*\return void
*/
const std::string name, const std::string &body );
/*\brief write hpp file
*\details write to build_dir/objname.hpp
*\param [in] _template template code
*\param [in] type_obj struct or class
*\param [in] body body of object
*\param [in] name name of object
*\return void
*/
void construct_hpp(
const std::string _template, const std::string type_obj,
const std::string &body, const std::string &name );
/*\brief generate interface body
*\param [in] _interface_parser interface_parser object
*\param [in] normal_name name with him major and sometimes minor
*\return void
*/
const std::string _template, const std::string type_obj,
const std::string &body, const std::string &name );
/*\brief generate interface body
*\param [in] _interface_parser interface_parser object
*\param [in] normal_name name with him major and sometimes minor
*\return void
*/
std::string generate_interface_body(
const interface_parser *_interface_parser,
const std::string normal_name );
/*\brief generate structure body
*\param [in] _struct_parser struct_parser object
*\param [in] normal_name name with him major and sometimes minor
*\return void
*/
/*\brief generate structure body
*\param [in] _struct_parser struct_parser object
*\param [in] normal_name name with him major and sometimes minor
*\return void
*/
std::string generate_struct_body(
const struct_parser *_struct_parser, const std::string normal_name );
/*\brief write args to file
*\details write to file type1 arg1, type2 arg2,...
*\param [out] file reference to filestream object
*\param [in] it iterator for this method for foreach args
*\return void
*/
/*\brief write args to file
*\details write to file type1 arg1, type2 arg2,...
*\param [out] file reference to filestream object
*\param [in] it iterator for this method for foreach args
*\return void
*/
void write_args( std::string &file, std::vector<method>::const_iterator &it );
public:
/*\brief constructor
*\param [in] interfaces_filenames pairs (type, filename), where type - Interface or Structure
*\param [in] out_path folder for result files
*\return sdkbuilder
*/
/*\brief constructor
*\param [in] interfaces_filenames pairs (type, filename), where type -
*Interface or Structure \param [in] out_path folder for result files \return
*sdkbuilder
*/
sdkbuilder(
const std::vector<std::pair<std::string, std::string>>
&interfaces_filenames,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment