Created
April 4, 2016 03:11
-
-
Save JISyed/b814324aedac81600b602f0b7f4e844c to your computer and use it in GitHub Desktop.
A collection of C++ snippets that are useful for Xcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================== | |
/// <#Insert description of new class here#> | |
class <#NewClassName#> | |
{ | |
public: | |
// | |
// Essentials | |
// | |
// Default Ctor | |
<#NewClassName#>(); | |
// Copy Ctor | |
<#NewClassName#>(const <#NewClassName#>& other); | |
// Copy Assignment | |
<#NewClassName#>& operator=(const <#NewClassName#>& rhs); | |
// Destructor | |
~<#NewClassName#>(); | |
// | |
// Methods | |
// | |
<#methods#> | |
private: | |
// | |
// Data | |
// | |
<#data members#> | |
}; | |
//================================================================== | |
// Default Ctor | |
<#NewClassName#>::<#NewClassName#>() | |
{ | |
} | |
// Copy Ctor | |
<#NewClassName#>::<#NewClassName#>(const <#NewClassName#>& other) | |
{ | |
other; // Use this somehow | |
} | |
// Copy Assignment Overload | |
<#NewClassName#>& <#NewClassName#>::operator=(const <#NewClassName#>& rhs) | |
{ | |
if(this == &rhs) | |
{ | |
return *this; | |
} | |
<#// Do assignments here#> | |
return *this; | |
} | |
// Dtor | |
<#NewClassName#>::~<#NewClassName#>() | |
{ | |
} | |
//================================================================== | |
/// <#Describe the new enum here#> | |
enum <#NewEnumName#> | |
{ | |
<#// new members here#> | |
}; | |
//================================================================== | |
/// <#Describe new enum class here#> | |
enum class <#NewEnumClassName#> : int | |
{ | |
<#// New members here#> | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment