RAW Class Template Reference

List of all members.

Detailed Description

template<typename T>
class omni::pool::details::RAW< T >

RAW memory operations.

This class makes RAW memory read/write operations easy. To read the value at custom address, you should use read() method. To write the value at custom address, you should use write() method.

For example:

  void f(void *ptr)
  {
    int a = RAW<int>::read(ptr); // read integer
    RAW<int>::write(ptr, a + 1); // write integer
  }

Template argument T should be of POD type.

Public Types

Static Public Member Functions


Member Typedef Documentation

typedef void* pointer

Pointer type.

typedef T value_type

Value type.


Member Function Documentation

static void write ( pointer  p,
value_type  x 
) [inline, static]

Write the value.

This method writes the value x at the custom address p.

Parameters:
[in] p The custom address.
[in] x The value.

static value_type read ( pointer  p  )  [inline, static]

Read the value.

This method reads the value at the custom address p.

Parameters:
[in] p The custom address.
Returns:
The value.


Generated on Wed Jun 6 17:27:47 2007 for OMNI by  doxygen 1.5.2