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

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 & get () const
 Retrieve the structural element reference from the attribute.

bool bound () const
 Tell whether the reference to the structural element is valid or not (NULL).

void assign (const SetSlotAttribute &other)
 Update the reference in the Slot.

void 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 when the structural element is dynamic, i.e. requires a S.E. instance reference in all related Element instance objects.

See also:
SetSlotAttribute.


Member Function Documentation

SetSlotAttribute const SetSlotAttribute< S, true > &  other  ) 
 

Copy constructor.

This copy constructor creates an structural element reference by copying from the other attribute.

SetSlotAttribute const S &  other  ) 
 

Foreign copy constructor.

This copy constructor creates an 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.

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

Update the reference in the Slot.

This method updates the S.E. reference in the attribute with the reference given as argument.

void attach const S &  s  ) 
 

Update the reference in the Slot.

This method updates the S.E. reference in the attribute with the reference given as argument.


Generated on Sun Jul 18 14:30:58 2004 for Vaucanson by doxygen 1.3.7