ARB
Classes | Macros | Typedefs | Enumerations | Functions | Variables
insdel.cxx File Reference
#include "insdel.h"
#include <RangeList.h>
#include <arbdbt.h>
#include <adGene.h>
#include <arb_progress.h>
#include <arb_defs.h>
#include <arb_diff.h>
#include <algorithm>
Include dependency graph for insdel.cxx:

Go to the source code of this file.

Classes

class  UnitPtr
 
struct  UnitPair
 
class  AliData
 
class  AliDataSlice
 
class  FINAL_TYPE< SEQTYPE >
 xml element More...
 
class  Deletable
 
class  TypedAliData< T >
 
struct  SpecificGap< T >
 
class  SizeAwarable
 
class  SpecificAliData< T >
 
class  SequenceAliData
 
class  Alignment
 
class  AliApplicable
 
class  AliEntryCounter
 
struct  AliEditCommand
 
class  AliInsertCommand
 
class  AliDeleteCommand
 
class  FINAL_TYPE< SEQTYPE >
 xml element More...
 
class  AliAutoFormatCommand
 
class  AliCompositeCommand
 
class  AliEditor
 
class  LazyAliData
 
class  EditedTerminal
 

Macros

#define id_assert(cond)   arb_assert(cond)
 

Typedefs

typedef SmartPtr< AliDataAliDataPtr
 

Enumerations

enum  TerminalType { IDT_SPECIES = 0, IDT_SAI, IDT_SECSTRUCT }
 

Functions

template<typename T >
int compare_type (const T &t1, const T &t2)
 
SizeAwarable dontAllowOversize (size_t ali_size)
 
template<typename T >
GB_ERROR check_delete_allowed (const T *, size_t, size_t, const Deletable &)
 
template<>
GB_ERROR check_delete_allowed (const char *data, size_t start, size_t count, const Deletable &deletable)
 
AliDataPtr concat (AliDataPtr left, AliDataPtr right)
 
AliDataPtr concat (AliDataPtr left, AliDataPtr mid, AliDataPtr right)
 
AliDataPtr partof (AliDataPtr data, size_t pos, size_t amount)
 
AliDataPtr before (AliDataPtr data, size_t pos)
 
AliDataPtr after (AliDataPtr data, size_t pos)
 
AliDataPtr delete_from (AliDataPtr from, size_t pos, size_t amount, GB_ERROR &error)
 
AliDataPtr insert_at (AliDataPtr dest, size_t pos, AliDataPtr src)
 
AliDataPtr insert_gap (AliDataPtr data, size_t pos, size_t count)
 
AliDataPtr format (AliDataPtr data, const size_t wanted_len, GB_ERROR &error)
 
template<typename T >
AliDataPtr makeAliData (T *&allocated_data, size_t elems, const T &gap)
 
AliDataPtr makeAliSeqData (char *&allocated_data, size_t elems, char gap, char dot)
 
void free_insDelBuffer ()
 
charprovide_insDelBuffer (size_t neededSpace)
 
GB_CSTR alidata2buffer (const AliData &data)
 
static size_t countAffectedEntries (GBDATA *Main, const Alignment &ali)
 
static GB_ERROR apply_command_to_alignment (const AliEditCommand &cmd, const char *cmd_description, GBDATA *Main, const char *alignment_name, const char *deletable_chars)
 
static GB_ERROR format_to_alilen (GBDATA *Main, const char *alignment_name)
 
GB_ERROR ARB_format_alignment (GBDATA *Main, const char *alignment_name)
 
GB_ERROR ARB_insdel_columns (GBDATA *Main, const char *alignment_name, long pos, long count, const char *deletable_chars)
 
GB_ERROR ARB_delete_columns_using_SAI (GBDATA *Main, const char *alignment_name, const RangeList &ranges, const char *deletable_chars)
 
GB_ERROR ARB_insert_columns_using_SAI (GBDATA *Main, const char *alignment_name, const RangeList &ranges, UseRange units, InsertWhere where, size_t amount)
 

Variables

static GB_CSTR targetTypeName []
 
static charinsDelBuffer = NULp
 
static size_t insDelBuffer_size
 

Macro Definition Documentation

#define id_assert (   cond)    arb_assert(cond)

Typedef Documentation

Definition at line 60 of file insdel.cxx.

Enumeration Type Documentation

Enumerator
IDT_SPECIES 
IDT_SAI 
IDT_SECSTRUCT 

Definition at line 901 of file insdel.cxx.

Function Documentation

template<typename T >
int compare_type ( const T t1,
const T t2 
)
inline
SizeAwarable dontAllowOversize ( size_t  ali_size)
inline

Definition at line 471 of file insdel.cxx.

Referenced by makeAliData(), and makeAliSeqData().

template<typename T >
GB_ERROR check_delete_allowed ( const T ,
size_t  ,
size_t  ,
const Deletable  
)
inline

Definition at line 474 of file insdel.cxx.

References NULp.

template<>
GB_ERROR check_delete_allowed ( const char data,
size_t  start,
size_t  count,
const Deletable deletable 
)
inline

Definition at line 478 of file insdel.cxx.

References Deletable::get_delete_error().

AliDataPtr concat ( AliDataPtr  left,
AliDataPtr  right 
)
inline

Definition at line 584 of file insdel.cxx.

Referenced by concat(), delete_from(), and insert_at().

AliDataPtr concat ( AliDataPtr  left,
AliDataPtr  mid,
AliDataPtr  right 
)
inline

Definition at line 587 of file insdel.cxx.

References concat().

AliDataPtr partof ( AliDataPtr  data,
size_t  pos,
size_t  amount 
)
inline

Definition at line 591 of file insdel.cxx.

References AliDataSlice::make().

Referenced by after(), and before().

AliDataPtr before ( AliDataPtr  data,
size_t  pos 
)
inline
AliDataPtr after ( AliDataPtr  data,
size_t  pos 
)
inline
AliDataPtr delete_from ( AliDataPtr  from,
size_t  pos,
size_t  amount,
GB_ERROR error 
)
inline

Definition at line 595 of file insdel.cxx.

References after(), before(), and concat().

Referenced by AliDeleteCommand::apply(), and format().

AliDataPtr insert_at ( AliDataPtr  dest,
size_t  pos,
AliDataPtr  src 
)
inline

Definition at line 599 of file insdel.cxx.

References after(), before(), and concat().

Referenced by insert_gap().

AliDataPtr insert_gap ( AliDataPtr  data,
size_t  pos,
size_t  count 
)
inline

Definition at line 603 of file insdel.cxx.

References id_assert, insert_at(), UnitPair::left, and UnitPair::right.

Referenced by AliInsertCommand::apply(), and format().

AliDataPtr format ( AliDataPtr  data,
const size_t  wanted_len,
GB_ERROR error 
)
inline
template<typename T >
AliDataPtr makeAliData ( T *&  allocated_data,
size_t  elems,
const T gap 
)
inline

Definition at line 628 of file insdel.cxx.

References Deletable::ANYTHING, and dontAllowOversize().

AliDataPtr makeAliSeqData ( char *&  allocated_data,
size_t  elems,
char  gap,
char  dot 
)
inline

Definition at line 631 of file insdel.cxx.

References Deletable::ANYTHING, and dontAllowOversize().

void free_insDelBuffer ( )
inline

Definition at line 1162 of file insdel.cxx.

Referenced by apply_command_to_alignment(), and provide_insDelBuffer().

char* provide_insDelBuffer ( size_t  neededSpace)
inline

Definition at line 1165 of file insdel.cxx.

References free_insDelBuffer(), insDelBuffer, and insDelBuffer_size.

Referenced by alidata2buffer().

GB_CSTR alidata2buffer ( const AliData data)
inline

Definition at line 1174 of file insdel.cxx.

References buffer, AliData::copyTo(), AliData::memsize(), and provide_insDelBuffer().

Referenced by EditedTerminal::apply().

static size_t countAffectedEntries ( GBDATA Main,
const Alignment ali 
)
static
static GB_ERROR apply_command_to_alignment ( const AliEditCommand cmd,
const char cmd_description,
GBDATA Main,
const char alignment_name,
const char deletable_chars 
)
static
static GB_ERROR format_to_alilen ( GBDATA Main,
const char alignment_name 
)
static

Definition at line 1434 of file insdel.cxx.

References apply_command_to_alignment().

Referenced by ARB_format_alignment().

GB_ERROR ARB_format_alignment ( GBDATA Main,
const char alignment_name 
)
GB_ERROR ARB_insdel_columns ( GBDATA Main,
const char alignment_name,
long  pos,
long  count,
const char deletable_chars 
)

Definition at line 1453 of file insdel.cxx.

References apply_command_to_alignment(), error(), GBS_global_string(), and NULp.

Referenced by insdel_event().

GB_ERROR ARB_delete_columns_using_SAI ( GBDATA Main,
const char alignment_name,
const RangeList ranges,
const char deletable_chars 
)
GB_ERROR ARB_insert_columns_using_SAI ( GBDATA Main,
const char alignment_name,
const RangeList ranges,
UseRange  units,
InsertWhere  where,
size_t  amount 
)

Variable Documentation

GB_CSTR targetTypeName[]
static
Initial value:
= {
"Species",
"SAI",
"SeceditStruct",
}

Definition at line 907 of file insdel.cxx.

char* insDelBuffer = NULp
static

Definition at line 1159 of file insdel.cxx.

Referenced by provide_insDelBuffer().

size_t insDelBuffer_size
static

Definition at line 1160 of file insdel.cxx.

Referenced by provide_insDelBuffer().