1
0
mirror of synced 2024-09-19 17:56:09 +00:00
x2utils/Docs/X2Utils.xml

100 lines
4.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book>
<bookinfo>
<author>
<firstname>M.</firstname>
<surname>van Renswoude</surname>
</author>
</bookinfo>
<title>X²Utils</title>
<chapter>
<title>Introduction</title>
<section>
<title>Overview</title>
<para>
X²Utils is an open-source set of utility classes and functions released under the <ulink url="http://www.opensource.org/licenses/zlib-license.php">zlib/libpng license</ulink>, a copy of which is shown below. It's main function is reusability and convenience; anything which is used often deserves a spot in the library, assuming it is written with portability in mind.
</para>
<para>
The official website for X²Utils is located at <ulink url="http://x2utils.kamadev.net/">http://x2utils.kamadev.net/</ulink>. Contributions to the source code are appreciated, and after reviewing will be committed to the Subversion repository.
</para>
</section>
<section>
<title>Documentation</title>
<para>
The documentation for X²Utils is kept both as in-source comments and external docBook format. The in-source comments can be used in combination with <ulink url="http://www.thewsoft.com/">Delphi Component Help Builder</ulink> to generate reference documentation. The docBook sources must be kept in sync manually, but allow for detailed explanation of the various functions.
</para>
</section>
<section>
<title>License</title>
<para>
Copyright (c) 2004 X²Software</para> <para>This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
</para>
<para>
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
</para>
<orderedlist>
<listitem>
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
</listitem>
<listitem>
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
</listitem>
<listitem>
This notice may not be removed or altered from any source distribution.
</listitem>
</orderedlist>
</section>
</chapter>
<chapter>
<title>Environment information</title>
<section>
<title>X2UtApp.pas</title>
<para>
Contains a TX2App class which can be initiated as a singleton using the App() function. It provides information related to the application, such as the executable path and version information.
</para>
<para>
Note that you should not free the return value of the App() function, the unit's finalization clause takes care of destroying the object when the application closes. This makes it suitable to use the App() function in a way similar to Delphi's Application object.
</para>
<example>
<title>Using the App function</title>
<para>
MyDataFileLocation := App.Path + <phrase role="codestring">'data.ini'</phrase>;
</para>
</example>
<para>
The version information is accessible through App.Version. It contains the version numbers and various build flags as specified in the project options. You can also access the version strings through App.Version.Strings, which contain information such as the product name and copyright.
</para>
<para>
Useful for display purposes is the App.FormatVersion() function. It returns a string with the version information in the format &quot;vX.X.X&quot;. If the optional Build parameter is set to True (default), "build X" is appended as well.
</para>
</section>
<section>
<title>X2UtOS.pas</title>
<para>
Similar to X2UtApp.pas, this unit contains a TX2OS class which you can access using the OS() function. It provides information about the Operating System the application currently runs on.
</para>
<para>
OS.Version is an enumeration of versions recognized by X2UtOS. Extended information if available through OS.VersionEx, and an OS.FormatVersion() is provided for display purposes as well.
</para>
</section>
</chapter>
</book>