tbx  0.7.3
Public Types | Public Member Functions | List of all members
tbx::res::ResFileInfo Class Reference

Class for FileInfo object template. More...

#include <resfileinfo.h>

Inheritance diagram for tbx::res::ResFileInfo:
tbx::res::ResObject tbx::res::ResBase

Public Types

enum  { CLASS_ID = 0x82ac0 }
 

Public Member Functions

 ResFileInfo (const ResObject &other)
 Construct a file information window resource from a ResObject. More...
 
 ResFileInfo (const ResFileInfo &other)
 Construct a file information window resource by copying another. More...
 
ResFileInfooperator= (const ResObject &other)
 Assign from a ResObject. More...
 
ResFileInfooperator= (const ResFileInfo &other)
 Assign from another file information window resource. More...
 
 ResFileInfo (std::string name)
 Construct a file information window resource. More...
 
int flags () const
 Raw access to all the object flags. More...
 
void flags (int value)
 Set all the flags. More...
 
bool generate_about_to_be_shown () const
 Check if the about to be shown event should be generated. More...
 
void generate_about_to_be_shown (bool value)
 Set if the about to be shown event should be generated. More...
 
bool generate_dialogue_completed () const
 Check if the dialogue completed event should be generated. More...
 
void generate_dialogue_completed (bool value)
 Set if the dialogue completed event should be generated. More...
 
const char * title () const
 Get the title of the dialogue. More...
 
void title (const char *value, int max_length=-1)
 Set the title of the dialogue. More...
 
void title (const std::string &value, int max_length=-1)
 Set the title of the dialogue. More...
 
int max_title () const
 Get the maximum size the title can be.
 
int modified () const
 Get modified state. More...
 
void modified (int value)
 Set modified state. More...
 
int file_type () const
 Get the initial file type for the file info resource. More...
 
void file_type (int value)
 Set the initial file type for the file info resource. More...
 
const char * file_name () const
 Get the initial file name for the file info. More...
 
void file_name (const char *value)
 Set the initial file name for the file info. More...
 
void file_name (const std::string &value)
 Set the initial file name for the file info. More...
 
int filesize () const
 Get the file size reported by the file info. More...
 
void filesize (int value)
 Set the file size reported by the file info. More...
 
UTCTime date () const
 Get the data for the file info. More...
 
void date (UTCTime value)
 Set the data for the file info. More...
 
const char * window () const
 Get the name of the window template that provides the window for this object. More...
 
void window (const char *value)
 Set the name of the window template that provides the window for this object. More...
 
void window (const std::string &value)
 Set the name of the window template that provides the window for this object. More...
 
- Public Member Functions inherited from tbx::res::ResObject
 ResObject (const ResObject &other)
 Copy constructor.
 
virtual ~ResObject ()
 Destructor.
 
ResObjectoperator= (const ResObject &other)
 Assignment.
 
bool save (std::ostream &file)
 Save a resource object to a stream. More...
 
const ResObjectHeaderobject_header () const
 Return a pointer to the header information for this object.
 
const char * name () const
 Return pointer to name of object.
 
void name (std::string name)
 Set the name of the object.
 
int class_id () const
 Return class id of object.
 
int object_version () const
 Return version number * 100.
 
void object_version (int new_version)
 Set version for object.
 
unsigned int object_flags () const
 object flags - use methods below for named access to the bits of the flags
 
void object_flags (unsigned int flags)
 Set the object flags for this object. More...
 
bool create_on_load () const
 Get create on load flag. More...
 
void create_on_load (bool value)
 Set if the object should be automatically created when the Resource file is loaded. More...
 
bool show_on_create () const
 Get show on create flags. More...
 
void show_on_create (bool value)
 Set if the object to be automatically shown when it is created. More...
 
bool shared () const
 Get shared flag. More...
 
void shared (bool value)
 Set if the object is to be a shared object. More...
 
bool ancestor () const
 Get ancestor flags. More...
 
void ancestor (bool value)
 Set if the object should be an ancestor object. More...
 
void check_class_id (int class_id) const
 Check if this objects class id is as specified. More...
 
- Public Member Functions inherited from tbx::res::ResBase
 ResBase (const ResBase &other)
 Copy constructor. More...
 
virtual ~ResBase ()
 Destructor.
 
ResBaseoperator= (const ResBase &other)
 Assignment. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from tbx::res::ResObject
static ResObjectload (std::istream &file)
 Load a resource object from a stream. More...
 
static OsSpriteAreaPtr client_sprite_pointer ()
 Get pointer to client sprite area. More...
 
static void client_sprite_pointer (OsSpriteAreaPtr ptr)
 Set Sprite area to use for new and loaded objects.
 
- Protected Member Functions inherited from tbx::res::ResObject
 ResObject (std::string name, int class_id, int version, int object_size)
 Protected constructor for creating a subclass.
 
ResObjectHeaderobject_header ()
 Return a pointer to the header information for this object.
 
void make_writeable ()
 Make object writeable, call before any change. More...
 
ResData * component_data (char *new_body, int offset, int size) const
 Extract a copy of a components data from this object. More...
 
void insert_component (int offset, const ResImpl *comp_impl)
 Insert a component in an object. More...
 
void replace_component (int offset, int old_size, const ResImpl *comp_impl)
 Replace a component. More...
 
void erase_component (int offset, int size)
 Erase a component of the given size. More...
 
- Protected Member Functions inherited from tbx::res::ResBase
 ResBase (ResImpl *impl)
 Create from internal resource implementation. More...
 
const char * string (int offset) const
 Return a string at the given offset. More...
 
void string (int offset, const char *value)
 Set a string at the given offset. More...
 
void string (int offset, std::string value)
 Set a string at the given offset. More...
 
void string_with_length (int offset, const char *value, int length=-1)
 Assign a string where the length is at offset+4. More...
 
void string_with_length (int offset, const std::string &value, int length=-1)
 Assign a string where the length is at offset+4. More...
 
const char * message (int offset) const
 Get the message string at the given offset. More...
 
void message (int offset, const char *value)
 Set a message at the given offset. More...
 
void message (int offset, std::string value)
 Set a message at the given offset. More...
 
void message_with_length (int offset, const char *value, int length=-1)
 Assign a message where the length is at offset+4. More...
 
void message_with_length (int offset, const std::string &value, int length=-1)
 Assign a message where the length is at offset+4. More...
 
int int_value (int offset) const
 Get an integer value. More...
 
void int_value (int offset, int value)
 Set a number at the specified offset. More...
 
unsigned int uint_value (int offset) const
 Get an unsigned integer value. More...
 
void uint_value (int offset, unsigned int value)
 Set an unsigned number at the specified offset. More...
 
unsigned char byte_value (int offset) const
 Get a byte value. More...
 
void byte_value (int offset, unsigned char value)
 Set an unsigned byte (8 bit value) at the specified offset. More...
 
unsigned short ushort_value (int offset) const
 Get a unsigned short value. More...
 
void ushort_value (int offset, unsigned short value)
 Set an unsigned short (16 bit value) at the specified offset. More...
 
bool flag (int offset, int mask) const
 Check if any of the bits in a mask are set. More...
 
void flag (int offset, int mask, bool on)
 Set/clear the bits in mask. More...
 
int flag_value (int offset, int mask) const
 Get the bits for the given mask. More...
 
void flag_value (int offset, int mask, int value)
 Set bits in given mask clearing others. More...
 
void init_string (int offset, const char *value)
 Initialise a string in a constructor helper. More...
 
void init_message (int offset, const char *value)
 Initialise a message in a constructor helper. More...
 
void init_sprite_area_ref (int offset)
 Initialise a sprite area reference. More...
 
void init_object_ref (int offset)
 Initialise an object reference. More...
 
- Protected Attributes inherited from tbx::res::ResBase
ResImpl * _impl
 Internal Resource implementation.
 

Detailed Description

Class for FileInfo object template.

Constructor & Destructor Documentation

tbx::res::ResFileInfo::ResFileInfo ( const ResObject other)
inline

Construct a file information window resource from a ResObject.

Parameters
otherResObject to construct from
Exceptions
ResObjectClassMismatchif the ResObject is not a file information window resource
tbx::res::ResFileInfo::ResFileInfo ( const ResFileInfo other)
inline

Construct a file information window resource by copying another.

Parameters
otherResFileInfo to copy
tbx::res::ResFileInfo::ResFileInfo ( std::string  name)
inline

Construct a file information window resource.

All options are false, events unset and messages are null.

Parameters
namethe name of this object (maximum 12 characters)

Member Function Documentation

UTCTime tbx::res::ResFileInfo::date ( ) const
inline

Get the data for the file info.

Returns
UTCTime containing the date in the file info
void tbx::res::ResFileInfo::date ( UTCTime  value)
inline

Set the data for the file info.

Parameters
valueUTCTime containing the new date
const char* tbx::res::ResFileInfo::file_name ( ) const
inline

Get the initial file name for the file info.

Returns
pointer to zero terminated file name string or 0 for the default.
void tbx::res::ResFileInfo::file_name ( const char *  value)
inline

Set the initial file name for the file info.

Parameters
valuepointer to zero terminated file name string or 0 for the default.
void tbx::res::ResFileInfo::file_name ( const std::string &  value)
inline

Set the initial file name for the file info.

Parameters
valuenew file name
int tbx::res::ResFileInfo::file_type ( ) const
inline

Get the initial file type for the file info resource.

Returns
file type
void tbx::res::ResFileInfo::file_type ( int  value)
inline

Set the initial file type for the file info resource.

Parameters
valuenew file type
int tbx::res::ResFileInfo::filesize ( ) const
inline

Get the file size reported by the file info.

Returns
file size in bytes
void tbx::res::ResFileInfo::filesize ( int  value)
inline

Set the file size reported by the file info.

Parameters
valuefile size in bytes
int tbx::res::ResFileInfo::flags ( ) const
inline

Raw access to all the object flags.

It is recommended you use the other methods in this class rather than use this directly.

Returns
integer with individual bits specifying various flags
void tbx::res::ResFileInfo::flags ( int  value)
inline

Set all the flags.

It is recommended you use the other methods in this class rather than use this directly.

Parameters
valuethe new flags
bool tbx::res::ResFileInfo::generate_about_to_be_shown ( ) const
inline

Check if the about to be shown event should be generated.

Returns
true if the about to be shown event should be generated
void tbx::res::ResFileInfo::generate_about_to_be_shown ( bool  value)
inline

Set if the about to be shown event should be generated.

Parameters
valueset to true if the about to be shown event should be generated
bool tbx::res::ResFileInfo::generate_dialogue_completed ( ) const
inline

Check if the dialogue completed event should be generated.

Returns
true if the dialogue completed event should be generated
void tbx::res::ResFileInfo::generate_dialogue_completed ( bool  value)
inline

Set if the dialogue completed event should be generated.

Parameters
valueset to true if the dialogue completed event should be generated
int tbx::res::ResFileInfo::modified ( ) const
inline

Get modified state.

Returns
non-zero if modified
void tbx::res::ResFileInfo::modified ( int  value)
inline

Set modified state.

Parameters
valueset to any non-zero value if modified
ResFileInfo& tbx::res::ResFileInfo::operator= ( const ResObject other)
inline

Assign from a ResObject.

Parameters
otherResObject to copy
Exceptions
ResObjectClassMismatchif the ResObject is not a file information window resource
ResFileInfo& tbx::res::ResFileInfo::operator= ( const ResFileInfo other)
inline

Assign from another file information window resource.

Parameters
otherbutton gadget resource to copy
const char* tbx::res::ResFileInfo::title ( ) const
inline

Get the title of the dialogue.

Returns
zero terminated string with title or 0 for the default title
void tbx::res::ResFileInfo::title ( const char *  value,
int  max_length = -1 
)
inline

Set the title of the dialogue.

Parameters
valuezero terminated string with the title or 0 for the default
max_lengthmaximum length the title will be changed to. -1 (the default) to use the length of the title given.
void tbx::res::ResFileInfo::title ( const std::string &  value,
int  max_length = -1 
)
inline

Set the title of the dialogue.

Parameters
valuenew title
max_lengthmaximum length the title will be changed to. -1 (the default) to use the length of the title given.
const char* tbx::res::ResFileInfo::window ( ) const
inline

Get the name of the window template that provides the window for this object.

Returns
name of window to use or 0 if default internal window will be used
void tbx::res::ResFileInfo::window ( const char *  value)
inline

Set the name of the window template that provides the window for this object.

Parameters
valueThe name of window to use or 0 if default internal window will be used
void tbx::res::ResFileInfo::window ( const std::string &  value)
inline

Set the name of the window template that provides the window for this object.

Parameters
valueThe name of window to use or 0 if default internal window will be used

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