OpenClonk
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

◆ TexPtr() [1/2]

StdMeshMaterialTextureUnit::TexPtr::TexPtr ( C4Surface Surface)

Definition at line 966 of file StdMeshMaterial.cpp.

967  : pTex(new Tex(Surface))
968 {
969 }

◆ TexPtr() [2/2]

StdMeshMaterialTextureUnit::TexPtr::TexPtr ( const TexPtr other)

Definition at line 971 of file StdMeshMaterial.cpp.

972  : pTex(other.pTex)
973 {
974  ++pTex->RefCount;
975 }

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

◆ ~TexPtr()

StdMeshMaterialTextureUnit::TexPtr::~TexPtr ( )

Definition at line 977 of file StdMeshMaterial.cpp.

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

Member Function Documentation

◆ operator=()

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

Definition at line 983 of file StdMeshMaterial.cpp.

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

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

Member Data Documentation

◆ pTex

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: