Templates -- Meow  1.1.4
A C++ template which is unable and also not allowed to compile to obj-file first.
meow::ObjArray< T > Class Template Reference

純粹把 std::vector 包起來, 變成繼承自 ObjBase More...

#include "ObjArray.h"

Inheritance diagram for meow::ObjArray< T >:
meow::ObjBase

Public Member Functions

 ObjArray ()
 
 ObjArray (ObjArray const &a)
 
 ObjArray (std::vector< T > const &a)
 
 ObjArray (size_t sz, T const &e)
 
 ~ObjArray ()
 
ObjArraycopyFrom (ObjArray const &a)
 
ObjArrayreferenceFrom (ObjArray const &a)
 
size_t size () const
 
bool empty () const
 
size_t size (size_t res, T const &i)
 
size_t size (size_t res)
 
void clear ()
 
T const & entry (size_t i) const
 
T const & entry (size_t i, T const &e)
 
T const & putBack (T const &e)
 
bool popBack ()
 
ObjArrayoperator= (ObjArray const &a)
 
T const & operator[] (size_t i) const
 
T & operator[] (size_t i)
 
bool write (FILE *f, bool bin, unsigned int fg) const
 將物件寫入檔案, 預設implement為直接回傳 false More...
 
bool read (FILE *f, bool bin, unsigned int fg)
 將物件從檔案讀出, 預設implement為直接回傳 false More...
 
ObjBasecreate () const
 回傳一個new出來的物件, 預設implement為直接回傳 NULL More...
 
ObjBasecopyFrom (ObjBase const *b)
 複製, 預設使用operator= More...
 
char const * ctype () const
 用C-style string回傳這個class的type name More...
 
std::string type () const
 用std::string回傳這個class的type name More...
 
- Public Member Functions inherited from meow::ObjBase
virtual ~ObjBase ()
 

Additional Inherited Members

- Static Public Member Functions inherited from meow::ObjBase
static char const * ctypeBase ()
 用C-style string回傳base的type name More...
 
static std::string typeBase ()
 用std::string回傳base的type name More...
 
- Protected Member Functions inherited from meow::ObjBase
 ObjBase ()
 

Detailed Description

template<class T>
class meow::ObjArray< T >

純粹把 std::vector 包起來, 變成繼承自 ObjBase

Author
cathook

Definition at line 23 of file ObjArray.h.

Constructor & Destructor Documentation

template<class T >
meow::ObjArray< T >::ObjArray ( )
inline

Definition at line 38 of file ObjArray.h.

template<class T >
meow::ObjArray< T >::ObjArray ( ObjArray< T > const &  a)
inline

Definition at line 41 of file ObjArray.h.

template<class T >
meow::ObjArray< T >::ObjArray ( std::vector< T > const &  a)
inline

Definition at line 45 of file ObjArray.h.

template<class T >
meow::ObjArray< T >::ObjArray ( size_t  sz,
T const &  e 
)
inline

Definition at line 49 of file ObjArray.h.

template<class T >
meow::ObjArray< T >::~ObjArray ( )
inline

Definition at line 53 of file ObjArray.h.

Member Function Documentation

template<class T >
void meow::ObjArray< T >::clear ( )
inline

Definition at line 83 of file ObjArray.h.

template<class T >
ObjArray& meow::ObjArray< T >::copyFrom ( ObjArray< T > const &  a)
inline

Definition at line 56 of file ObjArray.h.

template<class T >
ObjBase* meow::ObjArray< T >::copyFrom ( ObjBase const *  b)
inlinevirtual

複製, 預設使用operator=

Parameters
[in]b資料來源
Returns
this

Reimplemented from meow::ObjBase.

Definition at line 151 of file ObjArray.h.

template<class T >
ObjBase* meow::ObjArray< T >::create ( ) const
inlinevirtual

回傳一個new出來的物件, 預設implement為直接回傳 NULL

Reimplemented from meow::ObjBase.

Definition at line 147 of file ObjArray.h.

template<class T >
char const* meow::ObjArray< T >::ctype ( ) const
inlinevirtual

用C-style string回傳這個class的type name

Reimplemented from meow::ObjBase.

Definition at line 155 of file ObjArray.h.

template<class T >
bool meow::ObjArray< T >::empty ( ) const
inline

Definition at line 69 of file ObjArray.h.

template<class T >
T const& meow::ObjArray< T >::entry ( size_t  i) const
inline

Definition at line 87 of file ObjArray.h.

template<class T >
T const& meow::ObjArray< T >::entry ( size_t  i,
T const &  e 
)
inline

Definition at line 90 of file ObjArray.h.

template<class T >
ObjArray& meow::ObjArray< T >::operator= ( ObjArray< T > const &  a)
inline

Definition at line 106 of file ObjArray.h.

template<class T >
T const& meow::ObjArray< T >::operator[] ( size_t  i) const
inline

Definition at line 110 of file ObjArray.h.

template<class T >
T& meow::ObjArray< T >::operator[] ( size_t  i)
inline

Definition at line 114 of file ObjArray.h.

template<class T >
bool meow::ObjArray< T >::popBack ( )
inline

Definition at line 100 of file ObjArray.h.

template<class T >
T const& meow::ObjArray< T >::putBack ( T const &  e)
inline

Definition at line 95 of file ObjArray.h.

template<class T >
bool meow::ObjArray< T >::read ( FILE *  f,
bool  bin,
unsigned int  fg 
)
inlinevirtual

將物件從檔案讀出, 預設implement為直接回傳 false

Parameters
[in]f檔案
[in]bin是否為binary模式
[in]fg使用者自訂的argument
Returns
成功或失敗

Reimplemented from meow::ObjBase.

Definition at line 132 of file ObjArray.h.

template<class T >
ObjArray& meow::ObjArray< T >::referenceFrom ( ObjArray< T > const &  a)
inline

Definition at line 61 of file ObjArray.h.

template<class T >
size_t meow::ObjArray< T >::size ( ) const
inline

Definition at line 66 of file ObjArray.h.

template<class T >
size_t meow::ObjArray< T >::size ( size_t  res,
T const &  i 
)
inline

Definition at line 73 of file ObjArray.h.

template<class T >
size_t meow::ObjArray< T >::size ( size_t  res)
inline

Definition at line 78 of file ObjArray.h.

template<class T >
std::string meow::ObjArray< T >::type ( ) const
inlinevirtual

用std::string回傳這個class的type name

Reimplemented from meow::ObjBase.

Definition at line 159 of file ObjArray.h.

template<class T >
bool meow::ObjArray< T >::write ( FILE *  f,
bool  bin,
unsigned int  fg 
) const
inlinevirtual

將物件寫入檔案, 預設implement為直接回傳 false

Parameters
[in]f檔案
[in]bin是否為binary模式
[in]fg使用者自訂的argument
Returns
成功或失敗

Reimplemented from meow::ObjBase.

Definition at line 118 of file ObjArray.h.


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