20 #ifndef _GLIBCXX_VECTOR
27 #define gb_assert(cond) arb_assert(cond)
32 std::vector<GBL> content;
36 void insert(GBL smartie) { content.push_back(smartie); }
37 const char *
get(
int idx)
const {
gb_assert(idx<size());
return &*content[idx]; }
39 int size()
const {
return content.size(); }
40 bool empty()
const {
return content.empty(); }
42 void erase() { content.clear(); }
44 char *concatenated()
const;
55 bool is_defined()
const {
return identifier &&
function; }
64 bool operator()(
const char *s1,
const char *s2)
const {
69 typedef std::map<const char*,GBL_COMMAND,ccp_less> CmdMap;
78 CmdMap::const_iterator found = defined.find(identifier);
79 return found == defined.end() ?
NULp : found->second;
93 void warn_about_overwritten_commands(
const GBL_command_definition *custom_table,
unsigned custom_size)
const;
100 base_table(extending_this)
103 warn_about_overwritten_commands(custom_table, custom_size);
110 if (!cmd) cmd = base_table.
lookup(identifier);
122 char *default_tree_name;
129 default_tree_name(nulldup(treeName)),
145 virtual void track_field(
const char *fieldname) = 0;
205 #if defined(ASSERTION_USED)
215 const char *command_,
225 #if defined(ASSERTION_USED)
226 params_checked =
false;
246 const char *
get_optional_param(
int idx,
const char *defaultValue)
const {
return idx>=0 && idx<param.
size() ? param.
get(idx) : defaultValue; }
249 #if defined(ASSERTION_USED)
251 if (params_checked)
return false;
252 params_checked =
true;
259 #error gb_aci.h included twice
const GBL_streams & get_param_streams() const
virtual void track_field(const char *fieldname)=0
void useFieldTracker(FieldTracker *tracker_)
GBDATA * get_item_ref() const
GBL_COMMAND lookup_command(const char *identifier) const
GBL_env(GBDATA *gbMain, const char *treeName, const GBL_command_lookup_table &cmds=ACI_get_standard_commands())
GBL_custom_command_lookup_table(const GBL_command_definition *custom_table, unsigned custom_size, const GBL_command_lookup_table &extending_this, GBL_customization_mode cmode=DENY_SUBSTITUTION)
const char * get(int idx) const
GBDATA * get_gb_main() const
GBL_command_arguments(const GBL_call_env &cenv_, const char *command_, GBL_streams &input_, GBL_streams ¶m_, GBL_streams &output_)
int ARB_stricmp(const char *s1, const char *s2)
char * interpret_subcommand(const char *input, const char *command) const
const char * get_cmdName() const
const GBL_command_lookup_table & ACI_get_standard_commands()
const GBL_call_env & get_callEnv() const
const char * track_field_access(const char *fieldname) const
const char * get_optional_param(int idx, const char *defaultValue) const
const GBL_env & get_env() const
GBL_maybe_itemless_call_env(GBDATA *gb_main, GBDATA *gb_item)
GB_ERROR(* GBL_COMMAND)(GBL_command_arguments *args)
bool set_params_checked()
const GBL_env & get_env() const
const char * get_param(int idx) const
GBDATA * GB_get_root(GBDATA *gbd)
CONSTEXPR_INLINE_Cxx14 void swap(unsigned char &c1, unsigned char &c2)
typedef SmartMallocPtr(char) GBL
GBL get_param_smart(int idx) const
GBDATA * get_item_ref() const
GBL get_smart(int idx) const
static void copy(double **i, double **j)
virtual ~GBL_command_lookup_table()
~GBL_custom_command_lookup_table() OVERRIDE
virtual GBL_COMMAND lookup(const char *identifier) const
GBL_command_lookup_table(const GBL_command_definition *table, unsigned size)
GBL_COMMAND lookup(const char *identifier) const OVERRIDE
const char * get_treename() const
GBL_call_env(GBDATA *gbd, const GBL_env &env_)
void swap(GBL_streams &other)
const char * get_treename() const
NOT4PERL char * GB_command_interpreter_in_env(const char *str, const char *commands, const GBL_call_env &callEnv)
GBDATA * get_gb_main() const
const char * track_field_access(const char *fieldname) const
GBDATA * get_gb_main() const
GBL_simple_call_env(GBDATA *gb_item)
const char * get_treename() const