1
0
mirror of https://github.com/amix/vimrc synced 2025-07-07 08:45:00 +08:00

rename vim_plugins_src to vim_plugin_candinates_src and used as an plugin candinate dir

This commit is contained in:
hustcalm
2012-10-29 18:20:36 +08:00
parent b27590fbb4
commit b64930e3e7
486 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,30 @@
$
$ =============================================================
$ ========== USER MACROS ======================================
$ =============================================================
$
|AUTHOR| = YOUR NAME
|AUTHORREF| =
|EMAIL| =
|COMPANY| =
|COPYRIGHT| = Copyright (c) |YEAR|, |AUTHOR|
|STYLE| = default
$
$ =============================================================
$ ========== FILE INCLUDES ====================================
$ =============================================================
$
|includefile| = c.comments.template
|includefile| = c.cpp.template
|includefile| = c.idioms.template
|includefile| = c.preprocessor.template
|includefile| = c.statements.template
$
== IF |STYLE| IS CPP ==
|includefile| = cpp.comments.template
|includefile| = cpp.cpp.template
|includefile| = cpp.idioms.template
|includefile| = cpp.preprocessor.template
|includefile| = cpp.statements.template
== ENDIF ==
$

View File

@ -0,0 +1,179 @@
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.end-of-line-comment == append ==
/* <CURSOR> */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.frame ==
/*-----------------------------------------------------------------------------
* <CURSOR>
*-----------------------------------------------------------------------------*/
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.function ==
/*
* === FUNCTION ======================================================================
* Name: |?FUNCTION_NAME|
* Description: <CURSOR>
* =====================================================================================
*/
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.method ==
/*
*--------------------------------------------------------------------------------------
* Class: |?CLASSNAME|
* Method: |?CLASSNAME| :: |?METHODNAME|
* Description: <CURSOR>
*--------------------------------------------------------------------------------------
*/
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.class ==
/*
* =====================================================================================
* Class: |?CLASSNAME|
* Description: <CURSOR>
* =====================================================================================
*/
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-description == start ==
/*
* =====================================================================================
*
* Filename: |FILENAME|
*
* Description: <CURSOR>
*
* Version: 1.0
* Created: |DATE| |TIME|
* Revision: none
* Compiler: gcc
*
* Author: |AUTHOR| (|AUTHORREF|), |EMAIL|
* Organization: |ORGANIZATION|
*
* =====================================================================================
*/
#include <stdlib.h>
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-description-header == start ==
/*
* =====================================================================================
*
* Filename: |FILENAME|
*
* Description: <CURSOR>
*
* Version: 1.0
* Created: |DATE| |TIME|
* Revision: none
* Compiler: gcc
*
* Author: |AUTHOR| (|AUTHORREF|), |EMAIL|
* Organization: |ORGANIZATION|
*
* =====================================================================================
*/
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-header-includes ==
/* ##### HEADER FILE INCLUDES ################################################### */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-macros ==
/* ##### MACROS - LOCAL TO THIS SOURCE FILE ################################### */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-typedefs ==
/* ##### TYPE DEFINITIONS - LOCAL TO THIS SOURCE FILE ######################### */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-data-types ==
/* ##### DATA TYPES - LOCAL TO THIS SOURCE FILE ############################### */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-class-defs ==
/* ##### CLASS DEFINITIONS - LOCAL TO THIS SOURCE FILE ######################## */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-local-variables ==
/* ##### VARIABLES - LOCAL TO THIS SOURCE FILE ################################ */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-prototypes ==
/* ##### PROTOTYPES - LOCAL TO THIS SOURCE FILE ############################### */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-function-defs-exported ==
/* ##### FUNCTION DEFINITIONS - EXPORTED FUNCTIONS ############################ */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-function-defs-local ==
/* ##### FUNCTION DEFINITIONS - LOCAL TO THIS SOURCE FILE ##################### */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-class-implementations-exported ==
/* ##### CLASS IMPLEMENTATIONS - EXPORTED CLASSES ############################# */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-class-implementations-local ==
/* ##### CLASS IMPLEMENTATIONS - LOCAL CLASSES ################################ */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-header-includes ==
/* ##### HEADER FILE INCLUDES ################################################### */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-macros ==
/* ##### EXPORTED MACROS ######################################################## */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-exported-typedefs ==
/* ##### EXPORTED TYPE DEFINITIONS ############################################## */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-exported-data-types ==
/* ##### EXPORTED DATA TYPES #################################################### */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-exported-class-defs ==
/* ##### EXPORTED CLASS DEFINITIONS ############################################# */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-exported-variables ==
/* ##### EXPORTED VARIABLES ##################################################### */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-exported-function-declarations ==
/* ##### EXPORTED FUNCTION DECLARATIONS ######################################### */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.keyword-bug == append ==
/* :BUG:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
== comment.keyword-compiler == append ==
/* :COMPILER:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
== comment.keyword-todo == append ==
/* :TODO:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
== comment.keyword-tricky == append ==
/* :TRICKY:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
== comment.keyword-warning == append ==
/* :WARNING:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
== comment.keyword-workaround == append ==
/* :WORKAROUND:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
== comment.keyword-keyword == append ==
/* :|?KEYWORD:u|:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.special-empty == append ==
/* EMPTY */<CURSOR>
== comment.special-fall-through == append ==
/* FALL THROUGH */<CURSOR>
== comment.special-implicit-type-conversion == append ==
/* IMPLICIT TYPE CONVERSION */<CURSOR>
== comment.special-no-return == append ==
/* NO RETURN */<CURSOR>
== comment.special-not-reached == append ==
/* NOT REACHED */<CURSOR>
== comment.special-remains-to-be-implemented == append ==
/* REMAINS TO BE IMPLEMENTED */<CURSOR>
== comment.special-constant-type-is-long == append ==
/* constant type is long */<CURSOR>
== comment.special-constant-type-is-unsigned == append ==
/* constant type is unsigned */<CURSOR>
== comment.special-constant-type-is-unsigned-long == append ==
/* constant type is unsigned long */<CURSOR>
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -0,0 +1,484 @@
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
$
== cpp.cin ==
cin >> <CURSOR>;
$
== cpp.cout == insert ==
cout << <CURSOR> << endl;
$
== cpp.cout-operator == insert ==
<< "<CURSOR>"
$
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.output-manipulator-boolalpha == insert ==
<< boolalpha <CURSOR>
== cpp.output-manipulator-dec == insert ==
<< dec <CURSOR>
== cpp.output-manipulator-endl == insert ==
<< endl <CURSOR>
== cpp.output-manipulator-fixed == insert ==
<< fixed <CURSOR>
== cpp.output-manipulator-flush == insert ==
<< flush <CURSOR>
== cpp.output-manipulator-hex == insert ==
<< hex <CURSOR>
== cpp.output-manipulator-internal == insert ==
<< internal <CURSOR>
== cpp.output-manipulator-left == insert ==
<< left <CURSOR>
== cpp.output-manipulator-oct == insert ==
<< oct <CURSOR>
== cpp.output-manipulator-right == insert ==
<< right <CURSOR>
== cpp.output-manipulator-scientific == insert ==
<< scientific <CURSOR>
== cpp.output-manipulator-setbase == insert ==
<< setbase(10<CURSOR>)
== cpp.output-manipulator-setfill == insert ==
<< setfill(<CURSOR>)
== cpp.output-manipulator-setiosflag == insert ==
<< setiosflags(<CURSOR>)
== cpp.output-manipulator-setprecision == insert ==
<< setprecision(6<CURSOR>)
== cpp.output-manipulator-setw == insert ==
<< setw(0<CURSOR>)
== cpp.output-manipulator-showbase == insert ==
<< showbase <CURSOR>
== cpp.output-manipulator-showpoint == insert ==
<< showpoint <CURSOR>
== cpp.output-manipulator-showpos == insert ==
<< showpos <CURSOR>
== cpp.output-manipulator-uppercase == insert ==
<< uppercase <CURSOR>
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.method-implementation ==
void<CURSOR>
|?CLASSNAME|::|?METHODNAME| ( <+argument list+> )
{
return ;
} /* ----- end of method |CLASSNAME|::|?METHODNAME| ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.accessor-implementation ==
/*
*--------------------------------------------------------------------------------------
* Class: |?CLASSNAME|
* Method: get_|?ATTRIBUTE|
*--------------------------------------------------------------------------------------
*/
inline |?RETURNTYPE|
|CLASSNAME|::get_|ATTRIBUTE| ( ) const
{
return |ATTRIBUTE|;
} /* ----- end of method |CLASSNAME|::get_|ATTRIBUTE| ----- */
/*
*--------------------------------------------------------------------------------------
* Class: |CLASSNAME|
* Method: set_|ATTRIBUTE|
*--------------------------------------------------------------------------------------
*/
inline void
|CLASSNAME|::set_|ATTRIBUTE| ( |RETURNTYPE| value )
{
|ATTRIBUTE| = value;
return ;
} /* ----- end of method |CLASSNAME|::set_|ATTRIBUTE| ----- */
<CURSOR>
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.class-definition ==
/*
* =====================================================================================
* Class: |?CLASSNAME:c|
* Description: <CURSOR>
* =====================================================================================
*/
class |CLASSNAME|
{
public:
/* ==================== LIFECYCLE ======================================= */
|CLASSNAME| (); /* constructor */
/* ==================== ACCESSORS ======================================= */
/* ==================== MUTATORS ======================================= */
/* ==================== OPERATORS ======================================= */
protected:
/* ==================== DATA MEMBERS ======================================= */
private:
/* ==================== DATA MEMBERS ======================================= */
}; /* ----- end of class |CLASSNAME| ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.class-implementation ==
/*
*--------------------------------------------------------------------------------------
* Class: |?CLASSNAME:c|
* Method: |CLASSNAME|
* Description: constructor
*--------------------------------------------------------------------------------------
*/
|CLASSNAME|::|CLASSNAME| ()
{<CURSOR>
} /* ----- end of method |CLASSNAME|::|CLASSNAME| (constructor) ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.class-using-new-definition ==
/*
* =====================================================================================
* Class: |?CLASSNAME:c|
* Description: <CURSOR>
* =====================================================================================
*/
class |CLASSNAME|
{
public:
/* ==================== LIFECYCLE ======================================= */
|CLASSNAME| (); /* constructor */
|CLASSNAME| ( const |CLASSNAME| &other ); /* copy constructor */
~|CLASSNAME| (); /* destructor */
/* ==================== ACCESSORS ======================================= */
/* ==================== MUTATORS ======================================= */
/* ==================== OPERATORS ======================================= */
|CLASSNAME|& operator = ( const |CLASSNAME| &other ); /* assignment operator */
protected:
/* ==================== DATA MEMBERS ======================================= */
private:
/* ==================== DATA MEMBERS ======================================= */
}; /* ----- end of class |CLASSNAME| ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.class-using-new-implementation ==
/*
*--------------------------------------------------------------------------------------
* Class: |?CLASSNAME:c|
* Method: |CLASSNAME|
* Description: constructor
*--------------------------------------------------------------------------------------
*/
|CLASSNAME|::|CLASSNAME| ()
{<CURSOR>
} /* ----- end of method |CLASSNAME|::|CLASSNAME| (constructor) ----- */
/*
*--------------------------------------------------------------------------------------
* Class: |CLASSNAME|
* Method: |CLASSNAME|
* Description: copy constructor
*--------------------------------------------------------------------------------------
*/
|CLASSNAME|::|CLASSNAME| ( const |CLASSNAME| &other )
{
} /* ----- end of method |CLASSNAME|::|CLASSNAME| (copy constructor) ----- */
/*
*--------------------------------------------------------------------------------------
* Class: |CLASSNAME|
* Method: ~|CLASSNAME|
* Description: destructor
*--------------------------------------------------------------------------------------
*/
|CLASSNAME|::~|CLASSNAME| ()
{
} /* ----- end of method |CLASSNAME|::~|CLASSNAME| (destructor) ----- */
/*
*--------------------------------------------------------------------------------------
* Class: |CLASSNAME|
* Method: operator =
* Description: assignment operator
*--------------------------------------------------------------------------------------
*/
|CLASSNAME|&
|CLASSNAME|::operator = ( const |CLASSNAME| &other )
{
if ( this != &other ) {
}
return *this;
} /* ----- end of method |CLASSNAME|::operator = (assignment operator) ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.error-class ==
/*
* =====================================================================================
* Class: |?CLASSNAME:c|
* Description: <CURSOR>
* =====================================================================================
*/
class |CLASSNAME|
{
public: |CLASSNAME| ( string msg = "|CLASSNAME|" ):message(msg) { }
virtual ~|CLASSNAME| ( ) { }
virtual string what ( ) const throw ( ) { return message; }
protected: string message;
}; /* ----- end of class |CLASSNAME| ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-method-implementation ==
template < class T >
void<CURSOR> |?CLASSNAME|<T>::|?METHODNAME| ( <+argument list+> )
{
return ;
} /* ----- end of method |CLASSNAME|<T>::|METHODNAME| ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-accessor-implementation ==
/*
*--------------------------------------------------------------------------------------
* Class: |?CLASSNAME|
* Method: get_|?ATTRIBUTE|
*--------------------------------------------------------------------------------------
*/
template < class T >
inline |?RETURNTYPE| |CLASSNAME|<T>::get_|ATTRIBUTE| ( ) const
{
return |ATTRIBUTE|;
} /* ----- end of method |CLASSNAME|<T>::get_|ATTRIBUTE| ----- */
/*
*--------------------------------------------------------------------------------------
* Class: |CLASSNAME|
* Method: set_|ATTRIBUTE|
*--------------------------------------------------------------------------------------
*/
template < class T >
inline void |CLASSNAME|<T>::set_|ATTRIBUTE| ( |RETURNTYPE| value )
{
|ATTRIBUTE| = value;
return ;
} /* ----- end of method |CLASSNAME|<T>::set_|ATTRIBUTE| ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-class-definition ==
/*
* =====================================================================================
* Class: |?CLASSNAME:c|
* Description: <CURSOR>
* =====================================================================================
*/
template < class T >
class |CLASSNAME|
{
public:
/* ==================== LIFECYCLE ======================================= */
|CLASSNAME| (); /* constructor */
/* ==================== ACCESSORS ======================================= */
/* ==================== MUTATORS ======================================= */
/* ==================== OPERATORS ======================================= */
protected:
/* ==================== DATA MEMBERS ======================================= */
private:
/* ==================== DATA MEMBERS ======================================= */
}; /* ---------- end of template class |CLASSNAME| ---------- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-class-implementation ==
/*
*--------------------------------------------------------------------------------------
* Class: |?CLASSNAME:c|
* Method: |CLASSNAME|
* Description:
*--------------------------------------------------------------------------------------
*/
template < class T >
|CLASSNAME| < T >::|CLASSNAME| ()
{<CURSOR>
} /* ---------- end of constructor of template class |CLASSNAME| ---------- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-class-using-new-definition ==
/*
* =====================================================================================
* Class: |?CLASSNAME:c|
* Description: <CURSOR>
* =====================================================================================
*/
template < class T >
class |CLASSNAME|
{
public:
// ==================== LIFECYCLE =======================================
|CLASSNAME| (); /* constructor */
|CLASSNAME| ( const |CLASSNAME| &other ); /* copy constructor */
~|CLASSNAME| (); /* destructor */
/* ==================== ACCESSORS ======================================= */
/* ==================== MUTATORS ======================================= */
/* ==================== OPERATORS ======================================= */
|CLASSNAME|& operator = ( const |CLASSNAME| &other ); // assignment operator
protected:
/* ==================== DATA MEMBERS ======================================= */
private:
/* ==================== DATA MEMBERS ======================================= */
}; /* ----- end of template class |CLASSNAME| ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-class-using-new-implementation ==
/*
*--------------------------------------------------------------------------------------
* Class: |?CLASSNAME:c|
* Method: |CLASSNAME|
* Description: constructor
*--------------------------------------------------------------------------------------
*/
template < class T >
|CLASSNAME|< T >::|CLASSNAME| ()
{<CURSOR>
} /* ---------- end of constructor of template class |CLASSNAME| ---------- */
/*
*--------------------------------------------------------------------------------------
* Class: |CLASSNAME|
* Method: |CLASSNAME|
* Description: copy constructor
*--------------------------------------------------------------------------------------
*/
template < class T >
|CLASSNAME|< T >::|CLASSNAME| ( const |CLASSNAME| &other )
{
} /* ---------- end of copy constructor of template class |CLASSNAME| ---------- */
/*
*--------------------------------------------------------------------------------------
* Class: |CLASSNAME|
* Method: ~|CLASSNAME|
* Description: destructor
*--------------------------------------------------------------------------------------
*/
template < class T >
|CLASSNAME|< T >::~|CLASSNAME| ()
{
} /* ---------- end of destructor of template class |CLASSNAME| ---------- */
/*
*--------------------------------------------------------------------------------------
* Class: |CLASSNAME|
* Method: operator =
* Description: assignment operator
*--------------------------------------------------------------------------------------
*/
template < class T >
|CLASSNAME|< T >& |CLASSNAME|< T >::operator = ( const |CLASSNAME| &other )
{
return *this;
} /* ---------- end of assignment operator of template class |CLASSNAME| ---------- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-function ==
template <class T>
void<CURSOR> |?TEMPALTE_FUNCTION_NAME| ( <+argument list+> )
{
return ;
} /* ----- end of template function |?TEMPALTE_FUNCTION_NAME| ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.operator-in ==
ostream &
operator << ( ostream & os, const |?CLASSNAME| & obj )
{
os << obj.<CURSOR> ;
return os;
} /* ----- end of function operator << ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.operator-out ==
istream &
operator >> ( istream & is, |?CLASSNAME| & obj )
{
is >> obj.<CURSOR> ;
return is;
} /* ----- end of function operator >> ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.try-catch ==
try {
<SPLIT>}
catch ( const <CURSOR> &ExceptObj ) { /* handle exception: */
}
catch (...) { /* handle exception: unspecified */
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.catch ==
catch ( const <CURSOR> &ExceptObj ) { /* handle exception: */
<SPLIT>}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.catch-points ==
catch (...) { /* handle exception: unspecified */
<SPLIT>}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.extern ==
extern "C" {<CURSOR>
<SPLIT>}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.open-input-file ==
string ifs_file_name = "<CURSOR>"; /* input file name */
ifstream ifs; /* create ifstream object */
ifs.open ( ifs_file_name.c_str() ); /* open ifstream */
if (!ifs) {
cerr << "\nERROR : failed to open input file " << ifs_file_name << endl;
exit (EXIT_FAILURE);
}
<SPLIT>{-continue here-}
ifs.close (); /* close ifstream */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.open-output-file ==
string ofs_file_name = "<CURSOR>"; /* input file name */
ofstream ofs; /* create ofstream object */
ofs.open ( ofs_file_name.c_str() ); /* open ofstream */
if (!ofs) {
cerr << "\nERROR : failed to open output file " << ofs_file_name << endl;
exit (EXIT_FAILURE);
}
<SPLIT>{-continue here-}
ofs.close (); /* close ofstream */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.namespace-std ==
using namespace std;
== cpp.namespace ==
using namespace |?NAMESPACE|;
== cpp.namespace-block ==
namespace |?NAMESPACE| {<CURSOR>
<SPLIT>} /* ----- end of namespace |NAMESPACE| ----- */
== cpp.namespace-alias ==
namespace |?NAMESPACE_ALIAS| = {-original namespace name-};
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.rtti-typeid == insert ==
typeid(<CURSOR><SPLIT>)
$
== cpp.rtti-static-cast == insert ==
static_cast<>(<CURSOR><SPLIT>)
$
== cpp.rtti-const-cast == insert ==
const_cast<>(<CURSOR><SPLIT>)
$
== cpp.rtti-reinterpret-cast == insert ==
reinterpret_cast<>(<CURSOR><SPLIT>)
$
== cpp.rtti-dynamic-cast == insert ==
dynamic_cast<>(<CURSOR><SPLIT>)
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -0,0 +1,141 @@
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.function ==
/*
* === FUNCTION ======================================================================
* Name: |?FUNCTION_NAME|
* Description:
* =====================================================================================
*/
void<CURSOR>
|FUNCTION_NAME| ( <+argument list+> )
{
<SPLIT> return <+return value+>;
} /* ----- end of function |FUNCTION_NAME| ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.function-static ==
/*
* === FUNCTION ======================================================================
* Name: |?FUNCTION_NAME|
* Description:
* =====================================================================================
*/
static void<CURSOR>
|FUNCTION_NAME| ( <+argument list+> )
{
<SPLIT> return <+return value+>;
} /* ----- end of static function |FUNCTION_NAME| ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.main ==
#include <stdlib.h>
/*
* === FUNCTION ======================================================================
* Name: main
* Description:
* =====================================================================================
*/
int
main ( int argc, char *argv[] )
{<CURSOR>
<SPLIT> return EXIT_SUCCESS;
} /* ---------- end of function main ---------- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.enum ==
enum |?ENUM_NAME| {<CURSOR>
<SPLIT>}; /* ---------- end of enum |ENUM_NAME| ---------- */
typedef enum |ENUM_NAME| |ENUM_NAME:c|;
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.struct ==
struct |?STRUCT_NAME| {<CURSOR>
<SPLIT>}; /* ---------- end of struct |STRUCT_NAME| ---------- */
typedef struct |STRUCT_NAME| |STRUCT_NAME:c|;
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.union ==
union |?UNION_NAME| {<CURSOR>
<SPLIT>}; /* ---------- end of union |UNION_NAME| ---------- */
typedef union |UNION_NAME| |UNION_NAME:c|;
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.printf == insert ==
printf ( "<CURSOR>\n" );
== idioms.scanf == insert ==
scanf ( "<CURSOR>", & );
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.calloc ==
|?POINTER| = calloc ( (size_t)(<CURSOR><+COUNT+>), sizeof(<+TYPE+>) );
if ( |POINTER|==NULL ) {
fprintf ( stderr, "\ndynamic memory allocation failed\n" );
exit (EXIT_FAILURE);
}
free (|POINTER|);
|POINTER| = NULL;
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.malloc ==
|?POINTER| = malloc ( sizeof(<CURSOR><+TYPE+>) );
if ( |POINTER|==NULL ) {
fprintf ( stderr, "\ndynamic memory allocation failed\n" );
exit (EXIT_FAILURE);
}
free (|POINTER|);
|POINTER| = NULL;
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.realloc ==
|?POINTER| = realloc ( |POINTER|, sizeof(<CURSOR><+TYPE+>) );
if ( |POINTER|==NULL ) {
fprintf ( stderr, "\ndynamic memory reallocation failed\n" );
exit (EXIT_FAILURE);
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.sizeof == insert ==
sizeof(<CURSOR><SPLIT>)
== idioms.assert == insert ==
assert(<CURSOR><SPLIT>);
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.open-input-file ==
FILE *|?FILEPOINTER|; /* input-file pointer */
char *|FILEPOINTER|_file_name = "<CURSOR>"; /* input-file name */
|FILEPOINTER| = fopen( |FILEPOINTER|_file_name, "r" );
if ( |FILEPOINTER| == NULL ) {
fprintf ( stderr, "couldn't open file '%s'; %s\n",
|FILEPOINTER|_file_name, strerror(errno) );
exit (EXIT_FAILURE);
}
<SPLIT>{-continue here-}
if( fclose(|FILEPOINTER|) == EOF ) { /* close input file */
fprintf ( stderr, "couldn't close file '%s'; %s\n",
|FILEPOINTER|_file_name, strerror(errno) );
exit (EXIT_FAILURE);
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.open-output-file ==
FILE *|?FILEPOINTER|; /* output-file pointer */
char *|FILEPOINTER|_file_name = "<CURSOR>"; /* output-file name */
|FILEPOINTER| = fopen( |FILEPOINTER|_file_name, "w" );
if ( |FILEPOINTER| == NULL ) {
fprintf ( stderr, "couldn't open file '%s'; %s\n",
|FILEPOINTER|_file_name, strerror(errno) );
exit (EXIT_FAILURE);
}
<SPLIT>{-continue here-}
if( fclose(|FILEPOINTER|) == EOF ) { /* close output file */
fprintf ( stderr, "couldn't close file '%s'; %s\n",
|FILEPOINTER|_file_name, strerror(errno) );
exit (EXIT_FAILURE);
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.fprintf == insert ==
fprintf ( |?FILEPOINTER|, "<CURSOR>\n", );
== idioms.fscanf == insert ==
fscanf ( |?FILEPOINTER|, "<CURSOR>", & );
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -0,0 +1,54 @@
$-------------------------------------------------------------------------
== preprocessor.include-global == insert ==
#include <<CURSOR>>
$-------------------------------------------------------------------------
== preprocessor.include-local == insert ==
#include "<CURSOR>"
$-------------------------------------------------------------------------
== preprocessor.define == insert ==
#define <CURSOR> /* */
$-------------------------------------------------------------------------
== preprocessor.undefine == insert ==
#undef <CURSOR> /* */
$-------------------------------------------------------------------------
== preprocessor.if-endif ==
#if |?CONDITION:u|
<CURSOR><SPLIT>
#endif /* ----- |CONDITION| ----- */
$-------------------------------------------------------------------------
== preprocessor.if-else-endif ==
#if |?CONDITION:u|
<CURSOR><SPLIT>
#else /* ----- not |CONDITION| ----- */
<+ELSE PART+>
#endif /* ----- not |CONDITION| ----- */
$-------------------------------------------------------------------------
== preprocessor.ifdef-else-endif ==
#ifdef |?CONDITION:u|
<CURSOR><SPLIT>
#else /* ----- not |CONDITION| ----- */
<+ELSE PART+>
#endif /* ----- not |CONDITION| ----- */
$-------------------------------------------------------------------------
== preprocessor.ifndef-else-endif ==
#ifndef |?CONDITION:u|
<CURSOR><SPLIT>
#else /* ----- not |CONDITION| ----- */
<+ELSE PART+>
#endif /* ----- not |CONDITION| ----- */
$-------------------------------------------------------------------------
== preprocessor.ifndef-def-endif ==
#ifndef |?BASENAME:L|_INC
#define |BASENAME|_INC
<CURSOR><SPLIT>
#endif /* ----- #ifndef |BASENAME|_INC ----- */
$-------------------------------------------------------------------------
== preprocessor.error ==
#error "<CURSOR>" /* */
$-------------------------------------------------------------------------
== preprocessor.line ==
#line <CURSOR> /* */
$-------------------------------------------------------------------------
== preprocessor.pragma ==
#pragma <CURSOR> /* */
$-------------------------------------------------------------------------

View File

@ -0,0 +1,69 @@
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.do-while ==
do {
<SPLIT>} while ( <CURSOR> ); /* ----- end do-while ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.for ==
for ( <CURSOR>; ; )
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.for-block ==
for ( <CURSOR>; ; ) {
<SPLIT>}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.if ==
if ( <CURSOR> )
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.if-block ==
if ( <CURSOR> ) {
<SPLIT><-IF PART->
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.if-else ==
if ( <CURSOR> )
<SPLIT>else
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.if-block-else ==
if ( <CURSOR> ) {
<SPLIT><-IF PART->
}
else {
<-ELSE PART->
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.else-block ==
else {
<CURSOR><SPLIT>
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.while ==
while ( <CURSOR> )
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.while-block ==
while ( <CURSOR> ) {
<SPLIT>}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.switch ==
switch ( <CURSOR> ) {
case <-LABEL->:
<SPLIT>break;
case <-LABEL->:
break;
case <-LABEL->:
break;
default:
break;
} /* ----- end switch ----- */
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.case ==
case <CURSOR>:
break;
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.block ==
{
<CURSOR><SPLIT>
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -0,0 +1,168 @@
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.end-of-line-comment == append ==
// <CURSOR>
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.frame ==
//----------------------------------------------------------------------
// <CURSOR>
//----------------------------------------------------------------------
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.function ==
// === FUNCTION ======================================================================
// Name: |?FUNCTION_NAME|
// Description: <CURSOR>
// =====================================================================================
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.method ==
//--------------------------------------------------------------------------------------
// Class: |?CLASSNAME|
// Method: |?METHODNAME|
// Description: <CURSOR>
//--------------------------------------------------------------------------------------
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.class ==
// =====================================================================================
// Class: |?CLASSNAME|
// Description: <CURSOR>
// =====================================================================================
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-description == start ==
// =====================================================================================
//
// Filename: |FILENAME|
//
// Description: <CURSOR>
//
// Version: 1.0
// Created: |DATE| |TIME|
// Revision: none
// Compiler: g++
//
// Author: |AUTHOR| (|AUTHORREF|), |EMAIL|
// Company: |ORGANIZATION|
//
// =====================================================================================
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-description-header == start ==
// =====================================================================================
//
// Filename: |FILENAME|
//
// Description: <CURSOR>
//
// Version: 1.0
// Created: |DATE| |TIME|
// Revision: none
// Compiler: g++
//
// Author: |AUTHOR| (|AUTHORREF|), |EMAIL|
// Company: |ORGANIZATION|
//
// =====================================================================================
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-header-includes ==
// ##### HEADER FILE INCLUDES ###################################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-macros ==
// ##### MACROS - LOCAL TO THIS SOURCE FILE ###################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-typedefs ==
// ##### TYPE DEFINITIONS - LOCAL TO THIS SOURCE FILE #########################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-data-types ==
// ##### DATA TYPES - LOCAL TO THIS SOURCE FILE ###############################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-class-defs ==
// ##### CLASS DEFINITIONS - LOCAL TO THIS SOURCE FILE ########################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-local-variables ==
// ##### VARIABLES - LOCAL TO THIS SOURCE FILE ################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-prototypes ==
// ##### PROTOTYPES - LOCAL TO THIS SOURCE FILE ###############################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-function-defs-exported ==
// ##### FUNCTION DEFINITIONS - EXPORTED FUNCTIONS ############################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-function-defs-local ==
// ##### FUNCTION DEFINITIONS - LOCAL TO THIS SOURCE FILE #####################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-class-implementations-exported ==
// ##### CLASS IMPLEMENTATIONS - EXPORTED CLASSES #############################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-cpp-class-implementations-local ==
// ##### CLASS IMPLEMENTATIONS - LOCAL CLASSES ################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-header-includes ==
// ##### HEADER FILE INCLUDES ###################################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-macros ==
// ##### EXPORTED MACROS ########################################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-exported-typedefs ==
// ##### EXPORTED TYPE DEFINITIONS ##############################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-exported-data-types ==
// ##### EXPORTED DATA TYPES ####################################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-exported-class-defs ==
// ##### EXPORTED CLASS DEFINITIONS #############################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-exported-variables ==
// ##### EXPORTED VARIABLES #####################################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.file-section-hpp-exported-function-declarations ==
// ##### EXPORTED FUNCTION DECLARATIONS #########################################
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.keyword-bug == append ==
// :BUG:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
== comment.keyword-compiler == append ==
// :COMPILER:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
== comment.keyword-todo == append ==
// :TODO:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
== comment.keyword-tricky == append ==
// :TRICKY:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
== comment.keyword-warning == append ==
// :WARNING:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
== comment.keyword-workaround == append ==
// :WORKAROUND:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
== comment.keyword-keyword == append ==
// :|?KEYWORD:u|:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== comment.special-empty == append ==
// EMPTY<CURSOR>
== comment.special-fall-through == append ==
// FALL THROUGH<CURSOR>
== comment.special-implicit-type-conversion == append ==
// IMPLICIT TYPE CONVERSION<CURSOR>
== comment.special-no-return == append ==
// NO RETURN<CURSOR>
== comment.special-not-reached == append ==
// NOT REACHED<CURSOR>
== comment.special-remains-to-be-implemented == append ==
// REMAINS TO BE IMPLEMENTED<CURSOR>
== comment.special-constant-type-is-long == append ==
// constant type is long<CURSOR>
== comment.special-constant-type-is-unsigned == append ==
// constant type is unsigned<CURSOR>
== comment.special-constant-type-is-unsigned-long == append ==
// constant type is unsigned long<CURSOR>
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -0,0 +1,447 @@
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
$
== cpp.cin ==
cin >> <CURSOR>;
$
== cpp.cout == insert ==
cout << <CURSOR> << endl;
$
== cpp.cout-operator == insert ==
<< "<CURSOR>"
$
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.output-manipulator-boolalpha == insert ==
<< boolalpha <CURSOR>
== cpp.output-manipulator-dec == insert ==
<< dec <CURSOR>
== cpp.output-manipulator-endl == insert ==
<< endl <CURSOR>
== cpp.output-manipulator-fixed == insert ==
<< fixed <CURSOR>
== cpp.output-manipulator-flush == insert ==
<< flush <CURSOR>
== cpp.output-manipulator-hex == insert ==
<< hex <CURSOR>
== cpp.output-manipulator-internal == insert ==
<< internal <CURSOR>
== cpp.output-manipulator-left == insert ==
<< left <CURSOR>
== cpp.output-manipulator-oct == insert ==
<< oct <CURSOR>
== cpp.output-manipulator-right == insert ==
<< right <CURSOR>
== cpp.output-manipulator-scientific == insert ==
<< scientific <CURSOR>
== cpp.output-manipulator-setbase == insert ==
<< setbase(10<CURSOR>)
== cpp.output-manipulator-setfill == insert ==
<< setfill(<CURSOR>)
== cpp.output-manipulator-setiosflag == insert ==
<< setiosflags(<CURSOR>)
== cpp.output-manipulator-setprecision == insert ==
<< setprecision(6<CURSOR>)
== cpp.output-manipulator-setw == insert ==
<< setw(0<CURSOR>)
== cpp.output-manipulator-showbase == insert ==
<< showbase <CURSOR>
== cpp.output-manipulator-showpoint == insert ==
<< showpoint <CURSOR>
== cpp.output-manipulator-showpos == insert ==
<< showpos <CURSOR>
== cpp.output-manipulator-uppercase == insert ==
<< uppercase <CURSOR>
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.method-implementation ==
void<CURSOR>
|?CLASSNAME|::|?METHODNAME| ( <+argument list+> )
{
return ;
} // ----- end of method |CLASSNAME|::|METHODNAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.accessor-implementation ==
//--------------------------------------------------------------------------------------
// Class: |?CLASSNAME|
// Method: get_|?ATTRIBUTE|
//--------------------------------------------------------------------------------------
inline |?RETURNTYPE|
|CLASSNAME|::get_|ATTRIBUTE| ( ) const
{
return |ATTRIBUTE|;
} // ----- end of method |CLASSNAME|::get_|ATTRIBUTE| -----
//--------------------------------------------------------------------------------------
// Class: |CLASSNAME|
// Method: set_|ATTRIBUTE|
//--------------------------------------------------------------------------------------
inline void
|CLASSNAME|::set_|ATTRIBUTE| ( |RETURNTYPE| value )
{
|ATTRIBUTE| = value;
return ;
} // ----- end of method |CLASSNAME|::set_|ATTRIBUTE| -----
<CURSOR>
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.class-definition ==
// =====================================================================================
// Class: |?CLASSNAME:c|
// Description: <CURSOR>
// =====================================================================================
class |CLASSNAME|
{
public:
// ==================== LIFECYCLE =======================================
|CLASSNAME| (); // constructor
// ==================== ACCESSORS =======================================
// ==================== MUTATORS =======================================
// ==================== OPERATORS =======================================
protected:
// ==================== DATA MEMBERS =======================================
private:
// ==================== DATA MEMBERS =======================================
}; // ----- end of class |CLASSNAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.class-implementation ==
//--------------------------------------------------------------------------------------
// Class: |?CLASSNAME|
// Method: |CLASSNAME|
// Description: constructor
//--------------------------------------------------------------------------------------
|CLASSNAME|::|CLASSNAME| ()
{<CURSOR>
} // ----- end of method |CLASSNAME|::|CLASSNAME| (constructor) -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.class-using-new-definition ==
// =====================================================================================
// Class: |?CLASSNAME:c|
// Description: <CURSOR>
// =====================================================================================
class |CLASSNAME|
{
public:
// ==================== LIFECYCLE =======================================
|CLASSNAME| (); // constructor
|CLASSNAME| ( const |CLASSNAME| &other ); // copy constructor
~|CLASSNAME| (); // destructor
// ==================== ACCESSORS =======================================
// ==================== MUTATORS =======================================
// ==================== OPERATORS =======================================
|CLASSNAME|& operator = ( const |CLASSNAME| &other ); // assignment operator
protected:
// ==================== DATA MEMBERS =======================================
private:
// ==================== DATA MEMBERS =======================================
}; // ----- end of class |CLASSNAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.class-using-new-implementation ==
//--------------------------------------------------------------------------------------
// Class: |?CLASSNAME|
// Method: |CLASSNAME|
// Description: constructor
//--------------------------------------------------------------------------------------
|CLASSNAME|::|CLASSNAME| ()
{<CURSOR>
} // ----- end of method |CLASSNAME|::|CLASSNAME| (constructor) -----
//--------------------------------------------------------------------------------------
// Class: |CLASSNAME|
// Method: |CLASSNAME|
// Description: copy constructor
//--------------------------------------------------------------------------------------
|CLASSNAME|::|CLASSNAME| ( const |CLASSNAME| &other )
{
} // ----- end of method |CLASSNAME|::|CLASSNAME| (copy constructor) -----
//--------------------------------------------------------------------------------------
// Class: |CLASSNAME|
// Method: ~|CLASSNAME|
// Description: destructor
//--------------------------------------------------------------------------------------
|CLASSNAME|::~|CLASSNAME| ()
{
} // ----- end of method |CLASSNAME|::~|CLASSNAME| (destructor) -----
//--------------------------------------------------------------------------------------
// Class: |CLASSNAME|
// Method: operator =
// Description: assignment operator
//--------------------------------------------------------------------------------------
|CLASSNAME|&
|CLASSNAME|::operator = ( const |CLASSNAME| &other )
{
if ( this != &other ) {
}
return *this;
} // ----- end of method |CLASSNAME|::operator = (assignment operator) -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.error-class ==
// =====================================================================================
// Class: |?CLASSNAME:c|
// Description: <CURSOR>
// =====================================================================================
class |CLASSNAME|
{
public: |CLASSNAME| ( string msg = "|CLASSNAME|" ):message(msg) { }
virtual ~|CLASSNAME| ( ) { }
virtual string what ( ) const throw ( ) { return message; }
protected: string message;
}; // ---------- end of class |CLASSNAME| ----------
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-method-implementation ==
template < class T >
void<CURSOR> |?CLASSNAME|<T>::|?METHODNAME| ( <+argument list+> )
{
return ;
} // ----- end of method |CLASSNAME|<T>::|METHODNAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-accessor-implementation ==
//--------------------------------------------------------------------------------------
// Class: |?CLASSNAME|
// Method: get_|?ATTRIBUTE|
//--------------------------------------------------------------------------------------
template < class T >
inline |?RETURNTYPE| |CLASSNAME|<T>::get_|ATTRIBUTE| ( ) const
{
return |ATTRIBUTE|;
} // ----- end of method |CLASSNAME|<T>::get_|ATTRIBUTE| -----
//--------------------------------------------------------------------------------------
// Class: |CLASSNAME|
// Method: set_|ATTRIBUTE|
//--------------------------------------------------------------------------------------
template < class T >
inline void |CLASSNAME|<T>::set_|ATTRIBUTE| ( |RETURNTYPE| value )
{
|ATTRIBUTE| = value;
return ;
} // ----- end of method |CLASSNAME|<T>::set_|ATTRIBUTE| -----
<CURSOR>
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-class-definition ==
// =====================================================================================
// Class: |?CLASSNAME:c|
// Description: <CURSOR>
// =====================================================================================
template < class T >
class |CLASSNAME|
{
public:
// ==================== LIFECYCLE =======================================
|CLASSNAME| (); // constructor
// ==================== ACCESSORS =======================================
// ==================== MUTATORS =======================================
// ==================== OPERATORS =======================================
protected:
// ==================== DATA MEMBERS =======================================
private:
// ==================== DATA MEMBERS =======================================
}; // ----- end of template class |CLASSNAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-class-implementation ==
//--------------------------------------------------------------------------------------
// Class: |?CLASSNAME|
// Method: |CLASSNAME|
// Description: constructor
//--------------------------------------------------------------------------------------
template < class T >
|CLASSNAME| <T>:: |CLASSNAME| ()
{<CURSOR>
} // ----- end of constructor of template class |CLASSNAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-class-using-new-definition ==
// =====================================================================================
// Class: |?CLASSNAME:c|
// Description: <CURSOR>
// =====================================================================================
template < class T >
class |CLASSNAME|
{
public:
// ==================== LIFECYCLE =======================================
|CLASSNAME| (); // constructor
|CLASSNAME| ( const |CLASSNAME| &other ); // copy constructor
~|CLASSNAME| (); // destructor
// ==================== ACCESSORS =======================================
// ==================== MUTATORS =======================================
// ==================== OPERATORS =======================================
|CLASSNAME|& operator = ( const |CLASSNAME| &other ); // assignment operator
protected:
// ==================== DATA MEMBERS =======================================
private:
// ==================== DATA MEMBERS =======================================
}; // ----- end of template class |CLASSNAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-class-using-new-implementation ==
//--------------------------------------------------------------------------------------
// Class: |?CLASSNAME|
// Method: |CLASSNAME|
// Description: constructor
//--------------------------------------------------------------------------------------
template < class T >
|CLASSNAME|<T>::|CLASSNAME| ()
{
} // ----- end of constructor of template class |CLASSNAME| -----
//--------------------------------------------------------------------------------------
// Class: |CLASSNAME|
// Method: |CLASSNAME|
// Description: copy constructor
//--------------------------------------------------------------------------------------
template < class T >
|CLASSNAME|<T>::|CLASSNAME| ( const |CLASSNAME| &other )
{<CURSOR>
} // ----- end of copy constructor of template class |CLASSNAME| -----
//--------------------------------------------------------------------------------------
// Class: |CLASSNAME|
// Method: ~|CLASSNAME|
// Description: destructor
//--------------------------------------------------------------------------------------
template < class T >
|CLASSNAME|<T>::~|CLASSNAME| ()
{
} // ----- end of destructor of template class |CLASSNAME| -----
//--------------------------------------------------------------------------------------
// Class: |CLASSNAME|
// Method: operator =
// Description: assignment operator
//--------------------------------------------------------------------------------------
template < class T >
|CLASSNAME|<T>& |CLASSNAME|<T>::operator = ( const |CLASSNAME| &other )
{
if ( this != &other ) {
}
return *this;
} // ----- end of assignment operator of template class |CLASSNAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.template-function ==
template <class T>
void<CURSOR> |?TEMPALTE_FUNCTION_NAME| ( <+argument list+> )
{
return ;
} // ----- end of template function |?TEMPALTE_FUNCTION_NAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.operator-in ==
ostream &
operator << ( ostream & os, const |?CLASSNAME| & obj )
{
os << obj.<CURSOR> ;
return os;
} // ----- end of function operator << -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.operator-out ==
istream &
operator >> ( istream & is, |?CLASSNAME| & obj )
{
is >> obj.<CURSOR> ;
return is;
} // ----- end of function operator >> -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.try-catch ==
try {
<SPLIT>}
catch ( const <CURSOR> &ExceptObj ) { // handle exception:
}
catch (...) { // handle exception: unspecified
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.catch ==
catch ( const <CURSOR> &ExceptObj ) { // handle exception:
<SPLIT>}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.catch-points ==
catch (...) { // handle exception: unspecified
<SPLIT>}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.extern ==
extern "C" {<CURSOR>
<SPLIT>}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.open-input-file ==
string ifs_file_name = "<CURSOR>"; // input file name
ifstream ifs; // create ifstream object
ifs.open ( ifs_file_name.c_str() ); // open ifstream
if (!ifs) {
cerr << "\nERROR : failed to open input file " << ifs_file_name << endl;
exit (EXIT_FAILURE);
}
<SPLIT>{-continue here-}
ifs.close (); // close ifstream
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.open-output-file ==
string ofs_file_name = "<CURSOR>"; // input file name
ofstream ofs; // create ofstream object
ofs.open ( ofs_file_name.c_str() ); // open ofstream
if (!ofs) {
cerr << "\nERROR : failed to open output file " << ofs_file_name << endl;
exit (EXIT_FAILURE);
}
<SPLIT>{-continue here-}
ofs.close (); // close ofstream
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.namespace-std ==
using namespace std;
== cpp.namespace ==
using namespace |?NAMESPACE|;
== cpp.namespace-block ==
namespace |?NAMESPACE| {<CURSOR>
<SPLIT>} // ----- end of namespace |NAMESPACE| -----
== cpp.namespace-alias ==
namespace |?NAMESPACE_ALIAS| = {-original namespace name-};
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== cpp.rtti-typeid == insert ==
typeid(<CURSOR><SPLIT>)
$
== cpp.rtti-static-cast == insert ==
static_cast<>(<CURSOR><SPLIT>)
$
== cpp.rtti-const-cast == insert ==
const_cast<>(<CURSOR><SPLIT>)
$
== cpp.rtti-reinterpret-cast == insert ==
reinterpret_cast<>(<CURSOR><SPLIT>)
$
== cpp.rtti-dynamic-cast == insert ==
dynamic_cast<>(<CURSOR><SPLIT>)
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -0,0 +1,117 @@
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.function ==
void<CURSOR>
|?FUNCTION_NAME| ( <+argument list+> )
{
<SPLIT> return <+return value+>;
} // ----- end of function |FUNCTION_NAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.function-static ==
static void<CURSOR>
|?FUNCTION_NAME| ( <+argument list+> )
{
<SPLIT> return <+return value+>;
} // ----- end of static function |FUNCTION_NAME| -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.main ==
#include <cstdlib>
int
main ( int argc, char *argv[] )
{<CURSOR>
<SPLIT> return EXIT_SUCCESS;
} // ---------- end of function main ----------
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.enum ==
enum |?ENUM_NAME| {<CURSOR>
<SPLIT>}; // ---------- end of enum |ENUM_NAME| ----------
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.struct ==
struct |?STRUCT_NAME| {<CURSOR>
<SPLIT>}; // ---------- end of struct |STRUCT_NAME| ----------
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.union ==
union |?UNION_NAME| {<CURSOR>
<SPLIT>}; // ---------- end of union |UNION_NAME| ----------
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.printf == insert ==
printf ( "<CURSOR>\n" );
== idioms.scanf == insert ==
scanf ( "<CURSOR>", & );
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.calloc ==
|?POINTER| = calloc ( (size_t)(<CURSOR><+COUNT+>), sizeof(<+TYPE+>) );
if ( |POINTER|==NULL ) {
fprintf ( stderr, "\ndynamic memory allocation failed\n" );
exit (EXIT_FAILURE);
}
free (|POINTER|);
|POINTER| = NULL;
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.malloc ==
|?POINTER| = malloc ( sizeof(<CURSOR><+TYPE+>) );
if ( |POINTER|==NULL ) {
fprintf ( stderr, "\ndynamic memory allocation failed\n" );
exit (EXIT_FAILURE);
}
free (|POINTER|);
|POINTER| = NULL;
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.realloc ==
|?POINTER| = realloc ( |POINTER|, sizeof(<CURSOR><+TYPE+>) );
if ( |POINTER|==NULL ) {
fprintf ( stderr, "\ndynamic memory reallocation failed\n" );
exit (EXIT_FAILURE);
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.sizeof == insert ==
sizeof(<CURSOR><SPLIT>)
== idioms.assert == insert ==
assert(<CURSOR><SPLIT>);
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.open-input-file ==
FILE *|?FILEPOINTER|; // input-file pointer
char *|FILEPOINTER|_file_name = "<CURSOR>"; // input-file name
|FILEPOINTER| = fopen( |FILEPOINTER|_file_name, "r" );
if ( |FILEPOINTER| == NULL ) {
fprintf ( stderr, "couldn't open file '%s'; %s\n",
|FILEPOINTER|_file_name, strerror(errno) );
exit (EXIT_FAILURE);
}
<SPLIT>{-continue here-}
if( fclose(|FILEPOINTER|) == EOF ) { // close input file
fprintf ( stderr, "couldn't close file '%s'; %s\n",
|FILEPOINTER|_file_name, strerror(errno) );
exit (EXIT_FAILURE);
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.open-output-file ==
FILE *|?FILEPOINTER|; // output-file pointer
char *|FILEPOINTER|_file_name = "<CURSOR>"; // output-file name
|FILEPOINTER| = fopen( |FILEPOINTER|_file_name, "w" );
if ( |FILEPOINTER| == NULL ) {
fprintf ( stderr, "couldn't open file '%s'; %s\n",
|FILEPOINTER|_file_name, strerror(errno) );
exit (EXIT_FAILURE);
}
<SPLIT>{-continue here-}
if( fclose(|FILEPOINTER|) == EOF ) { // close output file
fprintf ( stderr, "couldn't close file '%s'; %s\n",
|FILEPOINTER|_file_name, strerror(errno) );
exit (EXIT_FAILURE);
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== idioms.fprintf == insert ==
fprintf ( |?FILEPOINTER|, "<CURSOR>\n", );
== idioms.fscanf == insert ==
fscanf ( |?FILEPOINTER|, "<CURSOR>", & );
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -0,0 +1,54 @@
$-------------------------------------------------------------------------
== preprocessor.include-global ==
#include <<CURSOR>>
$-------------------------------------------------------------------------
== preprocessor.include-local ==
#include "<CURSOR>"
$-------------------------------------------------------------------------
== preprocessor.define ==
#define <CURSOR> //
$-------------------------------------------------------------------------
== preprocessor.undefine ==
#undef <CURSOR> //
$-------------------------------------------------------------------------
== preprocessor.if-endif ==
#if |?CONDITION:u|
<CURSOR><SPLIT>
#endif // ----- |CONDITION| -----
$-------------------------------------------------------------------------
== preprocessor.if-else-endif ==
#if |?CONDITION:u|
<CURSOR><SPLIT>
#else // ----- not |CONDITION| -----
<+ELSE PART+>
#endif // ----- not |CONDITION| -----
$-------------------------------------------------------------------------
== preprocessor.ifdef-else-endif ==
#ifdef |?CONDITION:u|
<CURSOR><SPLIT>
#else // ----- not |CONDITION| -----
<+ELSE PART+>
#endif // ----- not |CONDITION| -----
$-------------------------------------------------------------------------
== preprocessor.ifndef-else-endif ==
#ifndef |?CONDITION:u|
<CURSOR><SPLIT>
#else // ----- not |CONDITION| -----
<+ELSE PART+>
#endif // ----- not |CONDITION| -----
$-------------------------------------------------------------------------
== preprocessor.ifndef-def-endif ==
#ifndef |?BASENAME:L|_INC
#define |BASENAME|_INC
<CURSOR><SPLIT>
#endif // ----- #ifndef |BASENAME|_INC -----
$-------------------------------------------------------------------------
== preprocessor.error ==
#error "<CURSOR>" //
$-------------------------------------------------------------------------
== preprocessor.line ==
#line <CURSOR> //
$-------------------------------------------------------------------------
== preprocessor.pragma ==
#pragma <CURSOR> //
$-------------------------------------------------------------------------

View File

@ -0,0 +1,72 @@
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.do-while ==
do {
<SPLIT>} while ( <CURSOR> ); // ----- end do-while -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.for ==
for ( <CURSOR>; ; )
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.for-block ==
for ( <CURSOR>; ; ) {
<SPLIT>}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.if ==
if ( <CURSOR> )
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.if-block ==
if ( <CURSOR> ) {
<SPLIT><-IF PART->
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.if-else ==
if ( <CURSOR> )
<SPLIT>else
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.if-block-else ==
if ( <CURSOR> ) {
<SPLIT><-IF PART->
}
else {
<+ELSE PART+>
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.else-block ==
else {
<CURSOR><SPLIT>
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.while ==
while ( <CURSOR> )
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.while-block ==
while ( <CURSOR> ) {
<SPLIT>}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.switch ==
switch ( <CURSOR> ) {
case 1:
<SPLIT>break;
case 2:
break;
case 3:
break;
case 4:
break;
default:
break;
} // ----- end switch -----
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.case ==
case <CURSOR>:
break;
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
== statements.block ==
{
<CURSOR><SPLIT>
}
$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%