Templates

 The templates described in this chapter are found in your WinSDE installation (WinSDE_HOME), in the directory WinSDE_HOME\forms.

C/C++

Only the C++ templates are shown below, but there exist also C templates.

File Header Template

The following file header is used for any type of file :

 

//

// FILE <file>
//
// $Id$
//
// DESCRIPTION <short description, 1 line>
//
// AUTHOR <dept> <name>
//
// All rights reserved. Reproduction, modification, use or disclosure
// to third parties without express authority is forbidden.
// Copyright <Company name>, <Country>, <Year>.
//
// HISTORY:
//
// $Log$
//
// ABSTRACT
// <description text>
//
 

Class Description

//
// <General class description text>
//

 
 

C/C++ Function/Method

//////////////////////////////////////////////////////////////////////
//
// DESCRIPTION:
//   <description of method/function>
//
// PARAMETERS:
//   parameter1 - [in] Description of parameter1.
//   parameter2 - [in] Description of parameter2. (Default value)
//   parameter3 - [out] Description of parameter3.
//
// RETURNS:
//   <return value> - Description of return values
//
// REMARKS:
//   <remark text>
//
//////////////////////////////////////////////////////////////////////
void ClassName::Name(int parameter1,
                     bool parameter2,
                     char* parameter3)

COM Interfaces in IDL file

The IDL map must contain the keyword (in a comment):

// IDLMAP:<interface>=<classname>

The keyword is placed together with the comments for the interface in the IDL file:

//////////////////////////////////////////////////////////////////////

//
// <interface name> Interface
//
// IDLMAP:<interface>=<class name>
// Description:
//   <description text>
[
    object,
    ...
]
interface <interface>...

Visual Basic

File Header Template

Use the following template for any type of file - module, form, class, control:

' <description>

 
'
' FILE <file>
'
' $Id$
'
' AUTHOR <dept> <name>
'
' All rights reserved. Reproduction, modification, use or disclosure
' to third parties without express authority is forbidden.
' Copyright <Company name>, <Country>, <Year>.
'
' HISTORY:
'
' $Log$
'
' ABSTRACT
' <description text>
'
Option Explicit
 

The blank line between description and rest of header is there because the first comment will be taken as comment for the class, the rest of the header will only be a comment in the file.

Note, that the header ends with Option Explicit.

Function Template

'---------------------------------------------------------------------
'
' DESCRIPTION:
'   <description of method/function>
'
' PARAMETERS:
'   Parameter1 - [in] Description of Parameter1.
'   Parameter2 - [in] Description of Parameter2. (Default value)
'   Parameter3 - [out] Description of Parameter3.
'
' RETURNS:
'   <return value> - Description of return values
'
' REMARKS:
'   <remark text>
'
Private Sub Name(ByVal Parameter1 As Integer, _
                 ByVal Parameter2 As Boolean, _
                 Parameter3 As String)