Examples Documentation Contact Downloads

Introduction

The Grace library is a C++ toolkit for writing system applications that do stuff on or for the Internet. It contains a modest hierarchy of classes that will help you get your things done faster, leaving you more time for important stuff like enjoying family life or showing general disdain for your software's userbase. The library uses several niffty constructs that make it easy to create legible code, which is a blessing for the maintainability of your software. Even though it's natural that you don't care about the mess you leave for the next guy who inherits your code, at least now you can pray that your predecessor at the next gig used Grace.

During its development, the library has seen extensive abuse within several telco and ISP environments. The simple concepts it delivers will encourage you to think about your problem at a higher level, while still giving you the benefits of natively compiled C++-code.

Of course there is no such thing as a silver bullet for secure or timely software development, but the methods and concepts inside the Grace library can be helpful in preventing the pitfalls that come with designing robust applications that span multiple threads and expose interfaces to the network.

Audience

This guide will show you around the library, its classes, and how you can use them to create your own tools and system services in less time. It will be tremendously helpful to your understanding if you have some experience with the C and C++ languages. Grace is on the lighthearted side of the Object Oriented political spectrum, puritans beware!

Typographical Conventions

Throughout the documentation, the following formatting will be used:

  • Classnames: string
  • Terminal commands: ps axuw
  • Methods, functions and symbols: value::toxml()
  • File and path names: /etc/passwd
  • XML Tags: <storpel>
Example code will be formatted as follows:

// Comments are light grey
#include "preprocessor_commands_are_green.h"

int cpluspluskeywordsareblue (string soAreGraceCoreClasses)
{
  returnclass (string) andGraceKeywordMacros retain;
  string tmp = "quoted string data is orange";
  ...
}

Interaction with the command line will look like this:

$ ./calculate_answer
42
$ ./calculate_answer --show-question
Usage: ./calculate_answer

And this is how XML will render:


<?xml version="1.0"?>
<outerTag>
  <innerTag attrib="attribvalue">data</innerTag>
</outerTag>

Structure

This guide is set up to progressively disclose functionality and concepts of Grace. It should do a good job complementing the online Doxygen documentation. After working yourself through this book you should be able to create your own programs with Grace and the online documentation. You will be grinding out weapons systems for the upcoming revolution, writing floorspace optimization systems for sweatshops in Thailand or creating a program that will really annoy the Recording Industry Association of America before you know it.

Table of Contents Next Chapter