[ Lit Window Library at SourceForge[ Lit Window Productions Homepage ]  [ wxWidgets Tips&Tricks ]  [  wxVisualSetup ]

Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

accessor Class Reference
[Data adapters]

Objects of this class allow read-write access to a single property. More...

Inheritance diagram for accessor:

Inheritance graph
[legend]
Collaboration diagram for accessor:

Collaboration graph
[legend]
List of all members.

Public Types

typedef litwindow::aggregate aggregate_type
typedef litwindow::container container_type

Public Member Functions

 accessor (void *aThisPtr, prop_t type)
 accessor (void *aThisPtr, const schema_entry &e)
 accessor (void *aThisPtr, const schema_base::const_iterator &aThisInfo)
 accessor ()
void assign (const const_accessor &a)
 copy the object pointed to by a to this.
accessor clone () const
 clone this object.
void from_accessor (const const_accessor &a) const
 copy the object pointed to by a to this
void from_int (int value) const
 assign an 'int' value to the object.
size_t from_string (const propString &value) const
 assign the object a new value from a string representation
aggregate get_aggregate () const
 get an aggregate accessor for this object.
container get_container () const
 get a container accessor for this object.
prop_ptr get_member_ptr () const
void * get_this_ptr () const

Detailed Description

This class is effectively a generic member pointer to a variable of an object. It can point to any property of any class and implements the most common used methods from_string and FromBinary. to_string and ToBinary are inhertied from const_accessor.


Member Typedef Documentation

typedef litwindow::aggregate aggregate_type
 

Reimplemented from const_accessor.

typedef litwindow::container container_type
 

Reimplemented from const_accessor.


Constructor & Destructor Documentation

accessor  ) 
 

accessor void *  aThisPtr,
const schema_base::const_iterator &  aThisInfo
 

accessor void *  aThisPtr,
const schema_entry &  e
 

accessor void *  aThisPtr,
prop_t  type
 


Member Function Documentation

void assign const const_accessor a  ) 
 

same as from_accessor

accessor clone  )  const
 

Creates a new object on the heap, copy the value of this object to it and returns an accessor to the new object.

Returns:
an accessor to the cloned object
Note:
Call accessor::destroy when you no longer need the clone.

Reimplemented from const_accessor.

void from_accessor const const_accessor a  )  const
 

void from_int int  value  )  const
 

size_t from_string const propString &  value  )  const
 

container get_container  )  const
 

Reimplemented from const_accessor.

prop_ptr get_member_ptr  )  const
 

Reimplemented from const_accessor.

void* get_this_ptr  )  const
 

Reimplemented from const_accessor.


Copyright 2004, Hajo Kirchhoff, Lit Window Productions