Notes
Slide Show
Outline
1
GLibrary
  • A Reusable, General-Purpose Application-Independent Tool and Imaging Library
2
You Know What It’s Like When ...
  • The same algorithms are implemented ten different ways by ten different programmers ...
  • You’re constantly having to reverse engineer them every time your staff changes ...
  • You write off large software investments as “legacy code” every time somebody leaves ...
  • You’re sick and tired of major re-writes just because an underlying data design is wrong ...
  • Schedules just keep slipping and slipping ...
  • The product is buggy and Beta Testing is endless ...
  • Time-to-market is measured geologically ...
  • Chronic customer support problems devour your profits ...
  • There’s never time to do it right, but always enough to do it again ...
  • Everybody’s busy and nothing’s getting done ...
  • Stop paying to reinvent the same wheels over and over again!
3
GLibrary Advantages
  • Faster Time to Market
  • Decreases Development Costs
  • Increases Product Reliability
  • Reduces Time and Cost of Testing, QA
  • Cuts Customer Service Costs
  • Avoids Parallel Development
  • Lowers Maintainability Costs
  • Greater Flexibility and Extensibility
  • Facilitates Leverage by Franchising
  • Quality cuts costs
4
Some GLibrary Features
  • Generic Tool Templates
  • Unicode Compatible for Internationalization and Windows CE
  • Overloaded versions of standard and enhanced string manipulation functions enables easy creation of type independent text templates.
  • Generic Vector Templates with Pluggable Storage Strategies
  • Generic Matrices with Pluggable Storage Strategies
  • Generic Image Templates with Pluggable Pixel Types
  • Application-Independent Error Message Database/Reporter
  • Application-Independent Parametric Database with Dictionary Driven Interface Writer
  • Code Generator Driven Windows UI Tools
  • Dictionary Core Code Generator Base Class
  • Generic Target Interface
5
Generic Tool Templates
  • Fast Shell sort templates.
  • Generic hash table templates.
  • Undo/Redo and Publisher/Subscriber.
  • Text queues with file interface.
  • Directory file queues with wildcards and recursive scanning.
  • Checksum classes.
  • Natural spline generator.
6
Type-Friendly Overloaded Versions of Standard String Functions
  • Facilitates use of UNICODE and internationalization.
  • Most standard run-time functions involving text strings have name-invariant overloaded versions that are type-flexible and easily remembered. Example:
      • char *txtcpy( char *dst, const char *src )
      • wchar_t *txtcpy( wchar_t *dst, const wchar_t *src )
      • char *txtcpy( char *dst, const wchar_t *src )
      • wchar_t *txtcpy( wchar_t *dst, const char *src )
      • Note: the last two versions provide automatic type conversion.
  • Facilitates development of type-independent templated functions and classes. Example:
      • template<class TYPE> TYPE *txt_get_filename( TYPE *filename, const TYPE *file_path ) {
      • txtsplitpath( file_path, NULL, NULL, filename, NULL );
      • return filename;};
  • Simplifies use of GDIPlus utilities that require wchar_t text strings even for non-Unicode compiles.
  • Additional, more sensible versions also provided. Example: txt_max_cat takes into account the NULL string terminator correctly.
  • Forget about having to memorize or constantly look up all those frequently irregular prefixes: str-, _tcs-, _wcs-, etc. Let the compiler do it for you!
7
Generic Vectors with Pluggable Storage Strategies
  • Unlike STL or MFC, the functionality of a Generic Vector is separate from the Storage Strategy and not a programmed part of it.
  • Since only a few core functions are required to produce a Storage Strategy, it is easy to design custom ones for specialized requirements. By contrast, it is very complex and tedious to write a new full-featured, compatible container class for STL.
  • Since the Generic Vector functions remain  regardless of Storage Strategy, greater flexibility is obtained. As requirements change and evolve, software may be optimized by changing the underlying Storage Strategy used.
8
Standard Storage Strategies
  • Fixed: Fastest access, least flexibility. Size is fixed at compile time.
  • Contiguous: Most like a CArray or STL vector. Good for vectors whose size must be set at run time, but are not changed.
  • Variable: Better for vectors whose size must be set a run time, but that are not highly dynamic in size.
  • Indexed Sequential: Good for changing size dynamically without individual objects being copied.
  • Flexible: Can be sorted, re-ordered, or objects randomly added or deleted without the individual objects themselves being copied or moved.
  • Queue: Fastest for random insertions and deletions. Unlike MFC and STL lists, these have built-in sort functions that work without moving or copying individual objects.
  • Cartesian: Optimized 2, 3, and 4 element spaces for fast point and polynomial type operations.
  • STL: Both vectors and deques may be used as Storage Strategies to get the best of both worlds.
  • Roll Your Own: Make and use your own specialized Storage Strategies.
9
Generic Matrices with Pluggable Storage Strategies
  • No equivalent design in MFC or STL.
  • Extends Generic Vector model to matrices.
  • Exploits Generic Vector types to provide matrices with different dynamic characteristics.
  • Fixed, Contiguous, and Flexible Storage Strategies provided.
  • Optimized 4x4 types for homogeneous equations and 3D operations provided.
10
Generic Image Templates with Pluggable Pixel Types
  • Applies Generic matrix model to images.
  • VImage virtual base class for precision-independent usage.
  • Built-in Windows display blitter function.
  • Auto color space conversions.
  • Precision independent interface with Windows color picker dialog.
  • Compositing, 3D functions built-it.
  • Windows BITMAP object may be used as a Storage Strategy using an adapter class, adding full Generic Image functionality to existing BITMAP objects.
11
Standard Pluggable Pixel Types
  • 8 bit consumer quality.
  • 8 bit with MMX optimizations.
  • 10 bit broadcast quality.
  • 12 bit photo quality.
  • 16 bit high quality.
  • Floating point scientific quality.
  • Generic Pixel template using the above pluggable pixel types, with virtual base class, diagnostic outputs, and automatic color space conversions.
12
Comparison of GLibrary with STL and MFC Container Classes
13
Application-Independent
Error Message Database/Reporter
  • Pluggable output modules (Reporters) ideal for multiple UI control points with different interfaces.
  • Dictionary-based. User can define custom message sets with a simple text source file.
  • Built in support for standard errno and Windows HResult messages.
  • Custom messages can be identified by GUID or HResult.
  • Messages can be defined as string resources for internationalization.
  • Message pouches can be thrown and caught by exception handlers.
  • Debug trace information automatically generated and can be turned on or off at run time.
  • Uses supplied code generator, which may be invoked in custom compile settings for automatic dependency checking.
  • Publisher/Subscriber design enables multiple Reporters, including HTML writers for Web-based status monitoring.
14
Application-Independent
Parameter Database
  • Ideal for video keyframer or motion-control applications.
  • Several types of cubic spline motion path generators.
  • Motion type can be controlled independently at each Constraint.
  • Parameter Constraints can be added or removed independently at each Time Point.
  • Multiple Time Domains and Parameter Sets supported.
  • Allows for upwards and downwards compatibility properties.
  • Serialization and Dump functions supplied.
  • Undo/Redo.
  • Tools for Windows UI programming.
  • Can be used to animate GUI controls.
  • Dictionary based design with supplied code generator. Benefit: user changes and additions are quickly updated.
  • Completely application-independent.
15
Generic Target Interface
  • Application-independent control, messaging, data interface.
  • Dictionary-based code generator automatically writes and updates interfaces to your data classes.
  • Allows for upwards and downwards compatibility strategies.
  • Planned: Auto translation between Ascii and Unicode .dll domains.