Delphi-PRAXiS
Seite 1 von 3  1 23      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Eure Datei Header (https://www.delphipraxis.net/70170-eure-datei-header.html)

Luckie 26. Mai 2006 04:09


Eure Datei Header
 
Ich wüßte mal gerne, wie eure Datei-Header aussehen. Also meiner ist eigentlich ständigen Änderungen unterworfen:

Diesen habe ich lange Zeit verwendet:
Delphi-Quellcode:
(*======================================================================*
 | Project :                                                          |
 | Unit    : MpuTools.pas                                             |
 |                                                                      |
 | Notes   : Contains helper functions for programming without the VCL |
 |                                                                      |
 |                                                                      |
 | Copyright (c) 2005, 2006 Michael Puff (MPu)                         |
 | Url     : [url]http://www.michael-puff.de[/url]                               |
 | Mail    : [email]mpuff@michael-puff.de[/email]                                    |
 |                                                                      |
 | Authors:                                                            |
 | Manuel Pöter (MPö)                                                  |
 | Url     : [url]http://www.manuel-poeter.de[/url]                              |
 | Mail    : [email]motzi@manuel-poeter.de[/email]                                   |
 | Nico Bendlin (NBe)                                                  |
 | Url     : [url]http://www.bendlins.de/nico[/url]                              |
 | Mail    : -                                                         |
 |                                                                      |
 | Version Date       By   Description                              |
 | -------  ----------  ----  ------------------------------------------|
 | 1.0      2005-07-08  MPu  First release                            |
 | 1.1      2005-12-09  NBe  LinkerTimeStamp                          |
 | 1.2      2006-03-09  MPö   Added some Unicode functions             |
 |                                                                      |
 *======================================================================*)
Oder ein ganz alter:
Delphi-Quellcode:
{************************************************************}
{                                                            }
{                   ExifReader - Version 1.1                 }
{                                                            }
{               Copyright (c) 2004 Michael Puff             }
{                                                            }
{  When I die I want 'Hello, world' carved on my headstone. }
{                                                            }
{************************************************************}
Zuir Zeit finde ich den oberen aber etwas lang und die History wurde auch nicht immer gepflegt, so dass sie eigentlich nutzlos wurde.
Ich habe mich gerade für einen etwas schlankeren Header entschieden, den Microsoft so ähnlich auch in seinen Includedateien nutzt:

Delphi-Quellcode:
(******************************************************************************
 *                                                                            *
 *  NetAPI -- NetAPI function declarations                                   *
 *                                                                            *
 *  Copyright (c) 2006 Michael Puff [url]http://www.michael-puff.de[/url]              *
 *                                                                            *
 ******************************************************************************)
Alternativ mit der Copyrigth Notic da drunter:
Delphi-Quellcode:
 (*****************************************************************************
 *                                                                            *
 *                         COPYRIGHT NOTICE                                  *
 *                                                                            *
 *  Copyright (c) 2001-2006, Michael Puff ["copyright holder(s)"]            *
 *  All rights reserved.                                                     *
 *                                                                            *
 *  Redistribution and use in source and binary forms, with or without       *
 *  modification, are permitted provided that the following conditions       *
 *  are met:                                                                 *
 *                                                                            *
 *  1. Redistributions of source code must retain the above copyright        *
 *     notice, this list of conditions and the following disclaimer.         *
 *  2. Redistributions in binary form must reproduce the above copyright     *
 *     notice, this list of conditions and the following disclaimer in       *
 *     the documentation and/or other materials provided with the            *
 *     distribution.                                                         *
 *  3. The name(s) of the copyright holder(s) may not be used to endorse     *
 *     or promote products derived from this software without specific       *
 *     prior written permission.                                             *
 *                                                                            *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS      *
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT        *
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS        *
 *  FORA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE            *
 *  REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,              *
 *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,     *
 *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;         *
 *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER         *
 *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT       *
 *  LIABILITY, OR TORT INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY     *
 *  WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE              *
 *  POSSIBILITY OF SUCH DAMAGE.                                              *
 *                                                                            *
 ******************************************************************************)

turboPASCAL 26. Mai 2006 05:57

Re: Eure Datei Header
 
Moin,

also wenn, wenn überhaupt, was selten vorkommt, da es meistens OS ist kommt nur ein kurzer Header hinein. Deine erste und zweite Variante ist dafür ausreichend.
In Programmen für Firmen, Verkauf und oder Veröffentlichungen kommt ein erweiterter Infoheader mit
History bzw. Änderungen hinein.

mschaefer 26. Mai 2006 11:25

Re: Eure Datei Header
 
Moin, moin zusammen,

da ich kaum OpenSource habe, sind die Header markant spartansich. Für ein Projekt wurde jetzt eine automatische Dokumentation gefordert und dafür haben wir Doxygen verwendet. Allerdings nicht um die Routinen herauszulesen sondern nur um die groben Aufgaben der Units in einer Webform generiert zu bekommen. Fazit am Unit-Anfang hängt die Doxygen-Beschreibung mit einigen HTML-Tags.

Grüße // Martin

Luckie 26. Mai 2006 17:36

Re: Eure Datei Header
 
Postet doch mal ein paar Header, die ihr so benutzt, ich bin da etwas neugierig, weil die verraten ja auch irgendwie die eigene Handschrift beim Programmieren. ;)

Balu der Bär 26. Mai 2006 17:43

Re: Eure Datei Header
 
Delphi-Quellcode:
//////////////////////////////////////////////////////////////////
//                      {Programmname}                          //
//                         {Version}                            //
//                                                              //
//                    © 2005 Pierre                            //
//                                                              //
// Build with Borland Delphi {Version}                          //
//                                                              //
// Components       - xxxxx                                   //
//                   - xxxxx                                   //
//                   - xxxxx                                   //
//                   - xxxxx                                   //
//                                                              //
// Lizensinfos:                                                //
//                                                              //
//                                                              //
// Author: Pierre (Mail: xxxxxxx)                              //
// Date: 12.10.2005                                             //
//////////////////////////////////////////////////////////////////
Mal ein früherer Header von mir, mittlerweile setz ich gar keine mehr ein weil ich nichts OpenSource veröffentliche.

HuxXx 26. Mai 2006 17:58

Re: Eure Datei Header
 
Also wenn ich mal n paar Progs an Freunde oder irgendjemand geb, dann sieht das Ding meistens so aus:

Delphi-Quellcode:
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//                            ProgName Version 1.0                           //
//                                                                           //
//                                                                           //
//                        (C) by Hux - [url]http://wambo.hux.de[/url]                  //
//                          Bei Fragen an: [email]HuxXx@arcor.de[/email]                   //
//                                                                           //
//  Last Update: 31.02.2006                                                  // 
//                                                                           //
//                                                                           //
//  Benötigte komponenten:                                                  //
//  - blablabla                                                             //
//  - Hab Hunger...                                                         //
//  - Nochmal was                                                           //
//                                                                           //
//  Comments:                                                               //
//  Hallo du mensch, das ist was was ich dir sagen möchte...                //
//  Ich hab Hunger..., deshalb geh ich was essen...                         //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
jaaa..., so sieht der aus, und manchmal vllt. n bissle hässlicher...
Aber ich geb meine Progs au net soooo oft an andere...


Also ..

Greetz by hux :dp:

Daniel G 26. Mai 2006 18:00

Re: Eure Datei Header
 
Delphi-Quellcode:
{*******************************************************************************
*                                                                              *
*                         NetStatEx - Ver. 0.5 Beta                           *
*                                                                              *
*                      This program is Copyright (C) 2006,                    *
*                   Daniel Gilbert, [url]http://www.danielstools.de[/url]                *
*                                                                              *
*                                                                              *
*                       Some parts are taken from:                            *
*                                                                              *
*                         THE WINAPI32 - TUTORIAL by                          *
*               Michael "Luckie" Puff, [url]http://www.luckie-online.de[/url]            *
*                                                                              *
*                         "Bounce for Sakura" by                              *
*                               TurboPASCAL                                   *
*                                                                              *
*                                                                              *
*                                                                              *
*******************************************************************************}
Der Header meines aktuellen Projektes sieht so aus:

Delphi-Quellcode:
{*******************************************************************************
*                                                                              *
*                   Disc Tranquilizer :: 0.1 Beta                             *
*                    by Daniel Gilbert, May 2006                               *
*                                                                              *
*                    [url]http://www.danielstools.de[/url]                               *
*                                                                              *
*                     Uses the ARDEO - Engine                                 *
*                ( © ® ™ by me :D , © 2005 - 2006 )                           *
*                                                                              *
*                      Icons are taken from:                                  *
*                     [url]http://www.famfamfam.com[/url]                                *
*                                                                              *
*                                                                              *
*            Michi wa chikashi to ie domo, ikazareba itarazu.                 *
*******************************************************************************}
Das Lustige ist, das ich eigentlich kaum Header setzte. Wenn, dann muss aber auf jeden Fall ein "*"-Rahmen drumherum sein. :stupid:

Waldteufel 26. Mai 2006 18:03

Re: Eure Datei Header
 
C#:
Code:
/*
** ----------------------------------------------
** |             -=[ wtBot ]=-                  |
** |                                            |
** | Ein mehr oder weniger brauchbarer IRC-Bot |
** |                                            |
** |                  Created with SharpDevelop |
** ----------------------------------------------
*/
(Huch. Hab meinen Namen gar nicht reingeschrieben... :oops: :mrgreen: )

alcaeus 26. Mai 2006 18:04

Re: Eure Datei Header
 
Zur Zeit meistens der:

Code:
/***************************************************************************
 *                                 foobar.php
 *                            -------------------
 *   begin               : Fri, May 26, 2006
 *   copyright           : (C) 2006 alcaeus
 *   email               : alcaeus@*.*
 *
 ***************************************************************************/
:mrgreen:

In Delphi:
Delphi-Quellcode:
{------------------------------------------------------------------------------}
{                                                                              }
{ Author: Andreas B.                                                          }
{ Project name:                                                               }
{ Overall Project version: #.#                                                 }
{ Part name: .                                                                }
{ Part version: #.#.#.#                                                        }
{ Module name:                                                                }
{ Filename: <name>.*                                                           }
{ Date created: 2005/mm/dd                                                    }
{ Last modified: 2005/mm/dd                                                   }
{ Description:                                                                }
{ Notes:                                                                      }
{                                                                              }
{------------------------------------------------------------------------------}
Greetz
alcaeus

Muetze1 26. Mai 2006 18:35

Re: Eure Datei Header
 
Header einer Unit:
Delphi-Quellcode:
////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//  Classes\Bibliothek.Pas : Implementation der Bibliothek      TBibliothek //
//  Original: maus.cpp/maus.h                                                //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////
//
// $Id: Bibliothek.pas,v 1.41 2006-03-28 22:41:15+02 muetze1 Exp $
//
Und Footer der Unit (gekürzt):
Delphi-Quellcode:
//  Log List
//
// $Log: Bibliothek.pas,v $
// Revision 1.41  2006-03-28 22:41:15+02  muetze1
// renamed Save() to SaveAs()
// added Save()
//
// Revision 1.40  2006-02-26 01:08:41+01  muetze1
// - shortened load/save code due new LoadBIB(), SaveBIB() methods
// - some bug fixes
//
// Revision 1.39  2006-02-11 16:37:29+01  muetze1
// - passing file name to error log entry
// - property moved from TFBSElement to TAggregat
//
// Revision 1.38  2005-11-27 16:44:11+01  muetze1
// small changes
// added file extension constants
...
Die ID und die Log werden vom RCS automatisch aktualisiert...


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:39 Uhr.
Seite 1 von 3  1 23      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz