Pichat SDK, tools documentation

Last update 30/May/2010 by Mark Seuffert

1. Introduction

This document describes a set of tools for Pichat software developers. These tools help with writing and maintaining software, they run on Linux, BSD and Windows.
All tools are complimentary to the Pichat SDK, available at http://www.pichat.net

2.1. Mkdocument, documentation tool

The mkdocument program creates a simple documentation from C++ source and header files. You can either specify files at the command line or use a configuration file (with the -c flag). The basic idea of this tool is to extract documentation directly from the existing code base with easy setup and maintenance. All information are collected from class definitions, source code and comments.
For example documentation please see PichatCore and SharkEngine libraries in the Pichat SDK.
When your source code contains comments a decent documentation will be automatically generated, e.g. one-line comments in front of methods are used as descriptions. Optionally, the generated output can be adjusted and extended by inline configuration. Any comment in the form '//(mkdoc-option argument)' will be interpreted as inline configuration.
The following configuration options are available, sorted by relevance:
(Some options expect arguments, text in brackets lists them)
mkdoc-titleset document title (text)
mkdoc-copyrightset document copyright information (text)
mkdoc-authorset document author and contact information (text)
mkdoc-footerset document footer (text)
mkdoc-showshow class/namespace/method/element
mkdoc-hidehide class/namespace/method/element
mkdoc-descriptionadd description for class or method (name)
mkdoc-commentsadd comments for class or namespace (name)
mkdoc-comments-block-beginbegin of comments block for class or namespace (name)
mkdoc-comments-block-endend of comments block
mkdoc-notesadd notes for method (name)
mkdoc-constructionadd constructor or factory method to class (name)
mkdoc-groupcombine multiple methods into one group (number)
mkdoc-group-forceforce multiple methods into one group (name number)
mkdoc-section-newstart a new section number with class or namespace (name)
mkdoc-section-block-beginbegin of block with new text section (name)
mkdoc-section-block-endend of block with new text section
mkdoc-ignoreignore comment line, do nothing
Syntax:mkdocument outfile namespace exportfilter filename1 [...]
mkdocument outfile namespace exportfilter -c configfile
 
Arguments:
outfile=name of output file, the file suffix defines the format:
txt = plaintext (default)
wiki = text format with formatting information
html = HTML format with meta information
xml = XML format with meta information
namespace=namespace to be documented
exportfilter=export filter for classes:
0 = document any class in given namespace, no filter
1 = document only classes marked with an "EXPORT" macro
configfile=name of file containg a list of input files
 
Examples:mkdocument sdklibrary.txt SdkLibrary 0 SdkLibraryClasses.h
mkdocument sdklibrary.txt SdkLibrary::Component 0 -c SdkLibrary.conf
mkdocument sdklibrary.xml SdkLibrary::Component 0 -c SdkLibrary.conf
Notes: The documentation tool requires C++ code inside a namespace. Per default all public methods, variables and enums are included in the generated documentation, you can overwrite this per inline configuration in your code. Unkown or missing information are marked with 'n/a' (not available) in generated documentation. Source files should have a suffix starting with 'c' and header files starting with 'h' (e.g. *.cpp and *.h), other file extensions are ignored. Comments have to be in C++ syntax. Style sheets for HTML/XML output are included.

2.2. Mkrepository, repository tool

The mkrepository program creates file repositories with version information and SHA256 checksum. You can either specify files at the command line or use a configuration file (with the -c flag).
Syntax:mkrepository outfile name filename1 [...]
mkrepository outfile name -c configfile
 
Arguments:
outfile=name of output file
name=name for created repository
configfile=name of file containg a list of input files
 
Examples:mkrepository updates.ini Plugins plugin.dll
mkrepository updates.ini Plugins -c example.conf
Notes: The repository tool tries to detect version information from executables and plugins. For unknown file formats you have to specify the version manually, in a config file you can use comma separated arguments with file name and version. The '^' character may be used as place holder in the config file, to use same version number as the previous line.

2.3. Mkresource, resource tool

The mkresource program creates resources from files in order to include them in a C++ application, plugin or library. You can either specify files at the command line or use a configuration file (with the -c flag, alternatively the -z flag to generate 'gzip' compressed data).
Syntax:mkresource outfile namespace exportversion filename1 [...]
mkresource outfile namespace exportversion -c configfile
mkresource outfile namespace exportversion -z configfile
 
Arguments:
outfile=base name for output files
namespace=namespace for created data
exportversion=line number of text string (in first file), adds an
"EXPORT" macro to generated files, 0 to disable
configfile=name of file containg a list of input files
 
Examples:mkresource PluginResourceModule Plugin 0 plugin.txt plugin.png
mkresource PluginResourceModule Plugin::Uncompressed 0 -c example.conf
mkresource PluginResourceModule Plugin::Compressed 0 -z example.conf
Notes: Generated resources can be statically linked to your application, e.g. to create a single executable file. The SharkEngine library offers the class CResourceHandler to access resources and the class CDataCompression to decompress data. Each resource has meta data with file name, size and modification time.

2.4. Pngcomment, PNG comment updater

The pngcomment program adds copyright information to a PNG image. You can either specify files at the command line or use a configuration file (with the -c flag). Files which already have copyright information or files with unknown format are ignored.
Syntax:pngcomment copyright filename1 [...]
pngcomment copyright -c configfile
 
Arguments:
copyright=text string with copyright information
configfile=name of file containg a list of input files
 
Examples:pngcomment www.piratson.se screenshot.png
pngcomment www.piratson.se -c example.conf

3. Description of files

mkdocumentDocumentation tool for Linux/BSD
mkdocument.exeDocumentation tool for Windows
mkdocument_default.cssDocumentation tool, style sheet (part 1)
mkdocument_default.xslDocumentation tool, style sheet (part 2)
mkrepositoryRepository tool for Linux/BSD
mkrepository.exeRepository tool for Windows
mkresourceResource tool for Linux/BSD
mkresource.exeResource tool for Windows
pichat_sdk_tools.txtThis friendly help file
pngcommentPNG comment updater for Linux/BSD
pngcomment.exePNG comment updater for Windows
Linux/BSD software is compiled with gcc4 and libc6, i586 compatible CPU.
Windows software is compiled with VC6, i386 compatible CPU.
These files may be used and distributed under the terms of the Piratson public license as published in Pichat readme.
Pichat is a simple to use peer-to-peer (P2P) chat software. It comes with integrated LAN messenger and webchat. The chat server supports multiple chatrooms, text formatting with smileys and a user-friendly webchat (HTML, CSS, DOM, JavaScript). The webchat works with nearly any web browser, easily integrated into your design, no PHP/Flash/Java required. Software for free information exchange for Linux and Windows.