Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members  

SubTree.h

Go to the documentation of this file.
00001 // Emacs -*- C++ -*-
00002 #ifndef ANAPHE_SUBTREE
00003 #define ANAPHE_SUBTREE 1
00004 
00005 #include <string>
00006 #include <map>
00007 #include <list>
00008 #include <vector>
00009 
00010 #include "AIDA/IManagedObject.h"
00011 
00012 // type ahead declarations 
00013 namespace AIDA {
00014   class ITree;
00015 
00016   namespace Dev {
00017     class IDevTree;
00018     class IStore;
00019   }
00020 }
00021 
00022 
00023 namespace Anaphe {
00024   namespace AIDA_Tree_native {
00025     class MountInfo;
00026 
00028 
00029 class SubTree {
00030 
00031 public:
00033   SubTree( const std::string& name,
00034            AIDA::Dev::IDevTree* );
00036   ~SubTree();
00038   bool add( AIDA::IManagedObject * object,
00039             std::list< std::string >& path,
00040             bool overWrite,
00041             std::map< const AIDA::IManagedObject*, std::string >& objectMap,
00042             bool copy,
00043             bool writeInStore = true );
00045   AIDA::IManagedObject* find( std::list< std::string >& path,
00046                               std::map< const AIDA::IManagedObject*, std::string >& objectMap );
00047   AIDA::IManagedObject* findAndErase( std::list< std::string >& path );
00049   AIDA::Dev::IStore* store( std::list< std::string >& path );
00051   bool existsDirectory( std::list< std::string >& path );
00053   bool mkdir( std::list< std::string >& path );
00054   bool mkdirs( std::list< std::string >& path );
00056   bool rmdir( std::list< std::string >& path );
00058   bool rm( std::list< std::string >& path,
00059            std::map< const AIDA::IManagedObject*, std::string >& objectMap );
00061   bool symlink( const std::string& path,
00062                 std::list< std::string >& alias );
00064   bool mount( const std::string & path,
00065               AIDA::Dev::IDevTree* tree,
00066               std::list< std::string >& treePath,
00067               std::map< AIDA::Dev::IDevTree*, Anaphe::AIDA_Tree_native::MountInfo* >& mountPoints );
00069   bool unmount( std::list< std::string >& path,
00070                 std::map< AIDA::Dev::IDevTree*, Anaphe::AIDA_Tree_native::MountInfo* >& mountPoints );
00072   std::vector< std::string > listObjectNames( std::list< std::string >& path,
00073                                               bool recursive ) const;
00075   std::vector< std::string > listObjectTypes( std::list< std::string >& path,
00076                                               bool recursive ) const;
00077 
00078 private:
00080   std::string                                                    m_name;
00082   AIDA::Dev::IDevTree*                                           m_masterTree;
00084   Anaphe::AIDA_Tree_native::MountInfo*                                             m_mountInfo;
00086   std::map< std::string, SubTree* >                              m_subTrees;
00088   std::map< std::string, AIDA::IManagedObject* >                 m_objects;
00090   std::map< std::string, std::string >                           m_links;
00091 
00092   // Forbidden : copy constructor and assignment operator
00093   SubTree( const SubTree& );
00094   SubTree& operator=( const SubTree& );
00095 };
00096 
00097   }
00098 }
00099 
00100 #endif /* ifndef ANAPHE_SUBTREE */

Generated on Tue Feb 18 17:51:15 2003 for AIDA_Tree_native by doxygen1.2.16