ALBA
albaVMEStorage.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaVMEStorage
5 Authors: Marco Petrone
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16#ifndef __albaVMEStorage_h__
17#define __albaVMEStorage_h__
18
19#include "albaXMLStorage.h"
20#include "albaObserver.h"
21#include "albaEventSender.h"
22#include "albaUtility.h"
23#include "albaStorable.h"
24
25//----------------------------------------------------------------------------
26// forward declarations :
27//----------------------------------------------------------------------------
28class albaVMERoot;
29
32{
33public:
34 mmuMSFDocument(albaVMERoot *root=NULL):m_Root(root) {}
35 virtual ~mmuMSFDocument() {}
38protected:
40};
41
48class ALBA_EXPORT albaVMEStorage: public albaXMLStorage, public albaObserver, public albaEventSender
49{
50public:
51 ALBA_ID_DEC(MSF_FILENAME_CHANGED);
53
55 virtual ~albaVMEStorage();
56
59
63 void SetRoot (albaVMERoot *root);
64
65 virtual void SetURL(const char *name);
66
68 virtual void OnEvent(albaEventBase *e);
69
70protected:
72 void SetFileType(const char *filetype) {Superclass::SetFileType(filetype);}
73
75 void SetVersion(const char *version) {Superclass::SetVersion(version);}
76
78};
79#endif // _albaVMEStorage_h_
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
class acting as an interface for objects using ALBA hierarchical event communication model This objec...
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
albaStorable is an interface for serializable objects.
Definition: albaStorable.h:41
Abstract class representing the interface for the unit of information stored in the storage.
albaUtility - the pourpose of this class is just to groups utilities classes
Definition: albaUtility.h:27
albaVMERoot - a VME is the root of a tree of VME nodes.
Definition: albaVMERoot.h:35
A storage class for MSF local files.
virtual ~albaVMEStorage()
virtual void OnEvent(albaEventBase *e)
process events coming from tree
albaVMERoot * GetRoot()
return the root node attached to this tree
ALBA_ID_DEC(MSF_FILENAME_CHANGED)
void SetFileType(const char *filetype)
Do not allow changing the file type from external objects.
void SetVersion(const char *version)
Do not allow changing the file version from external objects.
albaTypeMacro(albaVMEStorage, albaXMLStorage) albaVMEStorage()
albaVMERoot * m_Root
the VME root node
virtual void SetURL(const char *name)
Set the URL of the document to be read or written.
void SetRoot(albaVMERoot *root)
Set the root to this Storage.
Concrete implementation of Storage object using Xerces-C for storing in XML.
utility class representing the MSF document.
mmuMSFDocument(albaVMERoot *root=NULL)
virtual int InternalRestore(albaStorageElement *node)
This is called by Restore() and must be reimplemented by subclasses The element from which the object...
albaVMERoot * m_Root
virtual ~mmuMSFDocument()
virtual int InternalStore(albaStorageElement *node)
This is called by Store() and must be reimplemented by subclasses.