ソースを参照

Modify template for more lisibility and correct error new line

Etheram68 5 年 前
コミット
586709728b
3 ファイル変更13 行追加7 行削除
  1. 4 1
      README.md
  2. 1 1
      package.json
  3. 8 5
      src/template.ts

+ 4 - 1
README.md

@@ -42,7 +42,10 @@ To report a bug or ask for a feature, please open a [Github issue](https://githu
 
 ## Release Notes
 
-## 0.3.0 / 0.3.1
+##  0.3.2
+Modify template for more lisibility and correct error new line
+
+### 0.3.0 / 0.3.1
 Add canonical Class for template (file extension .tpp)
 
 ### 0.2.8

+ 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.3.1",
+	"version": "0.3.2",
 	"publisher": "frfreyCanonicalClassCPP",
 	"icon": "42.png",
 	"repository": {

+ 8 - 5
src/template.ts

@@ -84,19 +84,22 @@ export const getTemplateTpp = ( name: string | undefined, filePathTpp: vscode.Ur
 						"# define " + name.toUpperCase() + "_TPP\n\n" +
 						"# include <iostream>\n" +
 						"# include <string>\n\n" +
-						"template < typename T >" +
+						"template < typename T >\n" +
 						"class " + name + "\n{\n" +
 						"\n" +
 						"	public:\n" +
 						"\n" +
+						"\n	/*\n	** ------------------------------- CONSTRUCTOR --------------------------------\n	*/\n\n" +
 						"		" + name + "() {};\n" +
-						"		" + name + "( " + name + " const & src ) {};\n" +
-						"		~" + name + "() {};\n" +
-						"\n" +
+						"		" + name + "( " + name + " const & src ) {};\n\n" +
+						"\n	/*\n	** -------------------------------- DESTRUCTOR --------------------------------\n	*/\n\n" +
+						"		~" + name + "() {};\n\n" +
+						"\n	/*\n	** --------------------------------- OVERLOAD ---------------------------------\n	*/\n\n" +
 						"		" + name + " &		operator=( " + name + " const & rhs )\n		{\n			//if ( this != &rhs )\n" +
 						"			//{\n				//this->_value = rhs.getValue();\n			//}\n" +
 						"			return *this;\n		}\n\n" +
-						"\n\n" +
+						"\n	/*\n	** --------------------------------- METHODS ----------------------------------\n	*/\n\n" +
+						"\n" +
 						"	private:\n\n" +
 						"};\n\n" +
 						"#endif /* *" + star + " " + name.toUpperCase() + "_TPP */";