Xrb Namespace Reference

Container namespace for the XuqRijBuh game engine. More...


Namespaces

namespace  Engine2
 Contains all of the 2D-engine-specific code.
namespace  Math
 Contains mathematical functions.
namespace  GL
 Provides convenience functions for interacting with the OpenGL API.
namespace  Render
 Houses all of the basic rendering primitives used by XuqRijBuh.
namespace  Dim
 Used for pendantically self-documenting vector indexing.
namespace  Singleton
 Controls the singleton objects which can be thought of as devices.
namespace  Endian
 Used to store enumerations and functions which deal with endian identification and conversion.
namespace  Transformation
 Contains various transformation functions.
namespace  UTF8
 Contains functions for manipulating UTF8-encoded strings.
namespace  Util
 Contains various utility functions.

Classes

class  Button
class  CellPaddingWidget
class  CheckBox
class  Dialog
 A modal widget with a set of buttons at the bottom of a built-in vertical layout. More...
class  FileDialog
class  FilePanel
class  KeySelectorButton
class  Label
 Non-interactive display widget, for pictures or text. More...
class  Layout
class  LineEdit
class  ModalWidget
 Baseclass for modal widgets. More...
class  ProgressBar
class  RadioButton
class  RadioButtonGroup
class  SpacerWidget
 A blank widget to be placed in layouts where one needs a gap. More...
class  TextWidget
class  ToolbarButton
class  ValueEdit
class  ValueLabel
class  WidgetStack
class  ContainerWidget
class  EventFocus
 Widget focus event. More...
class  EventMouseover
 Mouseover event. More...
class  EventDeleteChildWidget
 Used to asynchronously schedule widget deletion. More...
class  Screen
class  SizeProperties
 Stores the minimum and maximum size properties of a Widget. More...
class  Widget
 The class which forms the foundation of the GUI system. More...
class  WidgetBackground
 Interface class for widget backgrounds. More...
class  WidgetBackgroundColored
 Implements a solid-color widget background. More...
class  WidgetBackgroundTextured
 Implements a single-texture widget background. More...
class  WidgetBackgroundStylized
 Implements a multiple-texture widget background. More...
class  WidgetSkin
 Stores widget skin properties for use in consistent and convenient GUI skinning. More...
class  WidgetSkinHandler
 Manages changes to the contained WidgetSkin. More...
class  EventInput
 Base class for all input events (key, mouse and joy events). More...
class  EventKey
 Baseclass for all keyboard events. More...
class  EventKeyDown
 Key-down subclass of EventKey. More...
class  EventKeyUp
 Key-up subclass of EventKey. More...
class  EventKeyRepeat
 Key-repeat subclass of EventKey. More...
class  EventMouse
 Baseclass for all mouse events. More...
class  EventMouseButton
 Baseclass for EventMouseButtonDown and EventMouseButtonUp. More...
class  EventMouseButtonDown
 Mouse button down subclass of EventMouseButton. More...
class  EventMouseButtonUp
 Mouse button up subclass of EventMouseButton. More...
class  EventMouseWheel
 Mouse wheel subclass of EventMouseButton. More...
class  EventMouseMotion
 Generated when the mouse moves. More...
class  EventJoy
 Abstract baseclass for all joystick events. More...
class  EventQuit
 Event signaling that the program has requested to quit. More...
class  InputState
 Stores the current state of the keyboard and mouse buttons. More...
class  Key
 Contains the function mapping for a single key/button. More...
class  KeyMap
 Interface for alternate key maps (e.g. Dvorak). More...
class  KeyMapIdentity
class  KeyMapDvorak
class  KeyRepeater
 Processes keyboard events and produces key repeat events. More...
class  Matrix2
class  Polynomial
class  SimpleTransform2
class  Transform2
class  Vector
 Generalized vector class geared towards high speed efficiency. More...
class  ArithmeticParser
class  ArithmeticScanner
class  DataFileLocation
class  DataFileParser
class  DataFileScanner
class  DataFileValue
 Baseclass of all the DataFile container classes. More...
class  DataFileLeafValue
class  DataFileBoolean
class  DataFileSint32
class  DataFileUint32
class  DataFileFloat
class  DataFileCharacter
class  DataFileString
class  DataFileContainer
class  DataFileKeyPair
class  DataFileArray
class  DataFileStructure
class  BitArray
class  CircularQueue
 Templatized circular queue object. More...
class  Color
class  NTuple
 Generalized n-tuple class geared towards high speed efficiency. More...
class  Rect
 A rectangle primitive. More...
class  Texture
 Directly stores, reads, and writes rasterized, pixel data. More...
class  AsciiFont
 Fast and light Font implementation for 7-bit-ASCII text. More...
class  Font
 Abstract interface class for all fonts. More...
class  GLTexture
 Texture object which can be used directly to render using OpenGL. More...
class  RenderContext
 Provides lowest common denominator of information necessary to render to screen. More...
class  BinaryFileSerializer
class  Event
 Baseclass for events. More...
class  EventStateMachineInput
 Event for asynchronously sending input to state machines. More...
class  EventCustom
 Abstract baseclass for custom events. More...
class  EventHandler
 Provides event handling, blocking, and queueing facilities for subclasses. More...
class  EventQueue
 Controls chronological queueing and processing of asynchronous events. More...
class  FrameHandler
 Facilitates once-per-game-loop-frame computation. More...
class  Pal
class  ResourceLibrary
 Controls loading, storage, and unloading of resources. More...
class  Resource
 Reference-counting container for resourced data. More...
class  Serializer
 Provides the abstract interface for serialized data streams. More...
class  SignalSenderBase
 Base class for SignalSender*. More...
struct  Attachment
class  SignalSender
struct  TransformationSet0
class  SignalSender0
struct  TransformationSet1
class  SignalSender1
struct  TransformationSet2
class  SignalSender2
class  SignalReceiverBase
 Base class for SignalReceiver*. More...
class  SignalReceiver
class  SignalReceiver0
class  SignalReceiver1
class  SignalReceiver2
class  SignalHandler
 The base class for anything that contains a SignalSender* or SignalReceiver*. More...
class  StateMachine
class  BitCache
class  BitCachedFile
class  CharacterFilter
 Facility for filtering characters (e.g. for Xrb::LineEdit). More...
class  CommandLineParser
struct  CommandLineOption
class  FramerateCalculator
 A circular queue storing frame durations in order to calculate framerates. More...
class  IndentFormatter
class  Instance
class  Reference
class  Tokenizer
struct  Validator
struct  GreaterThanValidator
struct  GreaterOrEqualValidator
struct  LessThanValidator
struct  LessOrEqualValidator
struct  RangeInclusiveValidator
struct  RangeExclusiveValidator

Typedefs

typedef float Float
typedef Uint8 StateMachineInput
typedef NTuple< Alignment, 2 > Alignment2
 Convenience typedef for a 2-dimensional Alignment vector.
typedef Sint32 ScreenCoord
typedef Vector< ScreenCoord, 2 > ScreenCoordVector2
typedef Rect< ScreenCoord > ScreenCoordRect
typedef SimpleTransform2
< ScreenCoord > 
ScreenCoordSimpleTransform2
typedef Matrix2< Float > FloatMatrix2
 Convenience typedef for a Matrix2<Float>.
typedef SimpleTransform2< Float > FloatSimpleTransform2
 Convenience typedef for a SimpleTransform2<Float>.
typedef SimpleTransform2< Sint32 > Sint32SimpleTransform2
 Convenience typedef for a SimpleTransform2<Sint32>.
typedef Transform2< Float > FloatTransform2
 Convenience typedef for a Transform2<Float>.
typedef Vector< Float, 2 > FloatVector2
 Convenience typedef for a 2-dimensional Float vector.
typedef Vector< Uint32, 2 > Uint32Vector2
 Convenience typedef for a 2-dimensional Uint32 vector.
typedef Vector< Sint32, 2 > Sint32Vector2
 Convenience typedef for a 2-dimensional Sint32 vector.
typedef Float ColorCoord
typedef NTuple< bool, 2 > Bool2
 Convenience typedef for a 2-dimensional Bool vector.
typedef Rect< Float > FloatRect
 Convenience typedef for a Rect<Float>.
typedef Rect< Sint32 > Sint32Rect
 Convenience typedef for a Rect<Sint32>.
typedef Sint32 FontCoord
typedef Vector< FontCoord, 2 > FontCoordVector2
typedef Pal *(* PalFactory )()

Enumerations

enum  DataFileElementType {
  DAT_BOOLEAN = 0,
  DAT_SINT32,
  DAT_UINT32,
  DAT_FLOAT,
  DAT_CHARACTER,
  DAT_STRING,
  DAT_KEY_PAIR,
  DAT_ARRAY,
  DAT_STRUCTURE,
  DAT_NO_TYPE,
  DAT_COUNT
}
enum  NumericSign {
  NEGATIVE = 0,
  POSITIVE = 1
}
enum  Alignment {
  TOP = 0,
  LEFT,
  CENTER,
  BOTTOM,
  RIGHT,
  SPACED
}
 Enums for text-alignment in Label (also used by CellPaddingWidget). More...
enum  StackPriority {
  SP_STAY_ON_BOTTOM = 0,
  SP_NEUTRAL,
  SP_STAY_ON_TOP
}
 Enums for child widget stack priority. More...
enum  LineDirection {
  COLUMN = 0,
  ROW
}
 Enums for Layout row or column specification.
enum  Orientation {
  HORIZONTAL = 0,
  VERTICAL
}
 Enums for Layout orientation.
enum  IOError {
  IOE_NONE = 0,
  IOE_IS_AT_END,
  IOE_INSUFFICIENT_STORAGE,
  IOE_INSUFFICIENT_AVAILABLE_DATA,
  IOE_OVERSIZED_STRING,
  IOE_INVALID_FILENAME,
  IOE_UNABLE_TO_OPEN_FILE,
  IOE_INVALID_FILE_OPEN_MODE,
  IOE_COUNT,
  IOE_LOWEST_ERROR = IOE_NONE,
  IOE_HIGHEST_ERROR = IOE_INVALID_FILE_OPEN_MODE
}
 Enums used for error indication in I/O routines. More...
enum  IODirection {
  IOD_NONE = 0,
  IOD_READ,
  IOD_WRITE,
  IOD_COUNT
}
 Enums used for indicating I/O direction. More...
enum  {
  SM_ENTER = static_cast<StateMachineInput>(-1),
  SM_EXIT = static_cast<StateMachineInput>(-2),
  SM_HIGHEST_USER_INPUT_VALUE = static_cast<StateMachineInput>(-3)
}

Functions

template<typename T >
Abs (T const &x)
 Returns the absolute value of x.
template<typename T >
T const & Min (T const &x, T const &y)
 Returns the minimum of two values.
template<typename T >
T const & Max (T const &x, T const &y)
 Returns the maximum of two values.
template<typename T >
bool Epsilon (T const x, T const y, T const epsilon)
 Near-equality checking.
template<typename CastToType , typename CastFromType >
CastToType DStaticCast (CastFromType cast_from)
 Does a static_cast, but ASSERT1s that the analogous dynamic_cast is not NULL.
template<typename ContainerType >
void StlContainerEraseRBegin (ContainerType &container)
 Convenience function for erasing the end of a container whose erase method does not accept reverse_iterator.
 GLOBAL_SCOPE_COMPILE_TIME_ASSERT (SIZEOF_CHAR_CHECK, sizeof(char)==1) GLOBAL_SCOPE_COMPILE_TIME_ASSERT(SIZEOF_SINT8_CHECK
template<typename T >
void Delete (T *&pointer)
 Performs delete on the given pointer with a bit of extra debugging goodness for safety.
template<typename T >
void Delete (T const *&pointer)
 Performs delete on the given pointer-to-a-const-value with a bit of extra debugging goodness for safety.
template<typename T >
void DeleteArray (T *&pointer)
 Performs delete[] on the given pointer with a bit of extra debugging goodness for safety.
template<typename T >
void DeleteArray (T const *&pointer)
 Performs delete[] on the given pointer-to-a-const-value with a bit of extra debugging goodness for safety.
template<typename T >
void DeleteAndNullify (T *&pointer)
 Performs delete on the given pointer and then assigns NULL to the pointer.
template<typename T >
void DeleteAndNullify (T const *&pointer)
 Performs delete on the given pointer-to-a-const-value and then assigns NULL to the pointer.
template<typename T >
void DeleteArrayAndNullify (T *&pointer)
 Performs delete[] on the given pointer and then assigns NULL to the pointer.
template<typename T >
void DeleteArrayAndNullify (T const *&pointer)
 Performs delete[] on the given pointer-to-a-const-value and then assigns NULL to the pointer.
void Fprint (FILE *fptr, FloatMatrix2 const &matrix)
 Prints the given FloatMatrix2 to the given file stream.
template<typename T >
Matrix2< T > operator* (Matrix2< T > const &left_operand, Matrix2< T > const &right_operand)
template<typename T >
Matrix2< T > operator* (SimpleTransform2< T > const &left_operand, Matrix2< T > const &right_operand)
template<typename T >
Matrix2< T > operator* (Matrix2< T > const &left_operand, SimpleTransform2< T > const &right_operand)
template<typename T >
void operator*= (Vector< T, 2 > &assignee, Matrix2< T > const &operand)
template<typename T >
Vector< T, 2 > operator* (Matrix2< T > const &left_operand, Vector< T, 2 > const &right_operand)
std::ostream & operator<< (std::ostream &stream, Polynomial const &polynomial)
void Fprint (FILE *fptr, FloatSimpleTransform2 const &simple_transform)
 Prints the given FloatSimpleTransform2 to the given file stream.
template<typename T >
SimpleTransform2< T > operator* (SimpleTransform2< T > const left_operand, SimpleTransform2< T > const right_operand)
template<typename T >
void operator*= (Vector< T, 2 > &assignee, SimpleTransform2< T > const &operand)
template<typename T >
Vector< T, 2 > operator* (SimpleTransform2< T > const &left_operand, Vector< T, 2 > const &right_operand)
void Fprint (FILE *fptr, FloatTransform2 const &transform, bool add_newline=true)
 Prints the given FloatTransform2 to the given file stream.
void Fprint (FILE *fptr, FloatVector2 const &vector, bool add_newline=true)
 Prints the given FloatVector2 to the given file stream.
template<typename T , Uint32 dimension>
Vector< T, dimension > operator+ (Vector< T, dimension > const &left_operand, Vector< T, dimension > const &right_operand)
 Global addition operator.
template<typename T , Uint32 dimension>
Vector< T, dimension > operator- (Vector< T, dimension > const &left_operand, Vector< T, dimension > const &right_operand)
 Global subtraction operator.
template<typename T , Uint32 dimension>
Vector< T, dimension > operator* (Vector< T, dimension > const &left_operand, Vector< T, dimension > const &right_operand)
 Global multiplication operator.
template<typename T , Uint32 dimension, typename U >
Vector< T, dimension > operator* (U const left_operand, Vector< T, dimension > const &right_operand)
 Global multiplication operator.
template<typename T , Uint32 dimension, typename U >
Vector< T, dimension > operator* (Vector< T, dimension > const &left_operand, U const right_operand)
 Global multiplication operator.
template<typename T , Uint32 dimension>
Vector< T, dimension > operator/ (Vector< T, dimension > const &left_operand, Vector< T, dimension > const &right_operand)
 Global division operator.
template<typename T , Uint32 dimension, typename U >
Vector< T, dimension > operator/ (U const left_operand, Vector< T, dimension > const &right_operand)
 Global division operator.
template<typename T , Uint32 dimension, typename U >
Vector< T, dimension > operator/ (Vector< T, dimension > const &left_operand, U const right_operand)
 Global division operator.
template<typename T , Uint32 dimension>
operator| (Vector< T, dimension > const &left_operand, Vector< T, dimension > const &right_operand)
 The dot product.
template<typename T >
operator& (Vector< T, 2 > const &left_operand, Vector< T, 2 > const &right_operand)
 The scalar cross product.
template<typename T >
Vector< T, 3 > operator& (Vector< T, 3 > const &left_operand, Vector< T, 3 > const &right_operand)
 The 3D vector cross product.
template<typename T >
Vector< T, 2 > PerpendicularVector2 (Vector< T, 2 > const &source)
 Returns a 2D vector which is rotated 90 degrees counterclockwise.
std::ostream & operator<< (std::ostream &stream, ArithmeticParser::Token::Type token_type)
std::ostream & operator<< (std::ostream &stream, DataFileLocation const &file_location)
std::ostream & operator<< (std::ostream &stream, DataFileParser::Token::Type token_type)
bool IsWhitespace (char c)
bool IsOperator (char c)
bool IsAlpha (char c)
bool IsBinaryDigit (char c)
bool IsOctalDigit (char c)
bool IsDecimalDigit (char c)
bool IsHexadecimalDigit (char c)
Uint32 HexadecimalDigitValue (char c)
std::string const & DataFileElementTypeString (DataFileElementType data_file_element_type)
template<Uint32 bit_count>
BitArray< bit_count > operator| (BitArray< bit_count > const &left_operand, BitArray< bit_count > const &right_operand)
template<Uint32 bit_count>
BitArray< bit_count > operator& (BitArray< bit_count > const &left_operand, BitArray< bit_count > const &right_operand)
template<Uint32 bit_count>
BitArray< bit_count > operator^ (BitArray< bit_count > const &left_operand, BitArray< bit_count > const &right_operand)
template<Uint32 bit_count>
BitArray< bit_count > operator<< (BitArray< bit_count > const &left_operand, Uint32 const right_operand)
template<Uint32 bit_count>
BitArray< bit_count > operator>> (BitArray< bit_count > const &left_operand, Uint32 const right_operand)
void Fprint (FILE *fptr, Bool2 const &ntuple, bool add_newline=true)
 Prints the given Bool2 to the given file stream.
template<typename T , Uint32 size>
NTuple< T, size > operator+ (NTuple< T, size > const &left_operand, NTuple< T, size > const &right_operand)
 Global addition operator.
template<typename T , Uint32 size>
NTuple< T, size > operator- (NTuple< T, size > const &left_operand, NTuple< T, size > const &right_operand)
 Global subtraction operator.
template<typename T , Uint32 size>
NTuple< T, size > operator* (NTuple< T, size > const &left_operand, NTuple< T, size > const &right_operand)
 Global multiplication operator.
template<typename T , Uint32 size>
NTuple< T, size > operator* (T const left_operand, NTuple< T, size > const &right_operand)
 Global multiplication operator.
template<typename T , Uint32 size>
NTuple< T, size > operator* (NTuple< T, size > const &left_operand, T const right_operand)
 Global multiplication operator.
template<typename T , Uint32 size>
NTuple< T, size > operator/ (NTuple< T, size > const &left_operand, NTuple< T, size > const &right_operand)
 Global division operator.
template<typename T , Uint32 size>
NTuple< T, size > operator/ (T const left_operand, NTuple< T, size > const &right_operand)
 Global division operator.
template<typename T , Uint32 size>
NTuple< T, size > operator/ (NTuple< T, size > const &left_operand, T const right_operand)
 Global division operator.
void Fprint (FILE *fptr, FloatRect const &rect, bool const show_size_instead_of_top_right, bool add_newline)
template<typename T >
Rect< T > operator| (Rect< T > const &left_operand, Rect< T > const &right_operand)
template<typename T >
Rect< T > operator& (Rect< T > const &left_operand, Rect< T > const &right_operand)
template<typename T >
Rect< T > operator+ (Rect< T > const &left_operand, Vector< T, 2 > const &right_operand)
template<typename T >
Rect< T > operator- (Rect< T > const &left_operand, Vector< T, 2 > const &right_operand)
template<typename T >
Rect< T > operator* (SimpleTransform2< T > const &left_operand, Rect< T > const &right_operand)
FontCoordVector2 ScreenToFontCoordVector2 (ScreenCoordVector2 const &v)
ScreenCoordVector2 FontToScreenCoordVector2 (FontCoordVector2 const &v)
FontCoord ScreenToFontCoord (ScreenCoord v)
ScreenCoord FontToScreenCoord (FontCoord v)
bool MatchEventType (Event const *event, Event::EventType event_type)
bool MatchCustomType (Event const *event, EventCustom::CustomType const custom_type)
void StringPrintf (std::string *const string, char const *const format,...)
 Performs printf into the provided STL string.

Variables

std::string const g_empty_string


Detailed Description

Container namespace for the XuqRijBuh game engine.

Contains all classes, functions, enumerations, and typedefs that libxrb uses, with the exception of a few things (notably, mathematical operator overloads for things like Vector and Matrix2).


Typedef Documentation

Convenience typedef for a 2-dimensional Alignment vector.

Alignment2

Definition at line 22 of file xrb_label.hpp.

typedef Matrix2<Float> Xrb::FloatMatrix2

Convenience typedef for a Matrix2<Float>.

FloatMatrix2

Definition at line 420 of file xrb_matrix2.hpp.

typedef SimpleTransform2<Float> Xrb::FloatSimpleTransform2

Convenience typedef for a SimpleTransform2<Float>.

FloatSimpleTransform2

Definition at line 292 of file xrb_simpletransform2.hpp.

typedef SimpleTransform2<Sint32> Xrb::Sint32SimpleTransform2

Convenience typedef for a SimpleTransform2<Sint32>.

Sint32SimpleTransform2

Definition at line 296 of file xrb_simpletransform2.hpp.

typedef Transform2<Float> Xrb::FloatTransform2

Convenience typedef for a Transform2<Float>.

FloatTransform2

Definition at line 399 of file xrb_transform2.hpp.

typedef Vector<Float, 2> Xrb::FloatVector2

Convenience typedef for a 2-dimensional Float vector.

FloatVector2

Definition at line 730 of file xrb_vector.hpp.

typedef Vector<Uint32, 2> Xrb::Uint32Vector2

Convenience typedef for a 2-dimensional Uint32 vector.

Uint32Vector2

Definition at line 734 of file xrb_vector.hpp.

typedef Vector<Sint32, 2> Xrb::Sint32Vector2

Convenience typedef for a 2-dimensional Sint32 vector.

Sint32Vector2

Definition at line 738 of file xrb_vector.hpp.

typedef NTuple<bool, 2> Xrb::Bool2

Convenience typedef for a 2-dimensional Bool vector.

Bool2

Definition at line 606 of file xrb_ntuple.hpp.


Enumeration Type Documentation

Enums for text-alignment in Label (also used by CellPaddingWidget).

Enumerator:
TOP  Align the top side of the content to the top side of the widget.
LEFT  Align the left side of the content to the left side of the widget.
CENTER  Center the content in the widget.
BOTTOM  Align the bottom side of the content to the bottom side of the widget.
RIGHT  Align the right side of the content to the right side of the widget.
SPACED  The text will be spaced to the left/right and/or top/bottom.

Definition at line 46 of file xrb_enums.hpp.

Enums for child widget stack priority.

Enumerator:
SP_STAY_ON_BOTTOM  The child will stay at the bottom of the stack.
SP_NEUTRAL  The child will stay between the bottom and top children.
SP_STAY_ON_TOP  The child will stay at the top of the stack.

Definition at line 58 of file xrb_enums.hpp.

Enums used for error indication in I/O routines.

See Serializer and BitCache .

Definition at line 84 of file xrb_enums.hpp.

Enums used for indicating I/O direction.

See Serializer and BitCache .

Definition at line 104 of file xrb_enums.hpp.


Function Documentation

template<typename T >
T Xrb::Abs ( T const &  x  )  [inline]

Returns the absolute value of x.

The template type T must allow static_cast-ing from the integer value 0, and must have a less-than operator defined.

Definition at line 105 of file xrb.hpp.

template<typename T >
T const& Xrb::Min ( T const &  x,
T const &  y 
) [inline]

Returns the minimum of two values.

The template type T must have a less-than operator defined.

Definition at line 114 of file xrb.hpp.

Referenced by Xrb::Serializer::WriteString().

template<typename T >
T const& Xrb::Max ( T const &  x,
T const &  y 
) [inline]

Returns the maximum of two values.

The template type T must have a less-than operator defined.

Definition at line 123 of file xrb.hpp.

Referenced by Xrb::Render::DrawCircle(), Xrb::EventHandler::MostRecentEventTime(), Xrb::FrameHandler::MostRecentFrameTime(), and Xrb::Widget::SetContentMargins().

template<typename T >
bool Xrb::Epsilon ( T const   x,
T const   y,
T const   epsilon 
) [inline]

Near-equality checking.

Iff x is within epsilon of y, this evaluates to true.

Definition at line 132 of file xrb.hpp.

template<typename ContainerType >
void Xrb::StlContainerEraseRBegin ( ContainerType &  container  )  [inline]

Convenience function for erasing the end of a container whose erase method does not accept reverse_iterator.

This function is used to avoid placing the ugliness in code at large.

Parameters:
container The STL container (e.g. set, map, etc) for which to remove its rbegin().

Definition at line 154 of file xrb.hpp.

template<typename T >
void Xrb::Delete ( T *&  pointer  )  [inline]

Performs delete on the given pointer with a bit of extra debugging goodness for safety.

In debug builds, the pointer is checked for the special "bad" value 0xFBADFACE, deleted, then assigned the special hex value 0xFBADFACE, ensuring that double-deletions are caught, and that it's obvious what's been deleted while inspecting the values of pointers in a debugger.

Todo:
Add memory stomping to this.

Definition at line 34 of file xrb_delete.hpp.

Referenced by Xrb::AsciiFont::CreateFromCache(), Xrb::Resource< Font >::operator=(), Xrb::Widget::SetBackground(), Xrb::AsciiFont::~AsciiFont(), Xrb::EventQueue::~EventQueue(), Xrb::WidgetSkin::~WidgetSkin(), and Xrb::WidgetSkinHandler::~WidgetSkinHandler().

template<typename T >
void Xrb::Delete ( T const *&  pointer  )  [inline]

Performs delete on the given pointer-to-a-const-value with a bit of extra debugging goodness for safety.

In debug builds, the pointer is checked for the special "bad" value 0xFBADFACE, deleted, then assigned the special hex value 0xFBADFACE, ensuring that double-deletions are caught, and that it's obvious what's been deleted while inspecting the values of pointers in a debugger.

Todo:
Add memory stomping to this.

Definition at line 54 of file xrb_delete.hpp.

template<typename T >
void Xrb::DeleteArray ( T *&  pointer  )  [inline]

Performs delete[] on the given pointer with a bit of extra debugging goodness for safety.

In debug builds, the pointer is checked for the special "bad" value 0xFBADFACE, delete[]d, then assigned the special hex value 0xFBADFACE, ensuring that double-deletions are caught, and that it's obvious what's been deleted while inspecting the values of pointers in a debugger.

Todo:
Add memory stomping to this.

Definition at line 74 of file xrb_delete.hpp.

template<typename T >
void Xrb::DeleteArray ( T const *&  pointer  )  [inline]

Performs delete[] on the given pointer-to-a-const-value with a bit of extra debugging goodness for safety.

In debug builds, the pointer is checked for the special "bad" value 0xFBADFACE, delete[]d, then assigned the special hex value 0xFBADFACE, ensuring that double-deletions are caught, and that it's obvious what's been deleted while inspecting the values of pointers in a debugger.

Todo:
Add memory stomping to this.

Definition at line 94 of file xrb_delete.hpp.

template<typename T >
void Xrb::DeleteAndNullify ( T *&  pointer  )  [inline]

Performs delete on the given pointer and then assigns NULL to the pointer.

This deletion function should be used when the pointer needs to be reset to NULL because NULL indicates some sentinel condition.

Todo:
Add memory stomping to this.

Definition at line 112 of file xrb_delete.hpp.

Referenced by Xrb::AsciiFont::CreateFromCache(), Xrb::Resource< Font >::Release(), Xrb::Singleton::Shutdown(), and Xrb::Resource< Font >::~Resource().

template<typename T >
void Xrb::DeleteAndNullify ( T const *&  pointer  )  [inline]

Performs delete on the given pointer-to-a-const-value and then assigns NULL to the pointer.

This deletion function should be used when the pointer needs to be reset to NULL because NULL indicates some sentinel condition.

Todo:
Add memory stomping to this.

Definition at line 125 of file xrb_delete.hpp.

template<typename T >
void Xrb::DeleteArrayAndNullify ( T *&  pointer  )  [inline]

Performs delete[] on the given pointer and then assigns NULL to the pointer.

This deletion function should be used when the pointer needs to be reset to NULL because NULL indicates some sentinel condition.

Todo:
Add memory stomping to this.

Definition at line 138 of file xrb_delete.hpp.

template<typename T >
void Xrb::DeleteArrayAndNullify ( T const *&  pointer  )  [inline]

Performs delete[] on the given pointer-to-a-const-value and then assigns NULL to the pointer.

This deletion function should be used when the pointer needs to be reset to NULL because NULL indicates some sentinel condition.

Todo:
Add memory stomping to this.

Definition at line 151 of file xrb_delete.hpp.

void Xrb::Fprint ( FILE *  fptr,
FloatMatrix2 const &  matrix 
)

Prints the given FloatMatrix2 to the given file stream.

This is a convenience function to provide a default printf format to FloatMatrix2::Fprint.

Parameters:
fptr The file stream to print to.
matrix The FloatMatrix2 to print.

Definition at line 22 of file xrb_matrix2.cpp.

void Xrb::Fprint ( FILE *  fptr,
FloatSimpleTransform2 const &  simple_transform 
)

Prints the given FloatSimpleTransform2 to the given file stream.

This is a convenience function to provide a default printf format to FloatSimpleTransform2::Fprint.

Parameters:
fptr The file stream to print to.
matrix The FloatSimpleTransform2 to print.

Definition at line 23 of file xrb_simpletransform2.cpp.

void Xrb::Fprint ( FILE *  fptr,
FloatTransform2 const &  transform,
bool  add_newline = true 
)

Prints the given FloatTransform2 to the given file stream.

This is a convenience function to provide a default printf format to FloatTransform2::Fprint.

Parameters:
fptr The file stream to print to.
transform The FloatTransform2 to print.

Definition at line 23 of file xrb_transform2.cpp.

void Xrb::Fprint ( FILE *  fptr,
FloatVector2 const &  vector,
bool  add_newline = true 
)

Prints the given FloatVector2 to the given file stream.

Prints the given Sint32Vector2 to the given file stream.

Prints the given Uint32Vector2 to the given file stream.

This is a convenience function to provide a default printf format to Vector::Fprint.

Parameters:
fptr The file stream to print to.
vector The FloatVector2 to print.
add_newline Indicates if a newline should be printed at the end of the formatted output.
This is a convenience function to provide a default printf format to Vector::Fprint.
Parameters:
fptr The file stream to print to.
vector The Uint32Vector2 to print.
add_newline Indicates if a newline should be printed at the end of the formatted output.
This is a convenience function to provide a default printf format to Vector::Fprint.
Parameters:
fptr The file stream to print to.
vector The Sint32Vector2 to print.
add_newline Indicates if a newline should be printed at the end of the formatted output.

Definition at line 22 of file xrb_vector.cpp.

References Xrb::Vector< T, dimension >::Fprint().

template<typename T , Uint32 dimension>
Vector<T, dimension> Xrb::operator+ ( Vector< T, dimension > const &  left_operand,
Vector< T, dimension > const &  right_operand 
) [inline]

Global addition operator.

Performs vector addition (a commutative operation) on the given vectors.

Parameters:
left_operand The vector on the left side of the operation.
right_operand The vector on the right side of the operation.
Returns:
The vector sum of the given vectors.

Definition at line 502 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T , Uint32 dimension>
Vector<T, dimension> Xrb::operator- ( Vector< T, dimension > const &  left_operand,
Vector< T, dimension > const &  right_operand 
) [inline]

Global subtraction operator.

Performs vector subtraction (a non-commutative operation) on the given vectors.

Parameters:
left_operand The vector on the left side of the operation.
right_operand The vector on the right side of the operation.
Returns:
The vector difference of the given vectors.

Definition at line 519 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T , Uint32 dimension>
Vector<T, dimension> Xrb::operator* ( Vector< T, dimension > const &  left_operand,
Vector< T, dimension > const &  right_operand 
) [inline]

Global multiplication operator.

Performs scalar component-wise multiplication (a commutative operation) of the vector operands.

Parameters:
left_operand The vector on the left side of the operation.
right_operand The vector on the right side of the operation.
Returns:
The vector which contains the component-wise products of the operands' components.

Definition at line 538 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T , Uint32 dimension, typename U >
Vector<T, dimension> Xrb::operator* ( U const   left_operand,
Vector< T, dimension > const &  right_operand 
) [inline]

Global multiplication operator.

Performs scalar multiplication (a commutative operation) of the scalar left_operand on the vector right_operand.

Parameters:
left_operand The scalar on the left side of the operation.
right_operand The vector on the right side of the operation.
Returns:
The scalar multiple of the given scalar and vector.

Definition at line 556 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T , Uint32 dimension, typename U >
Vector<T, dimension> Xrb::operator* ( Vector< T, dimension > const &  left_operand,
U const   right_operand 
) [inline]

Global multiplication operator.

Performs scalar multiplication (a commutative operation) of the scalar right_operand on the vector left_operand.

Parameters:
left_operand The vector on the left side of the operation.
right_operand The scalar on the right side of the operation.
Returns:
The scalar multiple of the given scalar and vector.

Definition at line 574 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T , Uint32 dimension>
Vector<T, dimension> Xrb::operator/ ( Vector< T, dimension > const &  left_operand,
Vector< T, dimension > const &  right_operand 
) [inline]

Global division operator.

Performs scalar component-wise division (a non-commutative operation) of the vector operands.

Parameters:
left_operand The vector on the left side of the operation.
right_operand The vector on the right side of the operation.
Returns:
The vector which contains the component-wise quotients of the operands' components.
Note:
There is no protection here against dividing by zero.

Definition at line 594 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T , Uint32 dimension, typename U >
Vector<T, dimension> Xrb::operator/ ( U const   left_operand,
Vector< T, dimension > const &  right_operand 
) [inline]

Global division operator.

Performs scalar component-wise division (a non-commutative operation) of the scalar operand by the vector operand components.

Parameters:
left_operand The scalar on the left side of the operation.
right_operand The vector on the right side of the operation.
Returns:
The vector which contains the component-wise quotients of the left operand over each of the right operand's components.
Note:
There is no protection here against dividing by zero.

Definition at line 614 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T , Uint32 dimension, typename U >
Vector<T, dimension> Xrb::operator/ ( Vector< T, dimension > const &  left_operand,
U const   right_operand 
) [inline]

Global division operator.

Performs scalar division (a non-commutative operation) of the vector left_operand by the scalar right_operand.

Parameters:
left_operand The vector on the left side of the operation.
right_operand The scalar on the right side of the operation.
Returns:
The scalar quotient of the given scalar and vector.
Note:
There is no protection here against dividing by zero.

Definition at line 633 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T , Uint32 dimension>
T Xrb::operator| ( Vector< T, dimension > const &  left_operand,
Vector< T, dimension > const &  right_operand 
) [inline]

The dot product.

Performs the Euclidean-inner-product (a commutative operation) on the two given vectors.

Parameters:
left_operand The vector on the left side of the operation.
right_operand The vector on the right side of the operation.
Returns:
The sum of the multiplication of each component of the vector left_operand with the corresponding component of the vector right_operand.

Definition at line 653 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T >
T Xrb::operator& ( Vector< T, 2 > const &  left_operand,
Vector< T, 2 > const &  right_operand 
) [inline]

The scalar cross product.

Performs the scalar cross product (a non-commutative operation) on the two given vectors. The resulting value can be thought of as the Z component of the cross product of two vectors contained completely in the X/Y plane.

Parameters:
left_operand The vector on the left side of the operation.
right_operand The vector on the right side of the operation.
Returns:
The product of the lengths of the given vectors, multiplied by the sine of the angle between them.

Definition at line 674 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T >
Vector<T, 3> Xrb::operator& ( Vector< T, 3 > const &  left_operand,
Vector< T, 3 > const &  right_operand 
) [inline]

The 3D vector cross product.

Performs the 3D vector cross product (a non-commutative operation) on the two given vectors.

Parameters:
left_operand The vector on the left side of the operation.
right_operand The vector on the right side of the operation.
Returns:
A 3D vector which is perpendicular to both of the given vectors. The length is given by the product of the given vectors, multiplied by the sine of the angle between them.

Definition at line 692 of file xrb_vector.hpp.

References Xrb::Vector< T, dimension >::m.

template<typename T >
Vector<T, 2> Xrb::PerpendicularVector2 ( Vector< T, 2 > const &  source  )  [inline]

Returns a 2D vector which is rotated 90 degrees counterclockwise.

Requires that T have a unary negation operator defined. This function can be thought of as the 3D cross product of the Z unit vector and source (keeping in mind that the coordinate system is right-handed).

Parameters:
source The vector to base the rotation from.
Returns:
A 2D vector which is perpendicular to source such that
 source & PerpendicularVector2<T>(source) 
is positive.

Definition at line 716 of file xrb_vector.hpp.

Referenced by Xrb::Render::DrawArrow().

void Xrb::Fprint ( FILE *  fptr,
Bool2 const &  ntuple,
bool  add_newline = true 
)

Prints the given Bool2 to the given file stream.

Prints the given Alignment2 to the given file stream.

This is a convenience function to provide a default printf format to NTuple::Fprint.

Parameters:
fptr The file stream to print to.
ntuple The Bool2 to print.
add_newline Indicates if a newline should be printed at the end of the formatted output.
This is a convenience function to provide a default printf format to NTuple::Fprint.
Parameters:
fptr The file stream to print to.
ntuple The Alignment2 to print.
add_newline Indicates if a newline should be printed at the end of the formatted output.

Definition at line 18 of file xrb_ntuple.cpp.

template<typename T , Uint32 size>
NTuple<T, size> Xrb::operator+ ( NTuple< T, size > const &  left_operand,
NTuple< T, size > const &  right_operand 
) [inline]

Global addition operator.

Performs n-tuple addition (a commutative operation) on the given n-tuples.

Parameters:
left_operand The n-tuple on the left side of the operation.
right_operand The n-tuple on the right side of the operation.
Returns:
The n-tuple sum of the given n-tuples.

Definition at line 457 of file xrb_ntuple.hpp.

References Xrb::NTuple< T, size >::m.

template<typename T , Uint32 size>
NTuple<T, size> Xrb::operator- ( NTuple< T, size > const &  left_operand,
NTuple< T, size > const &  right_operand 
) [inline]

Global subtraction operator.

Performs n-tuple subtraction (a non-commutative operation) on the given n-tuples.

Parameters:
left_operand The n-tuple on the left side of the operation.
right_operand The n-tuple on the right side of the operation.
Returns:
The n-tuple difference of the given n-tuples.

Definition at line 474 of file xrb_ntuple.hpp.

References Xrb::NTuple< T, size >::m.

template<typename T , Uint32 size>
NTuple<T, size> Xrb::operator* ( NTuple< T, size > const &  left_operand,
NTuple< T, size > const &  right_operand 
) [inline]

Global multiplication operator.

Performs scalar component-wise multiplication (a commutative operation) of the n-tuple operands.

Parameters:
left_operand The n-tuple on the left side of the operation.
right_operand The n-tuple on the right side of the operation.
Returns:
The n-tuple which contains the component-wise products of the operands' components.

Definition at line 493 of file xrb_ntuple.hpp.

References Xrb::NTuple< T, size >::m.

template<typename T , Uint32 size>
NTuple<T, size> Xrb::operator* ( T const   left_operand,
NTuple< T, size > const &  right_operand 
) [inline]

Global multiplication operator.

Performs scalar multiplication (a commutative operation) of the scalar left_operand on the n-tuple right_operand.

Parameters:
left_operand The scalar on the left side of the operation.
right_operand The n-tuple on the right side of the operation.
Returns:
The scalar multiple of the given scalar and n-tuple.

Definition at line 511 of file xrb_ntuple.hpp.

References Xrb::NTuple< T, size >::m.

template<typename T , Uint32 size>
NTuple<T, size> Xrb::operator* ( NTuple< T, size > const &  left_operand,
T const   right_operand 
) [inline]

Global multiplication operator.

Performs scalar multiplication (a commutative operation) of the scalar right_operand on the n-tuple left_operand.

Parameters:
left_operand The n-tuple on the left side of the operation.
right_operand The scalar on the right side of the operation.
Returns:
The scalar multiple of the given scalar and n-tuple.

Definition at line 529 of file xrb_ntuple.hpp.

References Xrb::NTuple< T, size >::m.

template<typename T , Uint32 size>
NTuple<T, size> Xrb::operator/ ( NTuple< T, size > const &  left_operand,
NTuple< T, size > const &  right_operand 
) [inline]

Global division operator.

Performs scalar component-wise division (a non-commutative operation) of the n-tuple operands.

Parameters:
left_operand The n-tuple on the left side of the operation.
right_operand The n-tuple on the right side of the operation.
Returns:
The n-tuple which contains the component-wise quotients of the operands' components.
Note:
There is no protection here against dividing by zero.

Definition at line 549 of file xrb_ntuple.hpp.

References Xrb::NTuple< T, size >::m.

template<typename T , Uint32 size>
NTuple<T, size> Xrb::operator/ ( T const   left_operand,
NTuple< T, size > const &  right_operand 
) [inline]

Global division operator.

Performs scalar component-wise division (a non-commutative operation) of the scalar operand by the n-tuple operand components.

Parameters:
left_operand The scalar on the left side of the operation.
right_operand The n-tuple on the right side of the operation.
Returns:
The n-tuple which contains the component-wise quotients of the left operand over each of the right operand's components.
Note:
There is no protection here against dividing by zero.

Definition at line 569 of file xrb_ntuple.hpp.

References Xrb::NTuple< T, size >::m.

template<typename T , Uint32 size>
NTuple<T, size> Xrb::operator/ ( NTuple< T, size > const &  left_operand,
T const   right_operand 
) [inline]

Global division operator.

Performs scalar division (a non-commutative operation) of the n-tuple left_operand by the scalar right_operand.

Parameters:
left_operand The n-tuple on the left side of the operation.
right_operand The scalar on the right side of the operation.
Returns:
The scalar quotient of the given scalar and n-tuple.
Note:
There is no protection here against dividing by zero.

Definition at line 588 of file xrb_ntuple.hpp.

References Xrb::NTuple< T, size >::m.


Hosted by SourceForge.net Logo -- Generated on Fri Aug 21 21:46:39 2009 for XuqRijBuh by doxygen 1.5.8