Added by Matt Raykowski, last edited by Robert Wetzel on Jan 10, 2008  (view change) show comment

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

General Overview of NLMISC


 

Introduction

The NeL Misc library contains all the core types, functionality and utilities necessary to use the Net, 3D or PACS libraries.

It also includes a handful of handy utilities that don't belong in any of the other libraries.

Features

Core Functionality

  • Base data types.
  • Platform independent data type definitions such as sint32, uint32, etc.
  • Exception base class.
  • Debugging macros (assertions, debugging information, warnings, and more) with links to displayers.
  • Handy common routines and classes - math, string manipulation, etc.
  • Reference counting system with smart pointers.
  • Smart pointers free the data they point to when it is no longer referenced.
  • Unicode string management.
  • Displayer system which abstracts the displayer (which may be stdout, a file, a console window, etc.)
  • A log message management system based on displayers. Provides message filtering functionality and support for multiple simultaneous displayers.
  • The Class registry which allows instantiation of polymorphic classes by name.

Portability

  • System information retrieval (retrieves info on the system OS, processor, RAM)
  • Generalized event management system (c/f windows) used for input (keyboard, mouse, etc)
  • OS independent thread & mutex management with POSIX and Windows implementations.
  • System for management of internationally localized text.
  • OS independent time retrieval (retrieves time from local machine's clock.)

Miscellaneous 3D Primitives and Utilities

  • Bounding box and bounding sphere implementations with 1001 associated utility routines
  • complete implementation of different formats of RGBA colour representations

Math

  • Quaternion classes for quaternion math.
  • Matrix classes for 3D math.
  • 2D and 3D vector classes in integer, single precision and double precision float implementations.
  • Plane class with associated functionality - projection of vector onto plane, polygon or line segment clipping against plane, etc.

Memory Management

  • Block and pool based memory managers for minimisation of memory fragmentation.
  • A FIFO manager that houses arbitrary non-uniform sized data blocks. The FIFO size is dynamic but memory allocation and liberation is minimal.

Serialization and Streams

  • Based on Java's Serialize.
  • Includes file version support, a mechanism that allows backward compatibility (with old data files.)
  • Supports serialization of: base types, classes composed of serializable types, STL containers of serializable types, pointers to serializable data (including a reference counting system which serializes the data that the pointer points to unless it has already been serialized by another pointer to the same data - At re-load time the pointers are fixed back up to point to the same data.)
  • Support for polymorphism (serialization of classes referenced by a pointer of their base class type.)
  • Binary memory stream, ASCII memory stream and binary file stream implementations.

Utilities

  • Functionality for loading and treating bitmaps of different formats.
  • A search path management system for locating data files.
  • A string/ integer association system (useful for compacting message types)
  • A configuration file loading and management system capable of detecting changes to configuration files and reloading their contents without stopping and relaunching the program.
  • Manages variables of type string, integer, float, or an array of any of these.
  • A system for managing lists of functions referenced by a string and calling the appropriate command when passed a string. This system is handy for managing a command line at run time.
  • A system for queuing tasks for threads to process. This system is handy for things like background loading.
  • Complete implementation of arbitrary sized bit arrays.