Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

strmod::strmod::StrChunkPtrT< Chunk > Class Template Reference

A convenience template to point at things derived from StrChunk. More...

#include <StrMod/StrChunkPtrT.h>

Inheritance diagram for strmod::strmod::StrChunkPtrT< Chunk >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef StrChunkPtr super1
 An easier way to refer to StrChunkPtr.


Public Methods

Chunk * GetPtr () const
 A way to get the raw pointer value, just in case.

 StrChunkPtrT (const StrChunkPtrT< Chunk > &b)
 These all construct a StrChunkPtr from the appropriate type and maintain the reference count to the pointed at StrChunk.

 StrChunkPtrT (const lcore::RefCountPtrT< Chunk > &b)
 These all construct a StrChunkPtr from the appropriate type and maintain the reference count to the pointed at StrChunk.

 StrChunkPtrT (Chunk *stptr=0)
 These all construct a StrChunkPtr from the appropriate type and maintain the reference count to the pointed at StrChunk.

Chunk & operator * () const
 The methods you need to override to do a smart pointer.

Chunk * operator-> () const
 The methods you need to override to do a smart pointer.

const StrChunkPtrT< Chunk > & operator= (const StrChunkPtrT< Chunk > &b)
 These all set a StrChunkPtrs value from the appropriate type and maintain the reference count to the pointed at StrChunk.

const StrChunkPtrT< Chunk > & operator= (const lcore::RefCountPtrT< Chunk > &b)
 These all set a StrChunkPtrs value from the appropriate type and maintain the reference count to the pointed at StrChunk.

const StrChunkPtrT< Chunk > & operator= (Chunk *b)
 These all set a StrChunkPtrs value from the appropriate type and maintain the reference count to the pointed at StrChunk.


Protected Methods

virtual lcore::ReferenceCountingi_CheckType (lcore::ReferenceCounting *p) const
 See class RefCountPtr. Used in ensuring type safety.


Detailed Description

template<class Chunk>
class strmod::strmod::StrChunkPtrT< Chunk >

A convenience template to point at things derived from StrChunk.

This is nice to have since the inheritance relationship between StrChunkPtrT and StrChunk mirrors the inheritance relationship between StrChunk and any of it's subclasses. This allows us to use a StrChunkPtrT when we care about the type of a StrChunk and still pass it into methods requiring a const StrChunkPtr & without a type conversion.

Note that this class (and none of my other template classes) override the various Protocol type identification methods. This is because the LCore type identification system doesn't handle templated types well, and also because of the dubious value of identifying them precisely. It will still register as being a StrChunkPtr or RefCountPtr.

Definition at line 61 of file StrChunkPtrT.h.


The documentation for this class was generated from the following file:
Generated on Wed Jan 29 00:32:55 2003 for libNet by doxygen1.3-rc1