// $Source: /usr/local/SimSoft/SoftShop/Basics/Structur/SLNode.h,v $
// $Revision: 1.20 $
// $Author: baum $
// $Date: 2001/11/29 15:52:23 $
//
// Login name of the user who locked the revision
// $Locker:  $
// Tag name used to checkout the file
// $Name: Release-20 $
// State assigned to revision
// $State: Exp $
//
//
// $Log: SLNode.h,v $
// Revision 1.20  2001/11/29 15:52:23  baum
// -In Kalender.cpp und Kalender.h Handsteuerung eingebaut
//

#ifndef _SLNODE_H
#define _SLNODE_H

#include <stddef.h>
#include <iostream.h>

#if defined __GNUG__ || defined __hpux
#  pragma interface
#endif

//==================================================================
//		Klassen-Header
//		fuer class SLNode<T>
//==================================================================

//##ModelId=3FBCBCC40290
template <class T>
class SLNode
  {
  public:
    // constructors
	//##ModelId=3FBCBCC40292
    SLNode ();
	//##ModelId=3FBCBCC4029F
    SLNode (const SLNode<T>&);
	//##ModelId=3FBCBCC402A1
    SLNode (T*);
    
    // destructor
	//##ModelId=3FBCBCC402A3
    ~SLNode ();

    // assignment operators
	//##ModelId=3FBCBCC402AF
    const SLNode<T>& operator = (const SLNode<T>&);
	//##ModelId=3FBCBCC402B1
    const SLNode<T>& operator = (const T&);
	//##ModelId=3FBCBCC402B3
    const SLNode<T>& operator = (T*&);

    // handle SLNodes
	//##ModelId=3FBCBCC402C0
    SLNode<T>* link (SLNode<T>* after);

    // data members
	//##ModelId=3FBCBCC402CF
    SLNode<T>* Next;
	//##ModelId=3FBCBCC402D3
    T* Object;
};	// class SLNode

//==================================================================
//		Inline-Quellcode
//		fuer class SLNode<T>
//==================================================================

//##ModelId=3FBCBCC40292
template <class T>
inline SLNode<T>::SLNode () : Next (NULL), Object(NULL) { }

//##ModelId=3FBCBCC4029F
template <class T>
inline SLNode<T>::SLNode (const SLNode<T>& s) : Next (NULL), Object (s.Object) { }

//##ModelId=3FBCBCC402A1
template <class T>
inline SLNode<T>::SLNode (T* t) : Next (NULL), Object (t) { }

//##ModelId=3FBCBCC402A3
template <class T>
inline SLNode<T>::~SLNode () { }

//##ModelId=3FBCBCC402AF
template <class T>
inline const SLNode<T>& SLNode<T>::operator = (const SLNode<T>& s) { 
  Object = s.Object;
  return *this;
}

//##ModelId=3FBCBCC402B1
template <class T>
inline const SLNode<T>& SLNode<T>::operator = (const T& t) {
  Object = (T*) &t;
  return *this;
}

//##ModelId=3FBCBCC402B3
template <class T>
inline const SLNode<T>& SLNode<T>::operator = (T*& t) {
  Object = t;
  return *this;
}

//##ModelId=3FBCBCC402C0
template <class T>
inline SLNode<T>* SLNode<T>::link (SLNode<T>* after) {
  return after->Next = this;
}

#endif	// !defined _SLNODE_H
