AndroMeta  2.0.0
AndroMeta/include/AndroMeta/MPackage.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009-2012 AndroMeta LLC. All rights reserved.
00003  *
00004  * AndroMeta LLC retains all intellectual property and proprietary 
00005  * rights to this software and related documentation and any modifications 
00006  * thereto.  Any use, reproduction, disclosure, or distribution of this 
00007  * software and related documentation without an express license agreement 
00008  * from AndroMeta LLC is strictly prohibited.
00009  * 
00010  */
00011 
00019 #ifndef ANDROMETA_M_PACKAGE_H
00020 #define ANDROMETA_M_PACKAGE_H
00021 
00022 #include <AndroMeta/MObject.h>
00023 
00024 namespace Meta{
00025   
00031   class MPackage : public MObjectBase{
00032   public:
00033     
00037     MPackage();
00038     
00042     MPackage(const mvar& v, RestoreOpt opt);
00043     
00047     MPackage(mnode n);
00048     
00052     MPackage(const MPackage& p);
00053     
00057     MPackage(int commandId, const mvar& args);
00058     
00062     ~MPackage();
00063     
00067     void store(mvar& v) const;
00068     
00076     bool addFiles(const mstr& path, const mstr& fileRegex=".*");
00077     
00081     bool addFile(const mstr& path);
00082     
00086     mvec files() const;
00087     
00093     bool unpack(const mstr& path);
00094     
00098     long size() const;
00099     
00109     int run(const mstr& runPath, const mvar& params, bool thread=true);
00110     
00111     MPackage& operator=(const MPackage& package);
00112     
00113   private:  
00114     class MPackage_* x_;
00115   };
00116   
00117 } // end namespace Meta
00118 
00119 #endif // ANDROMETA_M_PACKAGE_H