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 321 of file StdMeshMaterial.h.

Constructor & Destructor Documentation

StdMeshMaterialTextureUnit::TexPtr::TexPtr ( C4Surface Surface)

Definition at line 965 of file StdMeshMaterial.cpp.

966  : pTex(new Tex(Surface))
967 {
968 }
StdMeshMaterialTextureUnit::TexPtr::TexPtr ( const TexPtr other)

Definition at line 970 of file StdMeshMaterial.cpp.

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

971  : pTex(other.pTex)
972 {
973  ++pTex->RefCount;
974 }
StdMeshMaterialTextureUnit::TexPtr::~TexPtr ( )

Definition at line 976 of file StdMeshMaterial.cpp.

977 {
978  if(!--pTex->RefCount)
979  delete pTex;
980 }

Member Function Documentation

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

Definition at line 982 of file StdMeshMaterial.cpp.

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

983 {
984  if(&other == this) return *this;
985 
986  if(!--pTex->RefCount)
987  delete pTex;
988 
989  pTex = other.pTex;
990  ++pTex->RefCount;
991 
992  return *this;
993 }

Member Data Documentation

Tex* StdMeshMaterialTextureUnit::TexPtr::pTex

Definition at line 330 of file StdMeshMaterial.h.

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


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