# Ogre::RTShader::Operand Class Reference
[RTShader]

A class that represents a function operand (its the combination of a parameter the in/out semantic and the used fields). More...

`#include <OgreShaderFunctionAtom.h>`

Inheritance diagram for Ogre::RTShader::Operand:
[legend]

List of all members.

## Public Types

enum | OpSemantic { OPS_IN, OPS_OUT, OPS_INOUT }
enum | OpMask { OPM_ALL = 1 << 0, OPM_X = 1 << 1, OPM_Y = 1 << 2, OPM_Z = 1 << 3, OPM_W = 1 << 4 }

## Public Member Functions

| Operand (ParameterPtr parameter, Operand::OpSemantic opSemantic, int opMask=Operand::OPM_ALL)
| Class constructor.
| Operand (const Operand &rhs)
| Copy constructor.
Operand & | operator= (const Operand &rhs)
| Copy the given Operand to this Operand.
| ~Operand ()
| Class destructor.
const ParameterPtr & | getParameter () const
| Returns the parameter object as weak reference.
bool | hasFreeFields () const
| Returns true if not all fields used.
int | getMask () const
| Returns the mask bitfield.
OpSemantic | getSemantic () const
| Returns the operand semantic (do we read/write or both with the parameter).
String | toString () const
| Returns the parameter name and the usage mask like this 'color.xyz'.
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info
void * | operator new[] (size_t sz)
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)

## Static Public Member Functions

static String | getMaskAsString (int mask)
| Returns the given mask as string representation.
static int | getFloatCount (int mask)
| Return the float count of the given mask.
static GpuConstantType | getGpuConstantType (int mask)
| Return the gpu constant type of the given mask.

## Protected Attributes

ParameterPtr | mParameter
OpSemantic | mSemantic
int | mMask

## Detailed Description

A class that represents a function operand (its the combination of a parameter the in/out semantic and the used fields).

Definition at line 78 of file OgreShaderFunctionAtom.h.

## Member Enumeration Documentation

enum Ogre::RTShader::Operand::OpMask

Enumerator:

  OPM_ALL |
  OPM_X |
  OPM_Y |
  OPM_Z |
  OPM_W |

Definition at line 94 of file OgreShaderFunctionAtom.h.

enum Ogre::RTShader::Operand::OpSemantic

Enumerator:

  OPS_IN | The parameter is a input parameter.
  OPS_OUT | The parameter is a output parameter.
  OPS_INOUT | The parameter is a input/output parameter.

Definition at line 83 of file OgreShaderFunctionAtom.h.

## Constructor & Destructor Documentation

Ogre::RTShader::Operand::Operand | ( | ParameterPtr | parameter,
|  | Operand::OpSemantic | opSemantic,
|  | int | opMask = `Operand::OPM_ALL` |
| ) |  |  |

Class constructor.

Parameters:

  | parameter | A function parameter.
  | opSemantic | The in/out semantic of the parameter.
  | opMask | The field mask of the parameter.

Ogre::RTShader::Operand::Operand | ( | const Operand & | rhs | ) |

Copy constructor.

Ogre::RTShader::Operand::~Operand | ( |  | ) |

Class destructor.

## Member Function Documentation

static int Ogre::RTShader::Operand::getFloatCount | ( | int | mask | ) | `[static]`

Return the float count of the given mask.

static GpuConstantType Ogre::RTShader::Operand::getGpuConstantType | ( | int | mask | ) | `[static]`

Return the gpu constant type of the given mask.

int Ogre::RTShader::Operand::getMask | ( |  | ) | const

Returns the mask bitfield.

Definition at line 128 of file OgreShaderFunctionAtom.h.

static String Ogre::RTShader::Operand::getMaskAsString | ( | int | mask | ) | `[static]`

Returns the given mask as string representation.

const ParameterPtr& Ogre::RTShader::Operand::getParameter | ( |  | ) | const

Returns the parameter object as weak reference.

Definition at line 122 of file OgreShaderFunctionAtom.h.

OpSemantic Ogre::RTShader::Operand::getSemantic | ( |  | ) | const

Returns the operand semantic (do we read/write or both with the parameter).

Definition at line 131 of file OgreShaderFunctionAtom.h.

bool Ogre::RTShader::Operand::hasFreeFields | ( |  | ) | const

Returns true if not all fields used.

(usage is described through semantic)

Definition at line 125 of file OgreShaderFunctionAtom.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |  |
| ) |  |  | `[inherited]`

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |  |
| ) |  |  | `[inherited]`

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | `[inherited]`

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | `[inherited]`

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |  |
| ) |  |  | `[inherited]`

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func |
| ) |  |  | `[inherited]`

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | `[inherited]`

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr |
| ) |  |  | `[inherited]`

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func |
| ) |  |  | `[inherited]`

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | `[inherited]`

Definition at line 90 of file OgreMemoryAllocatedObject.h.

Operand& Ogre::RTShader::Operand::operator= | ( | const Operand & | rhs | ) |

Copy the given Operand to this Operand.

Parameters:

  | rhs | The other Operand to copy to this state.

String Ogre::RTShader::Operand::toString | ( |  | ) | const

Returns the parameter name and the usage mask like this 'color.xyz'.

## Member Data Documentation

int Ogre::RTShader::Operand::mMask `[protected]`

Definition at line 148 of file OgreShaderFunctionAtom.h.

ParameterPtr Ogre::RTShader::Operand::mParameter `[protected]`

Definition at line 146 of file OgreShaderFunctionAtom.h.

OpSemantic Ogre::RTShader::Operand::mSemantic `[protected]`

Definition at line 147 of file OgreShaderFunctionAtom.h.

The documentation for this class was generated from the following file:

- OgreShaderFunctionAtom.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Wed Nov 3 2010 19:25:05