|
AndroMeta
2.0.0
|
Used to package a set of files to be run by the peer-to-peer system. More...
#include <MPackage.h>
Public Member Functions | |
| MPackage () | |
| MPackage (const mvar &v, RestoreOpt opt) | |
| MPackage (mnode n) | |
| MPackage (const MPackage &p) | |
| MPackage (int commandId, const mvar &args) | |
| ~MPackage () | |
| void | store (mvar &v) const |
| bool | addFiles (const mstr &path, const mstr &fileRegex=".*") |
| bool | addFile (const mstr &path) |
| mvec | files () const |
| bool | unpack (const mstr &path) |
| long | size () const |
| int | run (const mstr &runPath, const mvar ¶ms, bool thread=true) |
| MPackage & | operator= (const MPackage &package) |
Used to package a set of files to be run by the peer-to-peer system.
Constructor.
| Meta::MPackage::MPackage | ( | const mvar & | v, |
| RestoreOpt | opt | ||
| ) |
Restore constructor.
Construct a package from a node.
| Meta::MPackage::MPackage | ( | const MPackage & | p | ) |
Copy constructor.
| Meta::MPackage::MPackage | ( | int | commandId, |
| const mvar & | args | ||
| ) |
Construct a package from a predefined AndroMeta command.
Destructor.
| bool Meta::MPackage::addFile | ( | const mstr & | path | ) |
Add all files in the specified path.
| bool Meta::MPackage::addFiles | ( | const mstr & | path, |
| const mstr & | fileRegex = ".*" |
||
| ) |
Selectively add files in the specified path matching regex.
| regex,e.g,: | "Makefile|.*\\.cpp|.*\\.h|.*\\.mml|metac\\.conf" |
| mvec Meta::MPackage::files | ( | ) | const |
| int Meta::MPackage::run | ( | const mstr & | runPath, |
| const mvar & | params, | ||
| bool | thread = true |
||
| ) |
Run an unpacked package in the specified path.
| params | A mapping of the command-line args. e.g: [x:1, type:"test"] |
| thread | true if this command should run in a separate thread. |
| long Meta::MPackage::size | ( | ) | const |
| void Meta::MPackage::store | ( | mvar & | v | ) | const [virtual] |
Store package to v.
Reimplemented from Meta::MObjectBase.
| bool Meta::MPackage::unpack | ( | const mstr & | path | ) |
Unpack to files into path.
1.7.6.1