소스 검색

Modify template

Etheram68 5 년 전
부모
커밋
a2d72104a1
3개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 1
      README.md
  2. 1 1
      package.json
  3. 5 5
      src/template.ts

+ 1 - 1
README.md

@@ -39,7 +39,7 @@ To report a bug or ask for a feature, please open a [Github issue](https://githu
 
 ## Release Notes
 
-### 0.2.3 / 0.2.4
+### 0.2.3 / 0.2.5
 Modify template for align call function on cpp file
 
 ### 0.2.1 / 0.2.2

+ 1 - 1
package.json

@@ -2,7 +2,7 @@
 	"name": "canonicalclasscpp",
 	"displayName": "42 Canonical Class CPP",
 	"description": "This extension is to automatically create a canonical hpp and cpp file",
-	"version": "0.2.4",
+	"version": "0.2.5",
 	"publisher": "frfreyCanonicalClassCPP",
 	"icon": "42.png",
 	"repository": {

+ 5 - 5
src/template.ts

@@ -26,21 +26,21 @@ export const getTemplate = ( name: string | undefined, filePathCpp: vscode.Uri ,
 		}
 
 		let classcpp =  "#include \"" + name + ".Class" + ".hpp\"\n" +
-						"\n/*\n * ------------------------------- CONSTRUCTOR --------------------------------\n */\n\n" +
+						"\n/*\n** ------------------------------- CONSTRUCTOR --------------------------------\n*/\n\n" +
 						name + "::" + name + "()\n{\n	std::cout << \"Default constructor called\"" +
 						" << std::endl;\n}\n\n" +
 						name + "::" + name + "( const " + name + " & src )\n{\n" +
 						"	std::cout << \"Copy constructor called\" << std::endl;\n" +
 						"	*this = src;\n}\n\n" +
-						"\n/*\n * -------------------------------- DESTRUCTOR --------------------------------\n */\n\n" +
+						"\n/*\n** -------------------------------- DESTRUCTOR --------------------------------\n*/\n\n" +
 						name + "::~" + name + "()\n{\n	std::cout << \"Destructor called\" << std::endl;\n}\n\n" +
-						"\n/*\n * --------------------------------- OVERLOAD ---------------------------------\n */\n\n" +
+						"\n/*\n** --------------------------------- OVERLOAD ---------------------------------\n*/\n\n" +
 						name + " &				" + name + "::operator=( " + name + " const & rhs )\n{\n	//if ( this != &rhs )\n" +
 						"		//this->_value = rhs.getValue();\n" +
 						"	return *this;\n}\n\n" +
 						"std::ostream &		operator<<( std::ostream & o, " + name + " const & i )\n" +
 						"{\n	//o << \"Value = \" << i.getValue();\n	return o;\n}\n\n" +
-						"\n/*\n * --------------------------------- METHODS --------------------------------- \n */\n\n" +
+						"\n/*\n** --------------------------------- METHODS ----------------------------------\n*/\n\n" +
 						"\n/* ************************************************************************** */";
 
 		let classhpp =	"#ifndef " + name.toUpperCase() + "_CLASS" + "_HPP\n" +
@@ -56,7 +56,7 @@ export const getTemplate = ( name: string | undefined, filePathCpp: vscode.Uri ,
 						"\n" +
 						"		" + name + " &		operator=( " + name + " const & rhs );"+
 						"\n\n" +
-						"	private:\n" +
+						"	private:\n\n" +
 						"};\n\n" +
 						"std::ostream &		operator<<( std::ostream & o, " + name + " const & i );"+
 						"\n\n" +