~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
49
50
51
52
53
54
55
////////////////////////////////////////////////////////////////////////////////
/*! @file FileNode.h   Базовые типы терминальных объектов сети.
- Part of RANet - Research Assistant Net Library (based on ANSI C++).
- Copyright(C) 2016, Viktor E. Bursian, St.Petersburg, Russia.
                     Viktor.Bursian@mail.ioffe.ru
*///////////////////////////////////////////////////////////////////////////////
#ifndef FileNode_H
#define FileNode_H
#include "BasicNodes.h"
#include "Net.h"
#include "Files.h"
#include <QByteArray>
namespace RA {
//------------------------------------------------------------------------------

ANNOUNCE_CLASS(sFileNode)

//ANNOUNCE_CLASS(sUndoAssignValue2FileNode)

//---------------------------------------------------------------- sFileNode ---

class RANet_EXPORT  sFileNode : public sByteArrayNode
{
  STORABLE(sFileNode)

  public:
                              sFileNode ()
                                  :sByteArrayNode()
                                {}
                              sFileNode (const std::vector<byte> &  byte_array)
                                  :sByteArrayNode(byte_array)
                                {}
                              sFileNode (rcsPath);
    virtual sString           Text (eTextFormat        /*F=Plain*/
                                   ,eTextDetalization  /*D=Casual*/
                                   ); //!< visual representation for user
    virtual sPath             Path ();
    virtual void              AssignPath (rcsPath);
    virtual void              AssignPath (rcsString);

  protected:
    virtual void              CopyFrom (psNode);
    virtual bool              ImportFrom (sPath);
    virtual bool              ExportTo (sPath);

  private:
    sPath                     ThePath;

//  friend class sUndoAssignValue2FileNode;
};

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