Helium
From Nocturnal Initiative
(Redirected from AppFramework)
|
Overview
Helium is basically a generalized snapshot of the core application and library code that Insomniac Games' uses for its own proprietary tool set.
Features
The big ticket features provided by Helium include:
- Handy Code Snippets
- C++ Delegate/Event System
- Pointer to reference counted objects
- Pointer to heap allocated arrays
- Endian conversion code
- Insertion ordered std::set
- Reversible key and value std::map
- Interprocess Communication
- Fast non-blocking message-based design
- Works over BSD-style sockets (TCP) or Named Pipes
- Windows platform included, additional platforms are easily added
- Debugging Helpers
- PDB-based symbol information querying
- Capture stacks within your program making heap object tracking and leak debugging easier
- Give your application automatic crash reports dispatched via email that contain handy user/machine informaton, call stack, and memory page allocation stats
- Console Output Manager
- Log console output to one or more trace files
- Color code the console output based on Error/Warning/Debug print statements
- Throttle output verbosity (configured via command line arg or environment variable)
- Outline nested stages of processing performed by your application (for builders/exporters)
- Augment crash reports with the current outline state of your application (very useful for tracking down new crash bugs)
- Instrumenting Profiler
- Cross platform (Windows and PS3 currently)
- Macro-instrumented stack timer based profiler
- Concise profile report printed out at program exit
- Logs instance data out to human readable log file (Profile Analyzer is in development)
- Perforce Integration
- We use perforce for both code and data here at Insomniac
- This wrapper wraps the string-command based P4API with a more structured API
- C++ Reflection
- Serialize objects to binary or human-readable XML
- Flexible parsing mechanics allow you to read in old versions of your class
- Supports changing member type (automatically within reasonable limits), and supports renaming member variables via virtual API
- Supports serializing std::vector, std::set, and std::map containers with primitives or pointers to other reflect objects
- Supports serializing enumerations and bitfields using string representation (supports reordering enum elements)
- Supports automated object comparison, conversion, and cloning
- Supports introspection using a visitor interface
- Data-Driven Property UI
- Uses standard wxWidgets controls
- Interpreter classes examine your objects, create controls, bind data
- Simple UI script can truly data drive the presentation of the properties
Contents
For now this project is organized as a monolithic set of libraries and applications. All of our libraries compile to Windows DLLs. Thoughts on how we could organize our projects better can be found here.
Core Libraries
- Common - Basic library code that provides simple features
- Windows - A support library of windows-specific convenience functionality
- Console - A color coded, verbosity throttled, remotable, outlining console printing library
- Platform - A platform abstraction layer for threading, mutex, etc...
- Profile - A basic broad-phase performance and memory profiler
- IPC - Asynchronous message-based interprocess communcation via TCP or Named Pipe
- Math - Very basic reference implementation of 3D math vector/matrix/rotations/colors
- Debug - Win32/C++ exception handler/emailer and memory profiler
- Config - A simple C++ config system that can be driven by XML files
- AppUtils - Application structured startup/shutdown manager
- FileSystem - File System abstraction layer and convenience code
- SmartBuffer - Buffer objects that support pointers and serialization
- SmartLoader - Fixed-memory loader for SmartBuffer files
Unique IDs
- TUID - A simple 64-bit unique identifier
- UniqueID - A utility library to make working with TUIDs and GUIDs easier
Revision Control
- Perforce - Slim C++ Perforce abstraction layer
- RCS - Revision Control System module for managing files under revision control
C++ Reflection
- Reflect - An implementation of C++ reflection
- Rebuild - A command line utility for files serialized with Reflect
- Inspect - A widget engine for property-sheet style UI
- InspectReflect - An interpreter for the Reflect C++ reflection format to drive Inspect UI
- Reflector - A GUI utility for perusing the contents of files serialized with Reflect
Organization
Platform
Platform abstraction layer, just a thin wrapper around OS-constructs
- Basic Types (u32, i32, etc...)
- Asserts
- Threads
- Sockets
Each platform implementation is in a folder:
- Windows
- POSIX
Foundation
Modules:
- Profile
- Logging
- File Path object
- IPC systems
- UID (GUID/64-bit TUID)
- Math
- Reflect
- SmartBuffer
- SmartLoader
Application
- Inspect
- InspectReflect
- RCS
- Perforce
- UIToolKit
- Undo
