Objective-C++ Preprocessor  5.0 with ARC & GC
C++ classes to enhance syntax and manage reference counting.
Public Member Functions | List of all members
OOVector< ETYPE > Class Template Reference

#include <objvec.h>

Inheritance diagram for OOVector< ETYPE >:
OOPointer< OOBuffer< ETYPE > * > OOReference< NSValue * >

Public Member Functions

oo_inline OOVector ()
 
oo_inline OOVector (const OOVector &val)
 
oo_inline OOVector (int size)
 oo_inline OOVector( OOClassPtr<OOVector<ETYPE> > &val ) { *this = val.cget(); }
 
oo_inline OOVector (const OOArray< ETYPE > &array)
 
oo_inline OOVector (const NSArray *array)
 
oo_inline void reserve (NSUInteger size)
 
oo_inline NSUInteger size ()
 
oo_inline ETYPE * begin ()
 
oo_inline ETYPE * end ()
 
oo_inline OOVectoroperator= (NSValue *val)
 
oo_inline OOVectoroperator= (const OOVector &val)
 
oo_inline operator int ()
 
oo_inline ETYPE & operator[] (int sub)
 
oo_inline OOVectoroperator+= (ETYPE value)
 

Additional Inherited Members

- Protected Member Functions inherited from OOPointer< OOBuffer< ETYPE > * >
oo_inline NSValue * pset (NSValue *val) OO_RETURNS
 
oo_inline OOBuffer< ETYPE > * pset (OOBuffer< ETYPE > *ptr)
 
oo_inline OOBuffer< ETYPE > * pget ()
 

Detailed Description

template<typename ETYPE>
class OOVector< ETYPE >

A more efficient buff class than NSArray for any element type (int, id, OOReference<NSString> etc.). Memory is allocated on deamnd when _refd by the subscipt operator and if the type is a class its constructors and destructors will be called by the underlying OOBuffer class.

Usage:

OOVector<double> array;
array[99] = 43.
OOVector<OOString> strarry;
array[99] = "THIS";

Definition at line 262 of file objvec.h.

Constructor & Destructor Documentation

template<typename ETYPE>
oo_inline OOVector< ETYPE >::OOVector ( )
inline

Definition at line 264 of file objvec.h.

template<typename ETYPE>
oo_inline OOVector< ETYPE >::OOVector ( const OOVector< ETYPE > &  val)
inline

Definition at line 265 of file objvec.h.

template<typename ETYPE>
oo_inline OOVector< ETYPE >::OOVector ( int  size)
inline

oo_inline OOVector( OOClassPtr<OOVector<ETYPE> > &val ) { *this = val.cget(); }

Definition at line 267 of file objvec.h.

template<typename ETYPE>
oo_inline OOVector< ETYPE >::OOVector ( const OOArray< ETYPE > &  array)
inline

Definition at line 268 of file objvec.h.

template<typename ETYPE>
oo_inline OOVector< ETYPE >::OOVector ( const NSArray *  array)
inline

Definition at line 274 of file objvec.h.

Member Function Documentation

template<typename ETYPE>
oo_inline ETYPE* OOVector< ETYPE >::begin ( )
inline

Definition at line 287 of file objvec.h.

template<typename ETYPE>
oo_inline ETYPE* OOVector< ETYPE >::end ( )
inline

Definition at line 290 of file objvec.h.

template<typename ETYPE>
oo_inline OOVector< ETYPE >::operator int ( )
inline

Definition at line 297 of file objvec.h.

template<typename ETYPE>
oo_inline OOVector& OOVector< ETYPE >::operator+= ( ETYPE  value)
inline

Definition at line 303 of file objvec.h.

template<typename ETYPE>
oo_inline OOVector& OOVector< ETYPE >::operator= ( NSValue *  val)
inline

Definition at line 294 of file objvec.h.

template<typename ETYPE>
oo_inline OOVector& OOVector< ETYPE >::operator= ( const OOVector< ETYPE > &  val)
inline

Definition at line 295 of file objvec.h.

template<typename ETYPE>
oo_inline ETYPE& OOVector< ETYPE >::operator[] ( int  sub)
inline

Definition at line 300 of file objvec.h.

template<typename ETYPE>
oo_inline void OOVector< ETYPE >::reserve ( NSUInteger  size)
inline

Definition at line 281 of file objvec.h.

template<typename ETYPE>
oo_inline NSUInteger OOVector< ETYPE >::size ( )
inline

Definition at line 284 of file objvec.h.


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