11#ifndef __Pulsar_Interpreter_Extension_h
12#define __Pulsar_Interpreter_Extension_h
14#include "Pulsar/Interpreter.h"
18 class Interpreter::Extension :
public CommandParser {
22 enum Status { Good, Warn, Fail };
26 {
return interpreter->
get(); }
29 Archive* getmap (
const std::string& name)
30 {
return interpreter->getmap(name); }
32 std::vector<std::string> setup (
const std::string& text,
bool expand =
true)
33 {
return interpreter->setup (text, expand); }
36 template<
typename T> T setup (
const std::string& args)
37 {
return interpreter->setup<T> (args); }
40 template<
typename T> T setup (
const std::string& args, T default_value)
41 {
return interpreter->setup<T> (args, default_value); }
43 std::string response (Status s,
const std::string& text =
"")
44 {
return interpreter->response ((Interpreter::Status)s, text); }
46 std::string response (
const Error& error)
47 {
return interpreter->response (error); }
50 {
return interpreter->get_interface (); }
54 friend class Interpreter;
57 Reference::To<Interpreter, false> interpreter;
const ExtensionType * get() const
Template method searches for an Extension of the specified type.
Archive * get()
get the current Archive
Definition Interpreter.C:463
TextInterface::Parser * get_interface()
get the interface to the current archive
Definition Interpreter.C:835
Defines the PSRCHIVE library.
Definition CalSource.h:17