SetSlotAttribute< S, true > Struct Template Reference
[Fundamental C++: the Element design pattern.]

Base class for SetSlot, specializing SetSlotAttribute. More...

List of all members.

Public Member Functions

 SetSlotAttribute ()
 Default constructor. Initialize with a NULL reference.
 SetSlotAttribute (const SetSlotAttribute &other)
 Copy constructor.
 SetSlotAttribute (const S &other)
 Foreign copy constructor.
const S & _structure_get () const
 Retrieve the structural element reference from the attribute.
bool _structure_bound () const
 Whether the reference to the structural element is valid or not (NULL).
void _structure_assign (const SetSlotAttribute &other)
 Update the reference in the Slot.
void _structure_attach (const S &s)
 Update the reference in the Slot.

Protected Attributes

const S * s_
 The actual reference to a structural element.


Detailed Description

template<typename S>
struct vcsn::SetSlotAttribute< S, true >

Base class for SetSlot, specializing SetSlotAttribute.

This class is a specialization of SetSlotAttribute used when the structural element is dynamic, i.e. requires a S.E. instance reference in all related Element instance objects.

See also:
SetSlotAttribute.

Definition at line 115 of file slots.hh.


Constructor & Destructor Documentation

SetSlotAttribute const SetSlotAttribute< S, true > &  other  ) 
 

Copy constructor.

Create a structural element reference by copying from the other attribute.

Definition at line 73 of file slots.hxx.

SetSlotAttribute const S &  other  ) 
 

Foreign copy constructor.

Create a structural element reference by copying from a reference to a S.E. instance defined elsewhere.

Bug:
For a number of reasons (see the mailing list), this constructor creates a fresh copy on the heap which is never deallocated.
Bug:
Make a better self-contained description of the bug.

Definition at line 78 of file slots.hxx.


Member Function Documentation

void _structure_assign const SetSlotAttribute< S, true > &  other  ) 
 

Update the reference in the Slot.

Update the S.E. reference in the attribute with the reference given as argument.

Definition at line 89 of file slots.hxx.

void _structure_attach const S &  s  ) 
 

Update the reference in the Slot.

Update the S.E. reference in the attribute with the reference given as argument.

Definition at line 95 of file slots.hxx.

References utility::unique::get(), and precondition.


Generated on Fri Jul 28 12:34:42 2006 for Vaucanson by  doxygen 1.4.6