launching commands!

This commit is contained in:
Nicholas O'Connor
2017-03-23 21:20:26 -07:00
parent 325413f3f2
commit 1c91618f5c
13 changed files with 1781 additions and 4 deletions

View File

@@ -30,9 +30,6 @@ namespace cellar {
};
extern map<string, Bottle> get_bottles();
}
namespace commands {
extern map<string, cellar::commands::CommandFunction> bottles_commands();
}
}
#endif // __BOTTLES_HPP

View File

@@ -3,6 +3,13 @@
#define __INTERNAL_BOTTLES_HPP
#pragma once
#include <map>
#include <string>
#include "commands.hpp"
using namespace cellar::commands;
namespace cellar {
namespace bottles {
/*[[[cog
@@ -15,6 +22,9 @@ namespace cellar {
]]]*/
//[[[end]]]
}
namespace commands {
extern map<string, cellar::commands::CommandFunction> bottles_commands();
}
}
#endif // __INTERNAL_BOTTLES_HPP

View File

@@ -0,0 +1 @@
// dummy file

View File

@@ -0,0 +1,30 @@
// vim: filetype=cpp :
#ifndef __INTERNAL_LAUNCH_HPP
#define __INTERNAL_LAUNCH_HPP
#pragma once
#include <map>
#include <string>
#include "commands.hpp"
using namespace cellar::commands;
namespace cellar {
namespace launch {
/*[[[cog
import cog
with open("src/launch/commands.txt") as commandsfile:
for line in commandsfile:
item = line.strip().split(" ")
cog.outl("extern void {0} (int, vector<string>);".format(item[1]))
]]]*/
//[[[end]]]
}
namespace commands {
extern map<string,CommandFunction> launch_commands();
}
}
#endif // __INTERNAL_LAUNCH_HPP

16
include/launch.hpp Normal file
View File

@@ -0,0 +1,16 @@
#ifndef __LAUNCH_HPP
#define __LAUNCH_HPP
#pragma once
#include <string>
#include <vector>
using namespace std;
namespace cellar {
namespace launch {
extern void launch_program (vector<string>);
}
}
#endif // __LAUNCH_HPP

1622
include/subprocess.hpp Normal file

File diff suppressed because it is too large Load Diff