5 #ifndef BPP_SEQ_CORESYMBOLLIST_H
6 #define BPP_SEQ_CORESYMBOLLIST_H
49 virtual std::shared_ptr<const Alphabet>
getAlphabet()
const = 0;
64 virtual size_t size()
const = 0;
133 virtual double operator()(
size_t position,
int state)
const = 0;
395 virtual std::shared_ptr<const CoreSymbolListListener<T>>
getListener(
size_t i)
const = 0;
399 virtual std::shared_ptr<CoreSymbolListListener<T>>
getListener(
size_t i) = 0;
virtual size_t getPosition() const
virtual size_t getLength() const
CoreSymbolListDeletionEvent(TemplateCoreSymbolListInterface< T > *list, size_t pos, size_t len)
CoreSymbolListEditionEvent(const CoreSymbolListEditionEvent< T > &slee)
CoreSymbolListEditionEvent< T > & operator=(const CoreSymbolListEditionEvent< T > &slee)
virtual TemplateCoreSymbolListInterface< T > * getCoreSymbolList()
CoreSymbolListEditionEvent(TemplateCoreSymbolListInterface< T > *list)
virtual const TemplateCoreSymbolListInterface< T > * getCoreSymbolList() const
TemplateCoreSymbolListInterface< T > * list_
virtual ~CoreSymbolListEditionEvent()
CoreSymbolListInsertionEvent(TemplateCoreSymbolListInterface< T > *list, size_t pos, size_t len)
virtual size_t getPosition() const
virtual size_t getLength() const
virtual void afterSequenceChanged(const CoreSymbolListEditionEvent< T > &event)=0
virtual bool isShared() const =0
virtual bool isRemovable() const =0
virtual void beforeSequenceDeleted(const CoreSymbolListDeletionEvent< T > &event)=0
virtual void beforeSequenceInserted(const CoreSymbolListInsertionEvent< T > &event)=0
virtual ~CoreSymbolListListener()
virtual void afterSequenceInserted(const CoreSymbolListInsertionEvent< T > &event)=0
virtual CoreSymbolListListener * clone() const =0
virtual void beforeSequenceSubstituted(const CoreSymbolListSubstitutionEvent< T > &event)=0
virtual void afterSequenceSubstituted(const CoreSymbolListSubstitutionEvent< T > &event)=0
virtual void afterSequenceDeleted(const CoreSymbolListDeletionEvent< T > &event)=0
virtual void beforeSequenceChanged(const CoreSymbolListEditionEvent< T > &event)=0
virtual size_t getEnd() const
CoreSymbolListSubstitutionEvent(TemplateCoreSymbolListInterface< T > *list, size_t begin, size_t end)
virtual size_t getBegin() const
The CruxSymbolList interface.
virtual std::shared_ptr< const Alphabet > getAlphabet() const =0
Get the alphabet associated to the list.
CruxSymbolListInterface * clone() const override=0
virtual void deleteElements(size_t pos, size_t len)=0
Remove the elements at position 'pos'.
virtual void deleteElement(size_t pos)=0
Remove the element at position 'pos'.
virtual void shuffle()=0
Randomly shuffle the content of the list, with linear complexity.
virtual ~CruxSymbolListInterface()
virtual size_t size() const =0
Get the number of elements in the list.
virtual std::string toString() const =0
Convert the list as a string.
virtual double operator()(size_t position, int state) const =0
get value of a state at a position
virtual const Alphabet & alphabet() const =0
Get the alphabet associated to the list.
virtual double getStateValueAt(size_t position, int state) const =0
get value of a state at a position
The CoreSymbolList interface.
virtual void addElement(const T &c)=0
Add a character to the end of the list.
virtual void setElement(size_t pos, const T &c)=0
Set the element at position 'pos' to character 'c'.
virtual const std::vector< T > & getContent() const =0
virtual void setContent(const std::vector< T > &list)=0
Set the whole content of the list.
TemplateCoreSymbolListInterface * clone() const override=0
virtual ~TemplateCoreSymbolListInterface()
virtual const T & getValue(size_t pos) const =0
checked access to a character in list.
virtual const T & getElement(size_t pos) const =0
Get the element at position 'pos' as a character.
virtual void addElement(size_t pos, const T &c)=0
Add a character at a certain position in the list.
virtual T & operator[](size_t pos)=0
Operator [] overloaded for quick access to a character in list.
virtual const T & operator[](size_t pos) const =0
Operator [] overloaded for quick access to a character in list.
Interface for event-driven CoreSymbolList objects.
virtual ~TemplateEventDrivenCoreSymbolListInterface()
virtual bool propagateEvents() const =0
virtual TemplateEventDrivenCoreSymbolListInterface * clone() const override=0
virtual void propagateEvents(bool yn)=0
virtual void fireBeforeSequenceInserted(const CoreSymbolListInsertionEvent< T > &event)=0
virtual void beforeSequenceChanged(const CoreSymbolListEditionEvent< T > &event)=0
virtual void beforeSequenceDeleted(const CoreSymbolListDeletionEvent< T > &event)=0
virtual void fireAfterSequenceDeleted(const CoreSymbolListDeletionEvent< T > &event)=0
virtual void fireAfterSequenceInserted(const CoreSymbolListInsertionEvent< T > &event)=0
virtual void afterSequenceSubstituted(const CoreSymbolListSubstitutionEvent< T > &event)=0
virtual void removeCoreSymbolListListener(std::shared_ptr< CoreSymbolListListener< T >> listener)=0
virtual void fireAfterSequenceSubstituted(const CoreSymbolListSubstitutionEvent< T > &event)=0
virtual void afterSequenceInserted(const CoreSymbolListInsertionEvent< T > &event)=0
virtual void fireBeforeSequenceChanged(const CoreSymbolListEditionEvent< T > &event)=0
virtual void fireBeforeSequenceDeleted(const CoreSymbolListDeletionEvent< T > &event)=0
virtual void fireAfterSequenceChanged(const CoreSymbolListEditionEvent< T > &event)=0
virtual const CoreSymbolListListener< T > & listener(size_t i) const =0
virtual CoreSymbolListListener< T > & listener(size_t i)=0
virtual void addCoreSymbolListListener(std::shared_ptr< CoreSymbolListListener< T >> listener)=0
virtual std::shared_ptr< const CoreSymbolListListener< T > > getListener(size_t i) const =0
virtual void beforeSequenceSubstituted(const CoreSymbolListSubstitutionEvent< T > &event)=0
virtual std::shared_ptr< CoreSymbolListListener< T > > getListener(size_t i)=0
virtual void beforeSequenceInserted(const CoreSymbolListInsertionEvent< T > &event)=0
virtual size_t getNumberOfListeners() const =0
virtual void afterSequenceDeleted(const CoreSymbolListDeletionEvent< T > &event)=0
virtual void fireBeforeSequenceSubstituted(const CoreSymbolListSubstitutionEvent< T > &event)=0
virtual void afterSequenceChanged(const CoreSymbolListEditionEvent< T > &event)=0
This alphabet is used to deal NumericAlphabet.