summaryrefslogtreecommitdiff
path: root/inc/NCollection_ListNode.hxx
blob: fd57bec06bf20f4faaaa2e1968b159eda86e6aca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// File:        NCollection_ListNode.hxx
// Created:     Wed Apr 17 10:45:17 2002
// Author:      Alexander KARTOMIN (akm)
//              <akm@matrox.nnov.matra-dtv.fr>

#ifndef NCollection_ListNode_HeaderFile
#define NCollection_ListNode_HeaderFile

#include <NCollection_BaseAllocator.hxx>

#ifdef WNT
// Disable the warning "operator new unmatched by delete"
#pragma warning (disable:4291)
#endif

/**
 * Purpose:     This class is used to  represent a node  in the BaseList and
 *              BaseMap. 
 */              
class NCollection_ListNode
{
 public:
  //! The only constructor
  NCollection_ListNode (NCollection_ListNode* theNext)
  { myNext = theNext; }

  //! Next pointer access
  NCollection_ListNode*& Next (void)
  { return myNext; }

  //! Next pointer const access
  NCollection_ListNode* Next (void) const
  { return myNext; }

 private:
  //! operator= - forbidden
  NCollection_ListNode& operator=(const NCollection_ListNode& )
  {return *this;}
  //! copy constructor - forbidden
  NCollection_ListNode (const NCollection_ListNode& ) {}

 private:
  NCollection_ListNode * myNext; //!< Pointer to the next node
};

#endif