c2ephp

COBFileBlock Class Reference

Defines the bock to represent a file block in a COB file. More...

Inheritance diagram for COBFileBlock:
Collaboration diagram for COBFileBlock:

List of all members.

Public Member Functions

 COBFileBlock ($type, $name, $contents)
 Constructs a new COBFileBlock.
 AddReserved ($reserved)
 Add the reserved data associated with this file block.
 GetName ()
 Get the name of the file.
 GetFileType ()
 Get the file's type.
 GetContents ()
 Get the contents of the file.
 GetReserved ()
 Get the reserved data.
 GetType ()
 Gets the type of this COB block.
 Compile ()
 Compiles this COB Block and returns COB file as a binary string.

Related Functions

(Note that these are not member functions.)
Cob Block Types
enum  COB_BLOCK_AGENT
 

Agent Block - 'agnt'.

More...
enum  COB_BLOCK_FILE
 

File Block - 'file'.

More...
enum  COB_BLOCK_AUTHOR
 

Author Block - 'auth'.

More...

Detailed Description

Defines the bock to represent a file block in a COB file.

Definition at line 5 of file FileBlock.php.


Member Function Documentation

COBFileBlock::AddReserved ( reserved)

Add the reserved data associated with this file block.

Parameters:
$reservedThe reserved data

Definition at line 34 of file FileBlock.php.

COBFileBlock::COBFileBlock ( type,
name,
contents 
)

Constructs a new COBFileBlock.

Parameters:
$typeThe file type
$nameThe file name (including extension)
$contentsThe contents of the file

Definition at line 23 of file FileBlock.php.

COBBlock::Compile ( ) [abstract, inherited]

Compiles this COB Block and returns COB file as a binary string.

Returns:
string
COBFileBlock::GetContents ( )

Get the contents of the file.

Definition at line 53 of file FileBlock.php.

COBFileBlock::GetFileType ( )

Get the file's type.

Returns:
'sprite' or 'sound' - i.e. one of the COB_DEPENDENCY_* constants in COBAgentBlock

Definition at line 48 of file FileBlock.php.

COBFileBlock::GetName ( )

Get the name of the file.

Definition at line 39 of file FileBlock.php.

COBFileBlock::GetReserved ( )

Get the reserved data.

Reserved data was never officially used.

Returns:
A 4-byte integer.

Definition at line 62 of file FileBlock.php.

COBBlock::GetType ( ) [inherited]

Gets the type of this COB block.

Returns:
string One of the COB_BLOCK_* defines.

Definition at line 37 of file COBBlock.php.


Friends And Related Function Documentation

enum COB_BLOCK_AGENT [related, inherited]

Agent Block - 'agnt'.

Definition at line 8 of file COBBlock.php.

enum COB_BLOCK_AUTHOR [related, inherited]

Author Block - 'auth'.

Definition at line 12 of file COBBlock.php.

enum COB_BLOCK_FILE [related, inherited]

File Block - 'file'.

Definition at line 10 of file COBBlock.php.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations