ALBA
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
albaVMEManager Class Reference

#include <albaVMEManager.h>

Inheritance diagram for albaVMEManager:
Inheritance graph
[legend]
Collaboration diagram for albaVMEManager:
Collaboration graph
[legend]

Public Member Functions

 albaVMEManager ()
 
 ~albaVMEManager ()
 
void SetListener (albaObserver *listener)
 
void OnEvent (albaEventBase *e)
 
void MSFNew ()
 
int MSFOpen (albaString filename)
 
int MSFOpen (int file_id)
 
const char * ZIPOpen (albaString filename)
 
void ZIPSave (albaString file="")
 
int MSFSave ()
 
int MSFSaveAs ()
 
bool MSFIsModified ()
 
void MSFModified (bool modified)
 
void VmeAdd (albaVME *n)
 
void VmeRemove (albaVME *n)
 
void TimeGetBounds (double *min, double *max)
 
void TimeSet (double time)
 
void NotifyRemove (albaVME *n)
 
void NotifyAdd (albaVME *n)
 
bool AskConfirmAndSave ()
 
void SetDirName (albaString dirname)
 
void SetFileName (albaString &filename)
 
void SetMsfFileExtension (albaString &extension)
 
albaStringGetFileName ()
 
void SetFileHistoryMenu (wxMenu *menu)
 
albaVMERootGetRoot ()
 
albaVMEStorageGetStorage ()
 
void SetApplicationStamp (albaString &appstamp)
 
void SetApplicationStamp (std::vector< albaString > appstamp)
 
void MakeBakFileOnSave (bool bakfile=true)
 
void RemoveTempDirectory ()
 
void SetSingleBinaryFile (bool singleFile)
 
void SetTestMode (bool testmode)
 
void IgnoreAppStamp (bool ignore)
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 

Protected Member Functions

bool MakeZip (const albaString &zipname, wxArrayString *files)
 
void AddCreationDate (albaVME *vme)
 

Protected Attributes

bool m_Modified
 
albaObserverm_Listener
 
wxConfigBase * m_Config
 
wxArchiveFSHandler * m_ZipHandler
 
wxFileSystem * m_FileSystem
 
albaGUIFileHistory m_FileHistory
 
int m_FileHistoryIdx
 
bool m_MakeBakFile
 
albaString m_MSFDir
 
std::vector< albaStringm_AppStamp
 
albaString m_MSFFile
 
albaString m_ZipFile
 
albaString m_TmpDir
 
albaString m_MsfFileExtension
 
bool m_LoadingFlag
 
bool m_Crypting
 
bool m_SingleBinaryFile
 
albaVMEStoragem_Storage
 
bool m_TestMode
 
bool m_IgnoreAppStamp
 

Friends

class albaVMEManagerTest
 

Detailed Description

albaVMEManager : Class managing VMEs inside a ALBA application.

This class is responsible for managing the VME in a ALBA application: It can add or remove VME to the current tree, add a new tree, load and save a tree from or to an msf (zmsf) file.

Definition at line 40 of file albaVMEManager.h.

Constructor & Destructor Documentation

◆ albaVMEManager()

albaVMEManager::albaVMEManager ( )

constructor

◆ ~albaVMEManager()

albaVMEManager::~albaVMEManager ( )

destructor

Member Function Documentation

◆ SetListener()

void albaVMEManager::SetListener ( albaObserver listener)
inline

Set the event receiver object.

Definition at line 51 of file albaVMEManager.h.

◆ OnEvent()

void albaVMEManager::OnEvent ( albaEventBase e)
virtual

Process events coming from other components.

Implements albaObserver.

◆ MSFNew()

void albaVMEManager::MSFNew ( )

Destroy all nodes (also the root), for each destroyed node the manager send an event VME_REMOVING, then search the root and select it.

◆ MSFOpen() [1/2]

int albaVMEManager::MSFOpen ( albaString  filename)

Open the msf filename.

◆ MSFOpen() [2/2]

int albaVMEManager::MSFOpen ( int  file_id)

Open the msf from file history.

◆ ZIPOpen()

const char * albaVMEManager::ZIPOpen ( albaString  filename)

Open the compressed zmsf filename.

◆ ZIPSave()

void albaVMEManager::ZIPSave ( albaString  file = "")

Save the msf tree into a compressed file.

◆ MSFSave()

int albaVMEManager::MSFSave ( )

Save the msf tree.

◆ MSFSaveAs()

int albaVMEManager::MSFSaveAs ( )

Save the msf tree with different filename.

◆ MSFIsModified()

bool albaVMEManager::MSFIsModified ( )
inline

Return true if the tree has been modifyed.

Definition at line 79 of file albaVMEManager.h.

◆ MSFModified()

void albaVMEManager::MSFModified ( bool  modified)
inline

Set the modify flag.

Definition at line 82 of file albaVMEManager.h.

◆ VmeAdd()

void albaVMEManager::VmeAdd ( albaVME n)

Add the vme to the tree.

◆ VmeRemove()

void albaVMEManager::VmeRemove ( albaVME n)

Remove the vme from the tree.

◆ TimeGetBounds()

void albaVMEManager::TimeGetBounds ( double *  min,
double *  max 
)

Get the time bounds of the tree.

◆ TimeSet()

void albaVMEManager::TimeSet ( double  time)

Set the time for the tree.

◆ NotifyRemove()

void albaVMEManager::NotifyRemove ( albaVME n)

Send the event VME_REMOVING to inform logic that the vme and its subtree are removed from the tree.

◆ NotifyAdd()

void albaVMEManager::NotifyAdd ( albaVME n)

Send the event VME_ADDED to inform logic that the vme and its subtree are added to the tree.

◆ AskConfirmAndSave()

bool albaVMEManager::AskConfirmAndSave ( )

Show the dialog to confirm the save of the current tree.

◆ SetDirName()

void albaVMEManager::SetDirName ( albaString  dirname)
inline

Set the filename for the current tree.

Definition at line 106 of file albaVMEManager.h.

◆ SetFileName()

void albaVMEManager::SetFileName ( albaString filename)
inline

Set the filename for the current tree.

Definition at line 109 of file albaVMEManager.h.

◆ SetMsfFileExtension()

void albaVMEManager::SetMsfFileExtension ( albaString extension)
inline

Set the file extension.

Definition at line 112 of file albaVMEManager.h.

◆ GetFileName()

albaString & albaVMEManager::GetFileName ( )
inline

Get the filename of the current tree.

Definition at line 115 of file albaVMEManager.h.

◆ SetFileHistoryMenu()

void albaVMEManager::SetFileHistoryMenu ( wxMenu *  menu)

Link to the main men the file history manager.

◆ GetRoot()

albaVMERoot * albaVMEManager::GetRoot ( )

Return the tree's root.

◆ GetStorage()

albaVMEStorage * albaVMEManager::GetStorage ( )

Return the storage associated to the current tree.

◆ SetApplicationStamp() [1/2]

void albaVMEManager::SetApplicationStamp ( albaString appstamp)

Set the application stamp; this is the mark of the specific vertical application (is always equal to the application name).

◆ SetApplicationStamp() [2/2]

void albaVMEManager::SetApplicationStamp ( std::vector< albaString appstamp)

Set other application stamps for compatibility with similar applications (the application stamp itself is already present).

◆ MakeBakFileOnSave()

void albaVMEManager::MakeBakFileOnSave ( bool  bakfile = true)
inline

Set the flag for bak file generation on saving MSF file.

Definition at line 133 of file albaVMEManager.h.

◆ RemoveTempDirectory()

void albaVMEManager::RemoveTempDirectory ( )

Remove temporary directory used for compressed msf files.

◆ SetSingleBinaryFile()

void albaVMEManager::SetSingleBinaryFile ( bool  singleFile)

Set the flag for saving binary files associated to time varying VMEs.

◆ SetTestMode()

void albaVMEManager::SetTestMode ( bool  testmode)
inline

Set the flag for test mode without GUI.

Definition at line 142 of file albaVMEManager.h.

◆ IgnoreAppStamp()

void albaVMEManager::IgnoreAppStamp ( bool  ignore)
inline

Set the flag for attive controll in Open Alba Project.

Definition at line 145 of file albaVMEManager.h.

◆ MakeZip()

bool albaVMEManager::MakeZip ( const albaString zipname,
wxArrayString *  files 
)
protected

Create a compressed msf file: zmsf.

◆ AddCreationDate()

void albaVMEManager::AddCreationDate ( albaVME vme)
protected

Set tag with creation date for the node passed as argument.

Friends And Related Function Documentation

◆ albaVMEManagerTest

friend class albaVMEManagerTest
friend

Flag used to Open Alba Project File with appStamp verification.

friend test class

Definition at line 179 of file albaVMEManager.h.

Member Data Documentation

◆ m_Modified

bool albaVMEManager::m_Modified
protected

Used to known when the tree has been modified...

Definition at line 154 of file albaVMEManager.h.

◆ m_Listener

albaObserver* albaVMEManager::m_Listener
protected

Register the event receiver object.

Definition at line 156 of file albaVMEManager.h.

◆ m_Config

wxConfigBase* albaVMEManager::m_Config
protected

Application configuration for file history management.

Definition at line 157 of file albaVMEManager.h.

◆ m_ZipHandler

wxArchiveFSHandler* albaVMEManager::m_ZipHandler
protected

Handler for zip archive (used to open zmsf files)

Definition at line 158 of file albaVMEManager.h.

◆ m_FileSystem

wxFileSystem* albaVMEManager::m_FileSystem
protected

File system manager.

Definition at line 159 of file albaVMEManager.h.

◆ m_FileHistory

albaGUIFileHistory albaVMEManager::m_FileHistory
protected

Used to hold recently opened files.

Definition at line 160 of file albaVMEManager.h.

◆ m_FileHistoryIdx

int albaVMEManager::m_FileHistoryIdx
protected

Identifier of the file to open.

Definition at line 161 of file albaVMEManager.h.

◆ m_MakeBakFile

bool albaVMEManager::m_MakeBakFile
protected

Flag used to create or not the backup file of the saved msf.

Definition at line 163 of file albaVMEManager.h.

◆ m_MSFDir

albaString albaVMEManager::m_MSFDir
protected

Directory name in which is present the msf file.

Definition at line 164 of file albaVMEManager.h.

◆ m_AppStamp

std::vector<albaString> albaVMEManager::m_AppStamp
protected

Application stamps for our application.

Definition at line 165 of file albaVMEManager.h.

◆ m_MSFFile

albaString albaVMEManager::m_MSFFile
protected

File name of the data associated to the tree.

Definition at line 166 of file albaVMEManager.h.

◆ m_ZipFile

albaString albaVMEManager::m_ZipFile
protected

File name of compressed archive in which save the data associated to the tree.

Definition at line 167 of file albaVMEManager.h.

◆ m_TmpDir

albaString albaVMEManager::m_TmpDir
protected

Temporary directory for zmsf extraction.

Definition at line 168 of file albaVMEManager.h.

◆ m_MsfFileExtension

albaString albaVMEManager::m_MsfFileExtension
protected

File extension.

Definition at line 169 of file albaVMEManager.h.

◆ m_LoadingFlag

bool albaVMEManager::m_LoadingFlag
protected

used when an MSF is being loaded

Definition at line 171 of file albaVMEManager.h.

◆ m_Crypting

bool albaVMEManager::m_Crypting
protected

used to enable the Encryption for the MSF

Definition at line 172 of file albaVMEManager.h.

◆ m_SingleBinaryFile

bool albaVMEManager::m_SingleBinaryFile
protected

used to store binary files associated to time varying VMEs as multiple files or not.

Definition at line 173 of file albaVMEManager.h.

◆ m_Storage

albaVMEStorage* albaVMEManager::m_Storage
protected

Associated storage.

Definition at line 174 of file albaVMEManager.h.

◆ m_TestMode

bool albaVMEManager::m_TestMode
protected

set true for test mode without GUI

Definition at line 175 of file albaVMEManager.h.

◆ m_IgnoreAppStamp

bool albaVMEManager::m_IgnoreAppStamp
protected

Definition at line 177 of file albaVMEManager.h.


The documentation for this class was generated from the following file: