1
0
mirror of synced 2024-12-23 09:43:08 +01:00
x2utils/Docs/singlehtml/index.html

32 lines
6.7 KiB
HTML
Raw Normal View History

<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>X<EFBFBD>Utils</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id178130"></a>X<EFBFBD>Utils</h1></div><div><div class="author"><h3 class="author"><span class="firstname">M.</span> <span class="surname">van Renswoude</span></h3></div></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#id476507">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="#id476513">Overview</a></span></dt><dt><span class="section"><a href="#id475447">Documentation</a></span></dt><dt><span class="section"><a href="#id475475">License</a></span></dt></dl></dd><dt><span class="chapter"><a href="#id476595">2. Environment information</a></span></dt><dd><dl><dt><span class="section"><a href="#id476601">X2UtApp.pas</a></span></dt><dt><span class="section"><a href="#id385108">X2UtOS.pas</a></span></dt></dl></dd></dl></div><div class="list-of-examples"><p><b>List of Examples</b></p><dl><dt>2.1. <a href="#id476633">Using the App function</a></dt></dl></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id476507"></a>Chapter<EFBFBD>1.<2E>Introduction</h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id476513">Overview</a></span></dt><dt><span class="section"><a href="#id475447">Documentation</a></span></dt><dt><span class="section"><a href="#id475475">License</a></span></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id476513"></a>Overview</h2></div></div><div></div></div><p>
X<>Utils is an open-source set of utility classes and functions released under the <a href="http://www.opensource.org/licenses/zlib-license.php" target="_top">zlib/libpng license</a>, 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.
</p><p>
The official website for X<>Utils is located at <a href="http://x2utils.kamadev.net/" target="_top">http://x2utils.kamadev.net/</a>. Contributions to the source code are appreciated, and after reviewing will be committed to the Subversion repository.
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id475447"></a>Documentation</h2></div></div><div></div></div><p>
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 <a href="http://www.thewsoft.com/" target="_top">Delphi Component Help Builder</a> to generate reference documentation. The docBook sources must be kept in sync manually, but allow for detailed explanation of the various functions.
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id475475"></a>License</h2></div></div><div></div></div><p>
Copyright (c) 2004 X<>Software</p><p>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.
</p><p>
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:
</p><div class="orderedlist"><ol type="1"><li>
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.
</li><li>
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
</li><li>
This notice may not be removed or altered from any source distribution.
</li></ol></div></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id476595"></a>Chapter<EFBFBD>2.<2E>Environment information</h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id476601">X2UtApp.pas</a></span></dt><dt><span class="section"><a href="#id385108">X2UtOS.pas</a></span></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id476601"></a>X2UtApp.pas</h2></div></div><div></div></div><p>
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.
</p><p>
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.
</p><div class="example"><a name="id476633"></a><p class="title"><b>Example<EFBFBD>2.1.<2E>Using the App function</b></p><p>
MyDataFileLocation := App.Path + <span class="codestring">'data.ini'</span>;
</p></div><p>
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.
</p><p>
Useful for display purposes is the App.FormatVersion() function. It returns a string with the version information in the format "vX.X.X". If the optional Build parameter is set to True (default), "build X" is appended as well.
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id385108"></a>X2UtOS.pas</h2></div></div><div></div></div><p>
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.
</p><p>
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.
</p></div></div></div></body></html>