arsa  2.7
Public Member Functions | Public Attributes | List of all members
irr::scene::quake3::SVarGroup Struct Reference

#include <IQ3Shader.h>

Public Member Functions

 SVarGroup ()
 
virtual ~SVarGroup ()
 
u32 isDefined (const c8 *name, const c8 *content=0) const
 
const core::stringcget (const c8 *name) const
 
void set (const c8 *name, const c8 *content=0)
 

Public Attributes

core::array< SVariableVariable
 

Detailed Description

Definition at line 573 of file IQ3Shader.h.

Constructor & Destructor Documentation

◆ SVarGroup()

irr::scene::quake3::SVarGroup::SVarGroup ( )
inline

Definition at line 575 of file IQ3Shader.h.

575 { Variable.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE ); }
core::array< SVariable > Variable
Definition: IQ3Shader.h:619

◆ ~SVarGroup()

virtual irr::scene::quake3::SVarGroup::~SVarGroup ( )
inlinevirtual

Definition at line 576 of file IQ3Shader.h.

576 {}

Member Function Documentation

◆ get()

const core::stringc& irr::scene::quake3::SVarGroup::get ( const c8 name) const
inline

Definition at line 594 of file IQ3Shader.h.

595  {
596  SVariable search ( name );
597  s32 index = Variable.linear_search ( search );
598  if ( index < 0 )
599  return irrEmptyStringc;
600 
601  return Variable [ index ].content;
602  }
GLuint const GLchar * name
core::array< SVariable > Variable
Definition: IQ3Shader.h:619
signed int s32
32 bit signed variable.
Definition: irrTypes.h:70
GLuint index

◆ isDefined()

u32 irr::scene::quake3::SVarGroup::isDefined ( const c8 name,
const c8 content = 0 
) const
inline

Definition at line 578 of file IQ3Shader.h.

579  {
580  for ( u32 i = 0; i != Variable.size (); ++i )
581  {
582  if ( 0 == strcmp ( Variable[i].name.c_str(), name ) &&
583  ( 0 == content || strstr ( Variable[i].content.c_str(), content ) )
584  )
585  {
586  return i + 1;
587  }
588  }
589  return 0;
590  }
GLuint const GLchar * name
core::array< SVariable > Variable
Definition: IQ3Shader.h:619
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62

◆ set()

void irr::scene::quake3::SVarGroup::set ( const c8 name,
const c8 content = 0 
)
inline

Definition at line 605 of file IQ3Shader.h.

606  {
607  u32 index = isDefined ( name, 0 );
608  if ( 0 == index )
609  {
610  Variable.push_back ( SVariable ( name, content ) );
611  }
612  else
613  {
614  Variable [ index ].content = content;
615  }
616  }
GLuint const GLchar * name
core::array< SVariable > Variable
Definition: IQ3Shader.h:619
u32 isDefined(const c8 *name, const c8 *content=0) const
Definition: IQ3Shader.h:578
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62
GLuint index

Member Data Documentation

◆ Variable

core::array< SVariable > irr::scene::quake3::SVarGroup::Variable

Definition at line 619 of file IQ3Shader.h.


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