OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
StdMeshMaterialTextureUnit::TexPtr Class Reference

#include <StdMeshMaterial.h>

Collaboration diagram for StdMeshMaterialTextureUnit::TexPtr:
[legend]

Public Member Functions

 TexPtr (C4Surface *Surface)
 
 TexPtr (const TexPtr &other)
 
 ~TexPtr ()
 
TexPtroperator= (const TexPtr &other)
 

Public Attributes

TexpTex
 

Detailed Description

Definition at line 324 of file StdMeshMaterial.h.

Constructor & Destructor Documentation

StdMeshMaterialTextureUnit::TexPtr::TexPtr ( C4Surface Surface)

Definition at line 983 of file StdMeshMaterial.cpp.

984  : pTex(new Tex(Surface))
985 {
986 }
StdMeshMaterialTextureUnit::TexPtr::TexPtr ( const TexPtr other)

Definition at line 988 of file StdMeshMaterial.cpp.

References pTex, and StdMeshMaterialTextureUnit::Tex::RefCount.

989  : pTex(other.pTex)
990 {
991  ++pTex->RefCount;
992 }
StdMeshMaterialTextureUnit::TexPtr::~TexPtr ( )

Definition at line 994 of file StdMeshMaterial.cpp.

995 {
996  if(!--pTex->RefCount)
997  delete pTex;
998 }

Member Function Documentation

StdMeshMaterialTextureUnit::TexPtr & StdMeshMaterialTextureUnit::TexPtr::operator= ( const TexPtr other)

Definition at line 1000 of file StdMeshMaterial.cpp.

References pTex, and StdMeshMaterialTextureUnit::Tex::RefCount.

1001 {
1002  if(&other == this) return *this;
1003 
1004  if(!--pTex->RefCount)
1005  delete pTex;
1006 
1007  pTex = other.pTex;
1008  ++pTex->RefCount;
1009 
1010  return *this;
1011 }

Member Data Documentation

Tex* StdMeshMaterialTextureUnit::TexPtr::pTex

Definition at line 333 of file StdMeshMaterial.h.

Referenced by operator=(), and TexPtr().


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