C++ Helper extension for VSCode.
- Generating implementation for c++ declarations.
- Generating header guard for headers.
The array of possible patterns to find the source of a header file.
Example:
"CppHelper.SourcePattern": [
"{FILE}.cpp",
"{FILE}.c",
"{FILE}.inl",
"/src/{FILE}.cpp"
]
Where {FILE} is your active header file name.
If you don't want a relative pattern then put a
/
as first character.
The pattern of header guard. Example:
"CppHelper.HeaderGuardPattern": "{FILE}_H"
Where {FILE} is your active header file name in UPPERCASE format.
Show or hide "Create Implementation" in context menu.
Show or hide "Create Implementation Here" in context menu.
Show or hide "Copy Implementation" in context menu.
Show or hide "Create Header Guard" in context menu.
What happen if source file of a header file not found.
- Implement in same file
- Create source file
- Show error
- Do nothing
Pairs of strings to find/replace within the path
Example:
"CppHelper.FindReplaceStrings": [
{
"find": "/include/Public",
"replace": "/src/Private"
}
],
Above configuration will replace all /include/Public
in your path to /src/Private
when trying to find source code of header file.
You can also use regular expressions.
"CppHelper.FindReplaceStrings": [
{
"find": "/include/Public/([^\\/]+)",
"replace": "/src/Private/$1"
}
],
If you implement a previously implemented function duplicate implementation will happen.
This extension created using regex and there is no parser/compiler. so any wrong implementation may happen. If you found any wrong implementation please let me know in issues and also don't forget to send your code sample.
Add new CppHelper.FindReplaceStrings
configuration (#70)
- Bug fixes (#49, #47, #41)
- Add functions and classes attributes support.
- Fix default parameter with parentheses bug (#35).
- Fix trailing parameters comment issue (#31).
- Fix code indent bug when EOL was
LF
. - Fix member
operator +
,operator -
bug. - Cast operator support added.
- Fix bugs (#12, #13).
Copy Implementation
to clipboard command added (#11).- Create source file if not found (#14).
- Improved order of implementation.
- Add
Create Implementation Here
command. (#7) - Add setting to hide context menu items.
- Bug #5 fixed.
- Bug #4 fixed.
- Fix bug in Linux. (#1, #2)
- Argument with default value implementation bug fixed.
- Class template specialization support added.
- Regex to find previous implementation improved.
- Bug with
operator()
fixed. SourcePattern
configuration bug fixed.
- Keeping the order of implementations synced to declarations as much as possible.