ARB
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
adlang1.cxx File Reference
#include "gb_aci_impl.h"
#include "gb_key.h"
#include "TreeNode.h"
#include <aw_awar_defs.hxx>
#include <adGene.h>
#include <ad_cb.h>
#include <arb_defs.h>
#include <arb_strbuf.h>
#include <arb_file.h>
#include <arb_strarray.h>
#include <arb_sort.h>
#include <cctype>
#include <cmath>
#include <algorithm>
Include dependency graph for adlang1.cxx:

Go to the source code of this file.

Classes

class  DefinedCommands
 
class  Tab
 
struct  binop_pair
 
struct  cached_taxonomy
 
struct  common_filter_params
 
struct  diff_params
 
struct  filter_params
 

Namespaces

 GBL_IMPL
 

Macros

#define GROUP_COUNT_CHARS   6
 
#define BITS_PER_HEXCHAR   4
 
#define MAX_GROUPS   (1 << (GROUP_COUNT_CHARS*BITS_PER_HEXCHAR))
 
#define GBL_COMMON_FILTER_PARAMS
 

Typedefs

typedef char *(* filter_fun )(const char *seq, const char *filter, size_t flen, void *param)
 

Enumerations

enum  Case { UPPER, LOWER, CAPS }
 
enum  GBT_ITEM_TYPE { GBT_ITEM_UNKNOWN, GBT_ITEM_SPECIES, GBT_ITEM_GENE }
 
enum  filter_function { FP_FILTER, FP_MODIFY }
 

Functions

NOT4PERL void GB_set_export_sequence_hook (gb_export_sequence_cb escb)
 
void GBL_IMPL::print_trace (const char *text)
 
GB_ERROR GBL_IMPL::trace_params (const GBL_streams &param, gbl_param *ppara, const char *com)
 
static int gbl_stricmp (const char *s1, const char *s2)
 
static int gbl_strincmp (const char *s1, const char *s2, int size2)
 
static const chargbl_stristr (const char *haystack, const char *needle)
 
int approve_pos (int pos, int len)
 
static GB_ERROR gbl_mid_streams (const GBL_streams &arg_input, GBL_streams &arg_out, int start, int end)
 
static GB_ERROR gbl_trace (GBL_command_arguments *args)
 
template<typename T >
GB_ERROR gbl_apply_binary_operator (GBL_command_arguments *args, char *(*op)(const char *, const char *, T), T client_data)
 
static charunEscapeString (const char *escapedString)
 
static charescapeString (const char *unescapedString)
 
static GB_ERROR gbl_quote (GBL_command_arguments *args)
 
static GB_ERROR gbl_unquote (GBL_command_arguments *args)
 
static GB_ERROR gbl_escape (GBL_command_arguments *args)
 
static GB_ERROR gbl_unescape (GBL_command_arguments *args)
 
static GB_ERROR gbl_command (GBL_command_arguments *args)
 
static GB_ERROR gbl_eval (GBL_command_arguments *args)
 
static GB_ERROR gbl_define (GBL_command_arguments *args)
 
static GB_ERROR gbl_do (GBL_command_arguments *args)
 
static GB_ERROR gbl_streams (GBL_command_arguments *args)
 
static GB_ERROR expect_used_in_genome_db (GBL_command_arguments *args)
 
static GB_ERROR apply_to_origin (GBL_command_arguments *args, bool organism)
 
static GB_ERROR gbl_origin_gene (GBL_command_arguments *args)
 
static GB_ERROR gbl_origin_organism (GBL_command_arguments *args)
 
static GB_ERROR applyToItemFoundByKey (GBL_command_arguments *args, const char *itemname, GBDATA *gb_item_data, const char *key)
 
static GB_ERROR gbl_findspec (GBL_command_arguments *args)
 
static GB_ERROR gbl_findacc (GBL_command_arguments *args)
 
static GB_ERROR gbl_findgene (GBL_command_arguments *args)
 
GB_ERROR count_by_tab (GBL_command_arguments *args, const Tab &tab)
 
GB_ERROR remove_by_tab (GBL_command_arguments *args, const Tab &tab)
 
static GB_ERROR gbl_count (GBL_command_arguments *args)
 
static GB_ERROR gbl_len (GBL_command_arguments *args)
 
static GB_ERROR gbl_remove (GBL_command_arguments *args)
 
static GB_ERROR gbl_keep (GBL_command_arguments *args)
 
static charbinop_compare (const char *arg1, const char *arg2, bool case_sensitive)
 
static charbinop_equals (const char *arg1, const char *arg2, bool case_sensitive)
 
static charbinop_contains (const char *arg1, const char *arg2, bool case_sensitive)
 
static charbinop_partof (const char *arg1, const char *arg2, bool case_sensitive)
 
static GB_ERROR gbl_compare (GBL_command_arguments *args)
 
static GB_ERROR gbl_icompare (GBL_command_arguments *args)
 
static GB_ERROR gbl_equals (GBL_command_arguments *args)
 
static GB_ERROR gbl_iequals (GBL_command_arguments *args)
 
static GB_ERROR gbl_contains (GBL_command_arguments *args)
 
static GB_ERROR gbl_icontains (GBL_command_arguments *args)
 
static GB_ERROR gbl_partof (GBL_command_arguments *args)
 
static GB_ERROR gbl_ipartof (GBL_command_arguments *args)
 
static GB_ERROR gbl_isEmpty (GBL_command_arguments *args)
 
static GB_ERROR gbl_inRange (GBL_command_arguments *args)
 
static GB_ERROR gbl_translate (GBL_command_arguments *args)
 
static GB_ERROR gbl_echo (GBL_command_arguments *args)
 
static GB_ERROR gbl_dd (GBL_command_arguments *args)
 
static GB_ERROR convert_case (GBL_command_arguments *args, Case convTo)
 
static GB_ERROR gbl_caps (GBL_command_arguments *args)
 
static GB_ERROR gbl_upper (GBL_command_arguments *args)
 
static GB_ERROR gbl_lower (GBL_command_arguments *args)
 
static GB_ERROR gbl_head (GBL_command_arguments *args)
 
static GB_ERROR gbl_tail (GBL_command_arguments *args)
 
GB_ERROR mid (GBL_command_arguments *args, int start_index)
 
static GB_ERROR gbl_mid0 (GBL_command_arguments *args)
 
static GB_ERROR gbl_mid (GBL_command_arguments *args)
 
static GB_ERROR tab (GBL_command_arguments *args, bool pretab)
 
static GB_ERROR gbl_tab (GBL_command_arguments *args)
 
static GB_ERROR gbl_pretab (GBL_command_arguments *args)
 
static GB_ERROR gbl_crop (GBL_command_arguments *args)
 
static GB_ERROR gbl_cut (GBL_command_arguments *args)
 
static GB_ERROR gbl_drop (GBL_command_arguments *args)
 
static GB_ERROR gbl_dropempty (GBL_command_arguments *args)
 
static GB_ERROR gbl_dropzero (GBL_command_arguments *args)
 
static GB_ERROR gbl_swap (GBL_command_arguments *args)
 
static GB_ERROR backfront_stream (GBL_command_arguments *args, int toback)
 
static GB_ERROR gbl_toback (GBL_command_arguments *args)
 
static GB_ERROR gbl_tofront (GBL_command_arguments *args)
 
static GB_ERROR gbl_merge (GBL_command_arguments *args)
 
static GB_ERROR gbl_split (GBL_command_arguments *args)
 
static GB_ERROR gbl_colsplit (GBL_command_arguments *args)
 
static chardo_extract_words (const char *source, const char *chars, float minlen, bool sort_output)
 
static GB_ERROR gbl_extract_words (GBL_command_arguments *args)
 
static GB_ERROR gbl_extract_sequence (GBL_command_arguments *args)
 
static GB_ERROR gbl_checksum (GBL_command_arguments *args)
 
static GB_ERROR gbl_gcgchecksum (GBL_command_arguments *args)
 
static GB_ERROR gbl_srt (GBL_command_arguments *args)
 
static charapply_numeric_binop (const char *arg1, const char *arg2, int(*num_bin_op)(int, int))
 
static charapply_double_binop (const char *arg1, const char *arg2, double(*num_bin_op)(double, double))
 
static charapply_auto_numeric_binop (const char *arg1, const char *arg2, binop_pair multiop)
 
template<typename T >
static T binop_plus (T v1, T v2)
 
template<typename T >
static T binop_minus (T v1, T v2)
 
template<typename T >
static T binop_mult (T v1, T v2)
 
template<typename T >
static T binop_div (T v1, T v2)
 
template<typename T >
static T binop_per_cent (T v1, T v2)
 
static int binop_rest (int i1, int i2)
 
static GB_ERROR gbl_plus (GBL_command_arguments *args)
 
static GB_ERROR gbl_fplus (GBL_command_arguments *args)
 
static GB_ERROR gbl_minus (GBL_command_arguments *args)
 
static GB_ERROR gbl_fminus (GBL_command_arguments *args)
 
static GB_ERROR gbl_mult (GBL_command_arguments *args)
 
static GB_ERROR gbl_fmult (GBL_command_arguments *args)
 
static GB_ERROR gbl_div (GBL_command_arguments *args)
 
static GB_ERROR gbl_fdiv (GBL_command_arguments *args)
 
static GB_ERROR gbl_rest (GBL_command_arguments *args)
 
static GB_ERROR gbl_per_cent (GBL_command_arguments *args)
 
static GB_ERROR gbl_fper_cent (GBL_command_arguments *args)
 
template<typename T >
static T binop_isAbove (T i1, T i2)
 
template<typename T >
static T binop_isBelow (T i1, T i2)
 
template<typename T >
static T binop_isEqual (T i1, T i2)
 
static GB_ERROR gbl_isAbove (GBL_command_arguments *args)
 
static GB_ERROR gbl_isBelow (GBL_command_arguments *args)
 
static GB_ERROR gbl_isEqual (GBL_command_arguments *args)
 
double float_shift_factor (int digits)
 
static GB_ERROR gbl_round (GBL_command_arguments *args)
 
static GB_ERROR gbl_not (GBL_command_arguments *args)
 
static GB_ERROR gbl_and (GBL_command_arguments *args)
 
static GB_ERROR gbl_or (GBL_command_arguments *args)
 
static GB_ERROR gbl_select (GBL_command_arguments *args)
 
static GB_ERROR gbl_readdb (GBL_command_arguments *args)
 
static GBT_ITEM_TYPE identify_gb_item (GBDATA *gb_item)
 
static void free_cached_taxonomy (cached_taxonomy *ct)
 
static void build_taxonomy_rek (TreeNode *node, GB_HASH *tax_hash, const char *parent_group, int *group_counter)
 
static bool is_cached_taxonomy (const char *, long val, void *cl_ct)
 
static const chartree_of_cached_taxonomy (cached_taxonomy *ct)
 
static void flush_taxonomy_cb (GBDATA *gbd, cached_taxonomy *ct)
 
static void flush_taxonomy_if_new_group_cb (GBDATA *gb_tree, cached_taxonomy *ct)
 
static cached_taxonomyget_cached_taxonomy (GBDATA *gb_main, const char *tree_name, GB_ERROR *error)
 
static charget_taxonomy_string (GB_HASH *tax_hash, const char *group_key, int depth, GB_ERROR *error)
 
static const charget_taxonomy (GBDATA *gb_species_or_group, const char *tree_name, bool is_current_tree, int depth, GB_ERROR *error)
 
static GB_ERROR gbl_taxonomy (GBL_command_arguments *args)
 
static GB_ERROR gbl_sequence (GBL_command_arguments *args)
 
static GB_ERROR gbl_export_sequence (GBL_command_arguments *args)
 
static GB_ERROR gbl_ali_name (GBL_command_arguments *args)
 
static GB_ERROR gbl_sequence_type (GBL_command_arguments *args)
 
static GB_ERROR format (GBL_command_arguments *args, bool simple_format)
 
static GB_ERROR gbl_format (GBL_command_arguments *args)
 
static GB_ERROR gbl_format_sequence (GBL_command_arguments *args)
 
static chargbl_read_seq_sai_or_species (GBDATA *gb_main, const char *species, const char *sai, const char *ali, size_t *seqLen)
 
static GB_ERROR apply_filters (GBL_command_arguments *args, common_filter_params *common, filter_fun filter_one, void *param)
 
static charcalc_diff (const char *seq, const char *filter, size_t, void *paramP)
 
static GB_ERROR gbl_diff (GBL_command_arguments *args)
 
static charfilter_seq (const char *seq, const char *filter, size_t flen, void *paramP)
 
static GB_ERROR gbl_filter (GBL_command_arguments *args)
 
static GB_ERROR gbl_change_gc (GBL_command_arguments *args)
 
static GB_ERROR gbl_exec (GBL_command_arguments *args)
 
const GBL_command_lookup_tableACI_get_standard_commands ()
 

Variables

static gb_export_sequence_cb get_export_sequence = NULp
 
int GBL_IMPL::traceACI = 0
 
int GBL_IMPL::traceIndent = 0
 
static DefinedCommands defined_commands
 
static GB_HASHcached_taxonomies = NULp
 
static GBL_command_definition gbl_command_table []
 

Macro Definition Documentation

#define GROUP_COUNT_CHARS   6

Definition at line 1504 of file adlang1.cxx.

Referenced by build_taxonomy_rek(), and get_taxonomy_string().

#define BITS_PER_HEXCHAR   4

Definition at line 1505 of file adlang1.cxx.

#define MAX_GROUPS   (1 << (GROUP_COUNT_CHARS*BITS_PER_HEXCHAR))

Definition at line 1506 of file adlang1.cxx.

Referenced by build_taxonomy_rek().

#define GBL_COMMON_FILTER_PARAMS
Value:
common_filter_params common_param; \
GBL_STRUCT_PARAM_STRING(common_param, align, "align=", NULp, "alignment to use (defaults to default alignment)"); \
GBL_STRUCT_PARAM_STRING(common_param, sai, "SAI=", NULp, "Use default sequence of given SAI as a filter"); \
GBL_STRUCT_PARAM_STRING(common_param, species, "species=", NULp, "Use default sequence of given species as a filter"); \
GBL_STRUCT_PARAM_BIT (common_param, first, "first=", 0, "Use 1st stream as filter for other streams"); \
GBL_STRUCT_PARAM_BIT (common_param, pairwise, "pairwise=", 0, "Use 1st stream as filter for 2nd, 3rd for 4th, ...")
#define GBL_STRUCT_PARAM_STRING(strct, member, param_name, def, help_text)
Definition: gb_aci_impl.h:106
#define GBL_STRUCT_PARAM_BIT(strct,member, param_name, def, help_text)
Definition: gb_aci_impl.h:107
#define NULp
Definition: cxxforward.h:116

Definition at line 2333 of file adlang1.cxx.

Referenced by gbl_change_gc(), gbl_diff(), and gbl_filter().

Typedef Documentation

typedef char*(* filter_fun)(const char *seq, const char *filter, size_t flen, void *param)

Definition at line 2341 of file adlang1.cxx.

Enumeration Type Documentation

enum Case
Enumerator
UPPER 
LOWER 
CAPS 

Definition at line 861 of file adlang1.cxx.

Enumerator
GBT_ITEM_UNKNOWN 
GBT_ITEM_SPECIES 
GBT_ITEM_GENE 

Definition at line 1465 of file adlang1.cxx.

Enumerator
FP_FILTER 
FP_MODIFY 

Definition at line 2454 of file adlang1.cxx.

Function Documentation

NOT4PERL void GB_set_export_sequence_hook ( gb_export_sequence_cb  escb)

Definition at line 35 of file adlang1.cxx.

References gb_assert, and get_export_sequence.

Referenced by SEQIO::export_by_format(), and ExportFieldScanner::scanFields().

static int gbl_stricmp ( const char s1,
const char s2 
)
static

Definition at line 175 of file adlang1.cxx.

Referenced by binop_compare(), and binop_equals().

static int gbl_strincmp ( const char s1,
const char s2,
int  size2 
)
static

Definition at line 192 of file adlang1.cxx.

Referenced by gbl_stristr().

static const char* gbl_stristr ( const char haystack,
const char needle 
)
static

Definition at line 209 of file adlang1.cxx.

References gb_assert, gbl_strincmp(), and NULp.

Referenced by binop_contains().

int approve_pos ( int  pos,
int  len 
)
inline

Definition at line 254 of file adlang1.cxx.

Referenced by gbl_mid_streams().

static GB_ERROR gbl_mid_streams ( const GBL_streams arg_input,
GBL_streams arg_out,
int  start,
int  end 
)
static
static GB_ERROR gbl_trace ( GBL_command_arguments args)
static
template<typename T >
GB_ERROR gbl_apply_binary_operator ( GBL_command_arguments args,
char *(*)(const char *, const char *, T op,
T  client_data 
)
static char* unEscapeString ( const char escapedString)
static

Definition at line 384 of file adlang1.cxx.

References result.

Referenced by apply_to_origin(), applyToItemFoundByKey(), gbl_command(), gbl_define(), gbl_eval(), and gbl_unescape().

static char* escapeString ( const char unescapedString)
static

Definition at line 404 of file adlang1.cxx.

References result.

Referenced by gbl_escape().

static GB_ERROR gbl_quote ( GBL_command_arguments args)
static
static GB_ERROR gbl_unquote ( GBL_command_arguments args)
static
static GB_ERROR gbl_escape ( GBL_command_arguments args)
static
static GB_ERROR gbl_unescape ( GBL_command_arguments args)
static
static GB_ERROR gbl_command ( GBL_command_arguments args)
static
static GB_ERROR gbl_eval ( GBL_command_arguments args)
static
static GB_ERROR gbl_define ( GBL_command_arguments args)
static
static GB_ERROR gbl_do ( GBL_command_arguments args)
static
static GB_ERROR gbl_streams ( GBL_command_arguments args)
static
static GB_ERROR expect_used_in_genome_db ( GBL_command_arguments args)
static
static GB_ERROR apply_to_origin ( GBL_command_arguments args,
bool  organism 
)
static
static GB_ERROR gbl_origin_gene ( GBL_command_arguments args)
static

Definition at line 613 of file adlang1.cxx.

References apply_to_origin().

static GB_ERROR gbl_origin_organism ( GBL_command_arguments args)
static

Definition at line 614 of file adlang1.cxx.

References apply_to_origin().

static GB_ERROR applyToItemFoundByKey ( GBL_command_arguments args,
const char itemname,
GBDATA gb_item_data,
const char key 
)
static
static GB_ERROR gbl_findspec ( GBL_command_arguments args)
static
static GB_ERROR gbl_findacc ( GBL_command_arguments args)
static
static GB_ERROR gbl_findgene ( GBL_command_arguments args)
static
GB_ERROR count_by_tab ( GBL_command_arguments args,
const Tab tab 
)
inline
GB_ERROR remove_by_tab ( GBL_command_arguments args,
const Tab tab 
)
inline
static GB_ERROR gbl_count ( GBL_command_arguments args)
static

Definition at line 724 of file adlang1.cxx.

References count_by_tab(), EXPECT_PARAMS, and GBL_command_arguments::get_param().

static GB_ERROR gbl_len ( GBL_command_arguments args)
static
static GB_ERROR gbl_remove ( GBL_command_arguments args)
static

Definition at line 733 of file adlang1.cxx.

References EXPECT_PARAMS, GBL_command_arguments::get_param(), and remove_by_tab().

static GB_ERROR gbl_keep ( GBL_command_arguments args)
static

Definition at line 737 of file adlang1.cxx.

References EXPECT_PARAMS, GBL_command_arguments::get_param(), and remove_by_tab().

static char* binop_compare ( const char arg1,
const char arg2,
bool  case_sensitive 
)
static

Definition at line 743 of file adlang1.cxx.

References gbl_stricmp(), GBS_global_string_copy(), and result.

Referenced by gbl_compare(), and gbl_icompare().

static char* binop_equals ( const char arg1,
const char arg2,
bool  case_sensitive 
)
static

Definition at line 751 of file adlang1.cxx.

References gbl_stricmp(), GBS_global_string_copy(), and result.

Referenced by gbl_equals(), and gbl_iequals().

static char* binop_contains ( const char arg1,
const char arg2,
bool  case_sensitive 
)
static

Definition at line 759 of file adlang1.cxx.

References gbl_stristr(), GBS_global_string_copy(), and NULp.

Referenced by binop_partof(), gbl_contains(), and gbl_icontains().

static char* binop_partof ( const char arg1,
const char arg2,
bool  case_sensitive 
)
static

Definition at line 769 of file adlang1.cxx.

References binop_contains().

Referenced by gbl_ipartof(), and gbl_partof().

static GB_ERROR gbl_compare ( GBL_command_arguments args)
static

Definition at line 773 of file adlang1.cxx.

References binop_compare(), and gbl_apply_binary_operator().

static GB_ERROR gbl_icompare ( GBL_command_arguments args)
static

Definition at line 774 of file adlang1.cxx.

References binop_compare(), and gbl_apply_binary_operator().

static GB_ERROR gbl_equals ( GBL_command_arguments args)
static

Definition at line 775 of file adlang1.cxx.

References binop_equals(), and gbl_apply_binary_operator().

static GB_ERROR gbl_iequals ( GBL_command_arguments args)
static

Definition at line 776 of file adlang1.cxx.

References binop_equals(), and gbl_apply_binary_operator().

static GB_ERROR gbl_contains ( GBL_command_arguments args)
static

Definition at line 777 of file adlang1.cxx.

References binop_contains(), and gbl_apply_binary_operator().

static GB_ERROR gbl_icontains ( GBL_command_arguments args)
static

Definition at line 778 of file adlang1.cxx.

References binop_contains(), and gbl_apply_binary_operator().

static GB_ERROR gbl_partof ( GBL_command_arguments args)
static

Definition at line 779 of file adlang1.cxx.

References binop_partof(), and gbl_apply_binary_operator().

static GB_ERROR gbl_ipartof ( GBL_command_arguments args)
static

Definition at line 780 of file adlang1.cxx.

References binop_partof(), and gbl_apply_binary_operator().

static GB_ERROR gbl_isEmpty ( GBL_command_arguments args)
static
static GB_ERROR gbl_inRange ( GBL_command_arguments args)
static
static GB_ERROR gbl_translate ( GBL_command_arguments args)
static
static GB_ERROR gbl_echo ( GBL_command_arguments args)
static
static GB_ERROR gbl_dd ( GBL_command_arguments args)
static
static GB_ERROR convert_case ( GBL_command_arguments args,
Case  convTo 
)
static
static GB_ERROR gbl_caps ( GBL_command_arguments args)
static

Definition at line 890 of file adlang1.cxx.

References CAPS, and convert_case().

static GB_ERROR gbl_upper ( GBL_command_arguments args)
static

Definition at line 891 of file adlang1.cxx.

References convert_case(), and UPPER.

static GB_ERROR gbl_lower ( GBL_command_arguments args)
static

Definition at line 892 of file adlang1.cxx.

References convert_case(), and LOWER.

static GB_ERROR gbl_head ( GBL_command_arguments args)
static
static GB_ERROR gbl_tail ( GBL_command_arguments args)
static
GB_ERROR mid ( GBL_command_arguments args,
int  start_index 
)
inline
static GB_ERROR gbl_mid0 ( GBL_command_arguments args)
static

Definition at line 911 of file adlang1.cxx.

References mid().

static GB_ERROR gbl_mid ( GBL_command_arguments args)
static

Definition at line 912 of file adlang1.cxx.

References mid().

static GB_ERROR tab ( GBL_command_arguments args,
bool  pretab 
)
static
static GB_ERROR gbl_tab ( GBL_command_arguments args)
static

Definition at line 938 of file adlang1.cxx.

References tab().

static GB_ERROR gbl_pretab ( GBL_command_arguments args)
static

Definition at line 939 of file adlang1.cxx.

References tab().

static GB_ERROR gbl_crop ( GBL_command_arguments args)
static
static GB_ERROR gbl_cut ( GBL_command_arguments args)
static
static GB_ERROR gbl_drop ( GBL_command_arguments args)
static
static GB_ERROR gbl_dropempty ( GBL_command_arguments args)
static
static GB_ERROR gbl_dropzero ( GBL_command_arguments args)
static
static GB_ERROR gbl_swap ( GBL_command_arguments args)
static
static GB_ERROR backfront_stream ( GBL_command_arguments args,
int  toback 
)
static
static GB_ERROR gbl_toback ( GBL_command_arguments args)
static

Definition at line 1073 of file adlang1.cxx.

References backfront_stream().

static GB_ERROR gbl_tofront ( GBL_command_arguments args)
static

Definition at line 1074 of file adlang1.cxx.

References backfront_stream().

static GB_ERROR gbl_merge ( GBL_command_arguments args)
static
static GB_ERROR gbl_split ( GBL_command_arguments args)
static
static GB_ERROR gbl_colsplit ( GBL_command_arguments args)
static
static char* do_extract_words ( const char source,
const char chars,
float  minlen,
bool  sort_output 
)
static
static GB_ERROR gbl_extract_words ( GBL_command_arguments args)
static
static GB_ERROR gbl_extract_sequence ( GBL_command_arguments args)
static
static GB_ERROR gbl_checksum ( GBL_command_arguments args)
static
static GB_ERROR gbl_gcgchecksum ( GBL_command_arguments args)
static
static GB_ERROR gbl_srt ( GBL_command_arguments args)
static
static char* apply_numeric_binop ( const char arg1,
const char arg2,
int(*)(int, int num_bin_op 
)
static

Definition at line 1305 of file adlang1.cxx.

References GBS_global_string_copy(), and result.

Referenced by gbl_div(), gbl_minus(), gbl_mult(), gbl_per_cent(), gbl_plus(), and gbl_rest().

static char* apply_double_binop ( const char arg1,
const char arg2,
double(*)(double, double)  num_bin_op 
)
static

Definition at line 1313 of file adlang1.cxx.

References GBS_global_string_copy(), NULp, and result.

Referenced by gbl_fdiv(), gbl_fminus(), gbl_fmult(), gbl_fper_cent(), and gbl_fplus().

static char* apply_auto_numeric_binop ( const char arg1,
const char arg2,
binop_pair  multiop 
)
static
template<typename T >
static T binop_plus ( T  v1,
T  v2 
)
static

Definition at line 1340 of file adlang1.cxx.

template<typename T >
static T binop_minus ( T  v1,
T  v2 
)
static

Definition at line 1341 of file adlang1.cxx.

template<typename T >
static T binop_mult ( T  v1,
T  v2 
)
static

Definition at line 1342 of file adlang1.cxx.

template<typename T >
static T binop_div ( T  v1,
T  v2 
)
static

Definition at line 1343 of file adlang1.cxx.

template<typename T >
static T binop_per_cent ( T  v1,
T  v2 
)
static

Definition at line 1344 of file adlang1.cxx.

static int binop_rest ( int  i1,
int  i2 
)
static

Definition at line 1346 of file adlang1.cxx.

Referenced by gbl_rest().

static GB_ERROR gbl_plus ( GBL_command_arguments args)
static

Definition at line 1349 of file adlang1.cxx.

References apply_numeric_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_fplus ( GBL_command_arguments args)
static

Definition at line 1350 of file adlang1.cxx.

References apply_double_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_minus ( GBL_command_arguments args)
static

Definition at line 1351 of file adlang1.cxx.

References apply_numeric_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_fminus ( GBL_command_arguments args)
static

Definition at line 1352 of file adlang1.cxx.

References apply_double_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_mult ( GBL_command_arguments args)
static

Definition at line 1353 of file adlang1.cxx.

References apply_numeric_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_fmult ( GBL_command_arguments args)
static

Definition at line 1354 of file adlang1.cxx.

References apply_double_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_div ( GBL_command_arguments args)
static

Definition at line 1355 of file adlang1.cxx.

References apply_numeric_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_fdiv ( GBL_command_arguments args)
static

Definition at line 1356 of file adlang1.cxx.

References apply_double_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_rest ( GBL_command_arguments args)
static

Definition at line 1357 of file adlang1.cxx.

References apply_numeric_binop(), binop_rest(), and gbl_apply_binary_operator().

static GB_ERROR gbl_per_cent ( GBL_command_arguments args)
static

Definition at line 1358 of file adlang1.cxx.

References apply_numeric_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_fper_cent ( GBL_command_arguments args)
static

Definition at line 1359 of file adlang1.cxx.

References apply_double_binop(), and gbl_apply_binary_operator().

template<typename T >
static T binop_isAbove ( T  i1,
T  i2 
)
static

Definition at line 1361 of file adlang1.cxx.

template<typename T >
static T binop_isBelow ( T  i1,
T  i2 
)
static

Definition at line 1362 of file adlang1.cxx.

template<typename T >
static T binop_isEqual ( T  i1,
T  i2 
)
static

Definition at line 1363 of file adlang1.cxx.

static GB_ERROR gbl_isAbove ( GBL_command_arguments args)
static

Definition at line 1365 of file adlang1.cxx.

References apply_auto_numeric_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_isBelow ( GBL_command_arguments args)
static

Definition at line 1366 of file adlang1.cxx.

References apply_auto_numeric_binop(), and gbl_apply_binary_operator().

static GB_ERROR gbl_isEqual ( GBL_command_arguments args)
static

Definition at line 1367 of file adlang1.cxx.

References apply_auto_numeric_binop(), and gbl_apply_binary_operator().

double float_shift_factor ( int  digits)
inline

Definition at line 1369 of file adlang1.cxx.

References digits().

Referenced by gbl_round().

static GB_ERROR gbl_round ( GBL_command_arguments args)
static
static GB_ERROR gbl_not ( GBL_command_arguments args)
static
static GB_ERROR gbl_and ( GBL_command_arguments args)
static
static GB_ERROR gbl_or ( GBL_command_arguments args)
static
static GB_ERROR gbl_select ( GBL_command_arguments args)
static
static GB_ERROR gbl_readdb ( GBL_command_arguments args)
static
static GBT_ITEM_TYPE identify_gb_item ( GBDATA gb_item)
static
static void free_cached_taxonomy ( cached_taxonomy ct)
static

Definition at line 1522 of file adlang1.cxx.

References GBS_free_hash(), cached_taxonomy::taxonomy, and cached_taxonomy::tree_name.

Referenced by flush_taxonomy_cb().

static void build_taxonomy_rek ( TreeNode node,
GB_HASH tax_hash,
const char parent_group,
int group_counter 
)
static
static bool is_cached_taxonomy ( const char ,
long  val,
void *  cl_ct 
)
static

Definition at line 1582 of file adlang1.cxx.

Referenced by tree_of_cached_taxonomy().

static const char* tree_of_cached_taxonomy ( cached_taxonomy ct)
static
static void flush_taxonomy_cb ( GBDATA gbd,
cached_taxonomy ct 
)
static
static void flush_taxonomy_if_new_group_cb ( GBDATA gb_tree,
cached_taxonomy ct 
)
static
static cached_taxonomy* get_cached_taxonomy ( GBDATA gb_main,
const char tree_name,
GB_ERROR error 
)
static
static char* get_taxonomy_string ( GB_HASH tax_hash,
const char group_key,
int  depth,
GB_ERROR error 
)
static
static const char* get_taxonomy ( GBDATA gb_species_or_group,
const char tree_name,
bool  is_current_tree,
int  depth,
GB_ERROR error 
)
static
static GB_ERROR gbl_taxonomy ( GBL_command_arguments args)
static
static GB_ERROR gbl_sequence ( GBL_command_arguments args)
static
static GB_ERROR gbl_export_sequence ( GBL_command_arguments args)
static
static GB_ERROR gbl_ali_name ( GBL_command_arguments args)
static
static GB_ERROR gbl_sequence_type ( GBL_command_arguments args)
static
static GB_ERROR format ( GBL_command_arguments args,
bool  simple_format 
)
static
static GB_ERROR gbl_format ( GBL_command_arguments args)
static

Definition at line 2248 of file adlang1.cxx.

References format().

static GB_ERROR gbl_format_sequence ( GBL_command_arguments args)
static

Definition at line 2249 of file adlang1.cxx.

References format().

static char* gbl_read_seq_sai_or_species ( GBDATA gb_main,
const char species,
const char sai,
const char ali,
size_t seqLen 
)
static
static GB_ERROR apply_filters ( GBL_command_arguments args,
common_filter_params common,
filter_fun  filter_one,
void *  param 
)
static
static char* calc_diff ( const char seq,
const char filter,
size_t  ,
void *  paramP 
)
static

Definition at line 2406 of file adlang1.cxx.

References ARB_strdup(), diff_params::diffC, diff_params::equalC, and result.

Referenced by gbl_diff().

static GB_ERROR gbl_diff ( GBL_command_arguments args)
static
static char* filter_seq ( const char seq,
const char filter,
size_t  flen,
void *  paramP 
)
static
static GB_ERROR gbl_filter ( GBL_command_arguments args)
static
static GB_ERROR gbl_change_gc ( GBL_command_arguments args)
static
static GB_ERROR gbl_exec ( GBL_command_arguments args)
static
const GBL_command_lookup_table& ACI_get_standard_commands ( )

Variable Documentation

gb_export_sequence_cb get_export_sequence = NULp
static

Definition at line 33 of file adlang1.cxx.

Referenced by GB_set_export_sequence_hook(), and gbl_export_sequence().

DefinedCommands defined_commands
static

Definition at line 526 of file adlang1.cxx.

GB_HASH* cached_taxonomies = NULp
static

Definition at line 1580 of file adlang1.cxx.

GBL_command_definition gbl_command_table[]
static

Definition at line 2654 of file adlang1.cxx.