Mas eu não gosto de esqueletos mortos, daqueles que estão estáticos e não podem ser mudados, ou que são iguais para todos os projetos. Gosto de esqueletos vivos, que evoluem, sendo customizados para cada projeto conforme vão sendo usados e gosto também que eles estejam versionados no sistema de versionamento DO PROJETO EM QUESTÃO.
Costumo usar os seguintes esqueletos:
header:
//*****************************************************************************
// Version/Revision log :
// ====================
//$Log: $
//
//*****************************************************************************
#ifndef TODO_NAME_H_INCLUDED
#define TODO_NAME_H_INCLUDED
//################################# Includes ##################################
//################################## Types ####################################
//################################ Constants ##################################
//############################## Public Variables #############################
//############################# ForwardDeclarations ###########################
//################################# Classes ###################################
//####################### Public Function Declarations ########################
#endif // TODO_NAME_H_INCLUDED
//************************* E n d F i l e *****************************
cpp:
// Version/Revision log :
// ====================
//$Log: $
//
//*****************************************************************************
//################################# Includes ##################################
#include "TODO_NAME.h"
//################################## Types ####################################
//######################### Private Classes Declaration ######################
//################################ Constants ##################################
//############################# Private Variables #############################
//############################## Public Variables #############################
//############################# Private Functions #############################
//###################### Private Classes Implementation #######################
//###################### Public Classes Implementation ########################
//##################### Public Functions Implementation #######################
//-------------------------------------------------
// Unit tests
//-------------------------------------------------
#ifdef UNIT_TESTS
#include <iostream>
#include <assert.h>
using namespace std;
int main ()
{
cout << "Unit Testing for TODO_NAME class" << endl;
Logger::logTostdout();
cout << "Testing TODO" << endl;
{
assert(!"No UNITTESTS implemented yet!");
}
cout << ">>>>>> Tests finished with no errors" << endl;
return 0;
}
#endif
//************************* E n d F i l e *****************************
declaração de classe:
//=============================================================================
// Class: TODO_NAME
// Remarks: TODO
//=============================================================================
class TODO_NAME
{
public:
TODO_NAME() {}
~TODO_NAME() {}
private:
TODO_NAME(const TODO_NAME& x); // Hide copy ctor to avoid implicit calling
TODO_NAME& operator=(const TODO_NAME& x); // Hide = operator to avoid implicit calling
}; // End of class TODO_NAME
Implementação de clase:
//=============================================================================
// Class: TODO_NAME
//=============================================================================
//-----------------------------------------------------------------------------
// Method: TODO
// Remarks: TODO
//-----------------------------------------------------------------------------
void TODO_NAME::TODO(TODO)
{
//TODO
}
Makefile:
#*****************************************************************************
# Version/Revision log :
# ====================
#$Log: $
#
#*****************************************************************************
all:
<<TODO: Implement all target to build your items in the current dir
clean:
<<TODO: Implement clean target that undoes what all does...
install:
<<TODO: Implement install target that installs the itens created by all to the correct places.
uninstall:
<<TODO: Implement clean target that undoes EVERYTHING that install does...
.PHONY: all clean install uninstall