~vbursian/research-assistant/intervers

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
47
48
////////////////////////////////////////////////////////////////////////////////
/*! @file NodeLocation.h   sNodeLocation class.
- Part of RANet - Research Assistant Net Library.
- Copyright(C) 1994-2020, Viktor E. Bursian, St.Petersburg, Russia.
                          VBursian@gmail.com
*///////////////////////////////////////////////////////////////////////////////
#ifndef NodeLocation_H
#define NodeLocation_H
#include "BasicNetClassPredeclarations.hpp"
#include "AttrName.h"
namespace RA {
//------------------------------------------------------------------------------

//ANNOUNCE_ABSTRACT_CLASS(sNodeLocation)
//(predeclared in BasicNetClassPredeclarations.hpp)

//------------------------------------------------------------ sNodeLocation ---
/*! Abstract base class for a reference to the physical storage place of a node.

It also declares (partially) a mechanism for allocation.
@sa sNodeLocation::LocationForAttr
*/
class RANet_EXPORT  sNodeLocation
{
  public:
    virtual                   ~sNodeLocation ()
                                {}
    virtual psNodeLocation    Replica () const =0;
    virtual psNodeLocation    LocationForAttr (rcsAttrName) const =0;
    virtual bool              operator == (pcsNodeLocation) const =0;

  public://fields
    psNet                     Net;

  protected:
    explicit                  sNodeLocation (psNet  net)
                                  :Net(net)
                                {}
  private:
                              sNodeLocation (rcsNodeLocation) {}
    rsNodeLocation            operator = (rcsNodeLocation) {return *this;}
};

//------------------------------------------------------------------------------
} //namespace RA
#endif