Forums
This is the online documentation for Colossus Entertainments Pixie Game Engine

Asset Class Reference
[Core]

List of all members.


Detailed Description

Author:
Mattias Gustavsson

Definition at line 22 of file Asset.h.


Public Types

enum  SeekOrigin { SEEK_FROM_START = 0, SEEK_FROM_CURRENT = 1, SEEK_FROM_END = 2 }

Public Member Functions

 Asset (const StaticBuffer *memoryBuffer)
 Asset (DynamicBuffer *memoryBuffer)
 Asset (const char *filename)
 ~Asset ()
 Asset (const Asset &asset)
const Assetoperator= (const Asset &)
bool Open () const
bool Create ()
bool Close () const
int GetSize () const
int Seek (int offset, SeekOrigin origin=SEEK_FROM_START) const
int Tell () const
int Write (const char *value, int count=1)
int Write (const short *value, int count=1)
int Write (const int *value, int count=1)
int Write (const long *value, int count=1)
int Write (const unsigned char *value, int count=1)
int Write (const unsigned short *value, int count=1)
int Write (const unsigned int *value, int count=1)
int Write (const unsigned long *value, int count=1)
int Write (const float *value, int count=1)
int Write (const double *value, int count=1)
int Write (const bool *value, int count=1)
int Read (char *value, int count=1) const
int Read (short *value, int count=1) const
int Read (int *value, int count=1) const
int Read (long *value, int count=1) const
int Read (unsigned char *value, int count=1) const
int Read (unsigned short *value, int count=1) const
int Read (unsigned int *value, int count=1) const
int Read (unsigned long *value, int count=1) const
int Read (float *value, int count=1) const
int Read (double *value, int count=1) const
int Read (bool *value, int count=1) const

Static Public Member Functions

static void SetArchive (const Archive *archive)
static const ArchiveGetArchive ()

Member Enumeration Documentation

Enumerator:
SEEK_FROM_START  Seek from the start of the file.
SEEK_FROM_CURRENT  Seek from the current position in the file.
SEEK_FROM_END  Seek from the end of the file.

Definition at line 26 of file Asset.h.


Constructor & Destructor Documentation

Asset::Asset ( const StaticBuffer memoryBuffer  ) 

Constructors

Definition at line 15 of file Asset.cpp.

Asset::Asset ( DynamicBuffer memoryBuffer  ) 

Definition at line 27 of file Asset.cpp.

Asset::Asset ( const char *  filename  ) 

Definition at line 39 of file Asset.cpp.

Asset::~Asset (  ) 

Destructor

Definition at line 59 of file Asset.cpp.

Asset::Asset ( const Asset asset  ) 

Definition at line 74 of file Asset.cpp.


Member Function Documentation

void Asset::SetArchive ( const Archive archive  )  [static]

Definition at line 122 of file Asset.cpp.

const Archive * Asset::GetArchive (  )  [static]

Definition at line 130 of file Asset.cpp.

const Asset & Asset::operator= ( const Asset asset  ) 

Definition at line 99 of file Asset.cpp.

bool Asset::Open (  )  const

Definition at line 138 of file Asset.cpp.

bool Asset::Create (  ) 

Definition at line 166 of file Asset.cpp.

bool Asset::Close (  )  const

Definition at line 193 of file Asset.cpp.

int Asset::GetSize (  )  const

Definition at line 220 of file Asset.cpp.

int Asset::Seek ( int  offset,
SeekOrigin  origin = SEEK_FROM_START 
) const

Definition at line 260 of file Asset.cpp.

int Asset::Tell (  )  const

Definition at line 335 of file Asset.cpp.

int Asset::Write ( const char *  value,
int  count = 1 
)

Definition at line 375 of file Asset.cpp.

int Asset::Write ( const short *  value,
int  count = 1 
)

Definition at line 380 of file Asset.cpp.

int Asset::Write ( const int *  value,
int  count = 1 
)

Definition at line 385 of file Asset.cpp.

int Asset::Write ( const long *  value,
int  count = 1 
)

Definition at line 390 of file Asset.cpp.

int Asset::Write ( const unsigned char *  value,
int  count = 1 
)

Definition at line 395 of file Asset.cpp.

int Asset::Write ( const unsigned short *  value,
int  count = 1 
)

Definition at line 400 of file Asset.cpp.

int Asset::Write ( const unsigned int *  value,
int  count = 1 
)

Definition at line 405 of file Asset.cpp.

int Asset::Write ( const unsigned long *  value,
int  count = 1 
)

Definition at line 410 of file Asset.cpp.

int Asset::Write ( const float *  value,
int  count = 1 
)

Definition at line 415 of file Asset.cpp.

int Asset::Write ( const double *  value,
int  count = 1 
)

Definition at line 420 of file Asset.cpp.

int Asset::Write ( const bool *  value,
int  count = 1 
)

Definition at line 425 of file Asset.cpp.

int Asset::Read ( char *  value,
int  count = 1 
) const

Definition at line 454 of file Asset.cpp.

int Asset::Read ( short *  value,
int  count = 1 
) const

Definition at line 459 of file Asset.cpp.

int Asset::Read ( int *  value,
int  count = 1 
) const

Definition at line 464 of file Asset.cpp.

int Asset::Read ( long *  value,
int  count = 1 
) const

Definition at line 469 of file Asset.cpp.

int Asset::Read ( unsigned char *  value,
int  count = 1 
) const

Definition at line 474 of file Asset.cpp.

int Asset::Read ( unsigned short *  value,
int  count = 1 
) const

Definition at line 479 of file Asset.cpp.

int Asset::Read ( unsigned int *  value,
int  count = 1 
) const

Definition at line 484 of file Asset.cpp.

int Asset::Read ( unsigned long *  value,
int  count = 1 
) const

Definition at line 489 of file Asset.cpp.

int Asset::Read ( float *  value,
int  count = 1 
) const

Definition at line 494 of file Asset.cpp.

int Asset::Read ( double *  value,
int  count = 1 
) const

Definition at line 499 of file Asset.cpp.

int Asset::Read ( bool *  value,
int  count = 1 
) const

Definition at line 504 of file Asset.cpp.