AxResource Class Reference

A resource can represent a tool, document, file, web site, etc. More...

#include <ax_resource/ax_resource.h>

Inheritance diagram for AxResource:

AxDocument AxAudioResource AxBookResource AxFileResource List of all members.

Public Member Functions

 AxResource (const AxResource &resource)
 AxResource ()
 ~AxResource ()
void Init ()
void Copy (const AxResource &resource)
 Copy the basic resource information.
void operator= (const AxResource &resource)
 Assignment operator.
bool Eq (const AxResource &resource) const
 Test equality for the basic resource information.
virtual AxDocumentClone () const
 Clone - derived classes must implement this function.
virtual bool Read (wxDataStreamHelper &helper)
 Read the data for this resource.
virtual bool ReadProperties (wxDataStreamHelper &helper)
 Read public properties, always the first part of the record.
virtual bool Write (wxDataStreamHelper &helper)
 Write the data for this resource.
virtual bool WriteProperties (wxDataStreamHelper &helper)
 Write public properties, always the first part of the record.
virtual bool ReadChildren (wxDataStreamHelper &helper)
 Read children.
virtual bool WriteChildren (wxDataStreamHelper &helper)
 Write children.
virtual void SetFilename (const wxString &filename)
 Set filename.
virtual wxString GetFilename () const
 Get filename.
virtual wxString GetLongDescription () const
 Get long description. Override to return a more complete description.
virtual wxString GetShortDescription () const
 Get short description. Override to return a more complete description.
AxPropertiesGetProperties ()
 Get properties.
virtual void SetProperty (const AxProperty &property)
 Set a property.
virtual void SetProperty (const wxString &name, const wxString &value)
virtual void SetProperty (const wxString &name, const wxChar *value)
virtual void SetProperty (const wxString &name, const wxString &value, const wxArrayString &choices)
virtual void SetProperty (const wxString &name, long value)
virtual void SetProperty (const wxString &name, int value)
virtual void SetProperty (const wxString &name, bool value)
virtual void SetProperty (const wxVariant &value)
virtual AxProperty GetProperty (const wxString &name) const
 Get a property.
virtual wxVariant GetPropertyValue (const wxString &name) const
 Get a property value variant.
virtual wxString GetPropertyString (const wxString &name) const
 Get a string property value.
virtual wxString GetPropertyString (const wxChar *name) const
virtual long GetPropertyLong (const wxString &name) const
 Get a long property value.
virtual double GetPropertyDouble (const wxString &name) const
 Get a double property value.
virtual long GetPropertyBool (const wxString &name) const
 Get a bool property value.
virtual bool HasProperty (const wxString &name) const
 Does this property exist?
virtual wxArrayString EnumerateProperties () const
 Get current properties - doesn't necessarily mean they're all supported.
virtual int GetPropertyCount () const
 Get property count.
virtual AxProperty GetProperty (size_t i) const
 Get property.
virtual AxPropertyGetPropertyPtr (size_t i) const
AxResourceArray & GetChildren ()
 Get resource children, if any.
const AxResourceArray & GetChildren () const
void ClearChildren ()
 Clear children.
void Clear ()
bool AddChild (AxResource *resource)
 Add child.
bool RemoveChild (AxResource *resource)
 Remove child.
size_t GetCount () const
 Get child count.
AxResourceGetChild (size_t i) const
 Get child.
bool GetLocalFile () const
 Get/set local file flag.
void SetLocalFile (bool mod)
virtual AxResourceFindByFilename (const wxString &filename) const
 Find by filename (look at this object, and children).

Protected Attributes

AxProperties m_properties
AxResourceArray m_children
bool m_localFile

Detailed Description

A resource can represent a tool, document, file, web site, etc.


Constructor & Destructor Documentation

AxResource::AxResource ( const AxResource resource  )  [inline]

AxResource::AxResource (  )  [inline]

AxResource::~AxResource (  ) 

AxResource class declaration A resource can represent a tool, document, file, web site, etc.


Member Function Documentation

void AxResource::Init (  ) 

Reimplemented from AxDocument.

Reimplemented in AxFileResource, AxAudioResource, and AxBookResource.

void AxResource::Copy ( const AxResource resource  ) 

Copy the basic resource information.

void AxResource::operator= ( const AxResource resource  )  [inline]

Assignment operator.

bool AxResource::Eq ( const AxResource resource  )  const

Test equality for the basic resource information.

virtual AxDocument* AxResource::Clone (  )  const [inline, virtual]

Clone - derived classes must implement this function.

Reimplemented from AxDocument.

Reimplemented in AxFileResource, AxAudioResource, and AxBookResource.

bool AxResource::Read ( wxDataStreamHelper helper  )  [virtual]

Read the data for this resource.

By default, this simply reads the properties and children. Override this function to read other data.

bool AxResource::ReadProperties ( wxDataStreamHelper helper  )  [virtual]

Read public properties, always the first part of the record.

bool AxResource::Write ( wxDataStreamHelper helper  )  [virtual]

Write the data for this resource.

By default, this simply writes the properties and children. Override this function to write other data.

bool AxResource::WriteProperties ( wxDataStreamHelper helper  )  [virtual]

Write public properties, always the first part of the record.

bool AxResource::ReadChildren ( wxDataStreamHelper helper  )  [virtual]

Read children.

bool AxResource::WriteChildren ( wxDataStreamHelper helper  )  [virtual]

Write children.

virtual void AxResource::SetFilename ( const wxString &  filename  )  [inline, virtual]

Set filename.

virtual wxString AxResource::GetFilename (  )  const [inline, virtual]

Get filename.

virtual wxString AxResource::GetLongDescription (  )  const [inline, virtual]

Get long description. Override to return a more complete description.

virtual wxString AxResource::GetShortDescription (  )  const [inline, virtual]

Get short description. Override to return a more complete description.

AxProperties& AxResource::GetProperties (  )  [inline]

Get properties.

void AxResource::SetProperty ( const AxProperty property  )  [virtual]

Set a property.

void AxResource::SetProperty ( const wxString &  name,
const wxString &  value 
) [virtual]

virtual void AxResource::SetProperty ( const wxString &  name,
const wxChar *  value 
) [inline, virtual]

void AxResource::SetProperty ( const wxString &  name,
const wxString &  value,
const wxArrayString &  choices 
) [virtual]

void AxResource::SetProperty ( const wxString &  name,
long  value 
) [virtual]

void AxResource::SetProperty ( const wxString &  name,
int  value 
) [virtual]

void AxResource::SetProperty ( const wxString &  name,
bool  value 
) [virtual]

void AxResource::SetProperty ( const wxVariant &  value  )  [virtual]

AxProperty AxResource::GetProperty ( const wxString &  name  )  const [virtual]

Get a property.

wxVariant AxResource::GetPropertyValue ( const wxString &  name  )  const [virtual]

Get a property value variant.

wxString AxResource::GetPropertyString ( const wxString &  name  )  const [virtual]

Get a string property value.

virtual wxString AxResource::GetPropertyString ( const wxChar *  name  )  const [inline, virtual]

long AxResource::GetPropertyLong ( const wxString &  name  )  const [virtual]

Get a long property value.

double AxResource::GetPropertyDouble ( const wxString &  name  )  const [virtual]

Get a double property value.

long AxResource::GetPropertyBool ( const wxString &  name  )  const [virtual]

Get a bool property value.

bool AxResource::HasProperty ( const wxString &  name  )  const [virtual]

Does this property exist?

wxArrayString AxResource::EnumerateProperties (  )  const [virtual]

Get current properties - doesn't necessarily mean they're all supported.

virtual int AxResource::GetPropertyCount (  )  const [inline, virtual]

Get property count.

AxProperty AxResource::GetProperty ( size_t  i  )  const [virtual]

Get property.

virtual AxProperty* AxResource::GetPropertyPtr ( size_t  i  )  const [inline, virtual]

AxResourceArray& AxResource::GetChildren (  )  [inline]

Get resource children, if any.

const AxResourceArray& AxResource::GetChildren (  )  const [inline]

void AxResource::ClearChildren (  ) 

Clear children.

void AxResource::Clear (  )  [inline]

bool AxResource::AddChild ( AxResource resource  ) 

Add child.

bool AxResource::RemoveChild ( AxResource resource  ) 

Remove child.

size_t AxResource::GetCount (  )  const [inline]

Get child count.

AxResource* AxResource::GetChild ( size_t  i  )  const [inline]

Get child.

bool AxResource::GetLocalFile (  )  const [inline]

Get/set local file flag.

void AxResource::SetLocalFile ( bool  mod  )  [inline]

AxResource * AxResource::FindByFilename ( const wxString &  filename  )  const [virtual]

Find by filename (look at this object, and children).


Member Data Documentation

AxProperties AxResource::m_properties [protected]

AxResourceArray AxResource::m_children [protected]

bool AxResource::m_localFile [protected]


The documentation for this class was generated from the following files:
Generated on Wed May 6 19:20:21 2009 for AxTk by  doxygen 1.5.1