bpp-seq  2.2.0
SymbolList.h
Go to the documentation of this file.
1 //
2 // File: SymbolList.h
3 // Created by: Julien Dutheil
4 // Created on: Fri Apr 9 2005
5 //
6 
7 /*
8 Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
9 
10 This software is a computer program whose purpose is to provide classes
11 for sequences analysis.
12 
13 This software is governed by the CeCILL license under French law and
14 abiding by the rules of distribution of free software. You can use,
15 modify and/ or redistribute the software under the terms of the CeCILL
16 license as circulated by CEA, CNRS and INRIA at the following URL
17 "http://www.cecill.info".
18 
19 As a counterpart to the access to the source code and rights to copy,
20 modify and redistribute granted by the license, users are provided only
21 with a limited warranty and the software's author, the holder of the
22 economic rights, and the successive licensors have only limited
23 liability.
24 
25 In this respect, the user's attention is drawn to the risks associated
26 with loading, using, modifying and/or developing or reproducing the
27 software by the user in light of its specific status of free software,
28 that may mean that it is complicated to manipulate, and that also
29 therefore means that it is reserved for developers and experienced
30 professionals having in-depth computer knowledge. Users are therefore
31 encouraged to load and test the software's suitability as regards their
32 requirements in conditions enabling the security of their systems and/or
33 data to be ensured and, more generally, to use and operate it in the
34 same conditions as regards security.
35 
36 The fact that you are presently reading this means that you have had
37 knowledge of the CeCILL license and that you accept its terms.
38 */
39 
40 #ifndef _SYMBOLLIST_H_
41 #define _SYMBOLLIST_H_
42 
43 #include "Alphabet/Alphabet.h"
44 #include <Bpp/Clonable.h>
45 
46 // From the STL:
47 #include <string>
48 #include <vector>
49 #include <algorithm>
50 #include <iostream>
51 
52 namespace bpp
53 {
54 
60  class SymbolList:
61  public virtual Clonable
62  {
63 
64  public:
70 #ifndef NO_VIRTUAL_COV
71  SymbolList* clone() const = 0;
72 #endif
73 
75  // Class destructor
76  virtual ~SymbolList() {}
77 
78  public:
79 
86  virtual const Alphabet* getAlphabet() const = 0;
87 
93  virtual size_t size() const = 0;
94 
106  virtual const std::vector<int>& getContent() const = 0;
107 
114  virtual void setContent(const std::vector<int>& list) throw (BadIntException) = 0;
115 
122  virtual void setContent(const std::vector<std::string>& list) throw (BadCharException) = 0;
123 
133  virtual std::string toString() const = 0;
134 
146  virtual void addElement(const std::string& c) throw (BadCharException) = 0;
147 
154  virtual void addElement(size_t pos, const std::string& c) throw (BadCharException, IndexOutOfBoundsException) = 0;
155 
162  virtual void setElement(size_t pos, const std::string& c) throw (BadCharException, IndexOutOfBoundsException) = 0;
163 
169  virtual void deleteElement(size_t pos) throw (IndexOutOfBoundsException) = 0;
170 
177  virtual void deleteElements(size_t pos, size_t len) throw (IndexOutOfBoundsException) = 0;
178 
179 
185  virtual std::string getChar(size_t pos) const throw (IndexOutOfBoundsException) = 0;
186 
192  virtual void addElement(int v) throw (BadIntException) = 0;
193 
200  virtual void addElement(size_t pos, int v) throw (BadIntException, IndexOutOfBoundsException) = 0;
201 
208  virtual void setElement(size_t pos, int v) throw (BadIntException, IndexOutOfBoundsException) = 0;
209 
215  virtual int getValue(size_t pos) const throw (IndexOutOfBoundsException) = 0;
216 
235  virtual const int& operator[](size_t i) const = 0;
242  virtual int& operator[](size_t i) = 0;
243 
247  virtual void shuffle() = 0;
249  };
250 
251 
265  public virtual SymbolList
266  {
267 
268  private:
275 
276  protected:
280  std::vector<int> content_;
281 
282  public:
288  BasicSymbolList(const Alphabet* alpha) : alphabet_(alpha), content_() {}
289 
298  BasicSymbolList(const std::vector<std::string>& list, const Alphabet* alpha) throw (BadCharException);
299 
308  BasicSymbolList(const std::vector<int>& list, const Alphabet* alpha) throw (BadIntException);
309 
313  BasicSymbolList(const SymbolList& list);
314 
318  BasicSymbolList(const BasicSymbolList& list);
319 
323  BasicSymbolList& operator=(const SymbolList& list);
324 
329 
335 #ifdef NO_VIRTUAL_COV
336  Clonable*
337 #else
339 #endif
340  clone() const { return new BasicSymbolList(* this); }
343  // Class destructor
344  virtual ~BasicSymbolList() {}
345 
346  public:
347 
348  virtual const Alphabet* getAlphabet() const { return alphabet_; }
349 
350  virtual size_t size() const { return static_cast<size_t>(content_.size()); }
351 
352  virtual const std::vector<int>& getContent() const { return content_; }
353 
354  virtual void setContent(const std::vector<int>& list) throw (BadIntException);
355 
356  virtual void setContent(const std::vector<std::string>& list) throw (BadCharException);
357 
358  virtual std::string toString() const;
359 
360  virtual void addElement(const std::string& c) throw (BadCharException);
361 
362  virtual void addElement(size_t pos, const std::string& c) throw (BadCharException, IndexOutOfBoundsException);
363 
364  virtual void setElement(size_t pos, const std::string& c) throw (BadCharException, IndexOutOfBoundsException);
365 
366  virtual void deleteElement(size_t pos) throw (IndexOutOfBoundsException);
367 
368  virtual void deleteElements(size_t pos, size_t len) throw (IndexOutOfBoundsException);
369 
370  virtual std::string getChar(size_t pos) const throw (IndexOutOfBoundsException);
371 
372  virtual void addElement(int v) throw (BadIntException);
373 
374  virtual void addElement(size_t pos, int v) throw (BadIntException, IndexOutOfBoundsException);
375 
376  virtual void setElement(size_t pos, int v) throw (BadIntException, IndexOutOfBoundsException);
377 
378  virtual int getValue(size_t pos) const throw (IndexOutOfBoundsException);
379 
380  virtual const int& operator[](size_t i) const { return content_[i]; }
381 
382  virtual int& operator[](size_t i) { return content_[i]; }
383 
384  virtual void shuffle()
385  {
386  random_shuffle(content_.begin(), content_.end());
387  }
388  };
389 
391  {
392  private:
394 
395  public:
397  list_(list) {}
398 
400 
402  list_ = slee.list_;
403  return *this;
404  }
405 
407 
408  public:
409  virtual SymbolList* getSymbolList() { return list_; }
410  virtual const SymbolList* getSymbolList() const { return list_; }
411  };
412 
413 
416  {
417  private:
418  size_t pos_;
419  size_t len_;
420 
421  public:
422  SymbolListInsertionEvent(SymbolList* list, size_t pos, size_t len):
423  SymbolListEditionEvent(list), pos_(pos), len_(len) {}
424 
425  public:
426  virtual size_t getPosition() const { return pos_; }
427  virtual size_t getLength() const { return len_; }
428  };
429 
430 
433  {
434  private:
435  size_t pos_;
436  size_t len_;
437 
438  public:
439  SymbolListDeletionEvent(SymbolList* list, size_t pos, size_t len):
440  SymbolListEditionEvent(list), pos_(pos), len_(len) {}
441 
442  public:
443  virtual size_t getPosition() const { return pos_; }
444  virtual size_t getLength() const { return len_; }
445  };
446 
447 
450  {
451  private:
452  size_t begin_;
453  size_t end_;
454 
455  public:
456  SymbolListSubstitutionEvent(SymbolList* list, size_t begin, size_t end) :
457  SymbolListEditionEvent(list), begin_(begin), end_(end) {}
458 
459  public:
460  virtual size_t getBegin() const { return begin_; }
461  virtual size_t getEnd() const { return end_; }
462  };
463 
465  public virtual Clonable
466  {
467  public:
468  virtual ~SymbolListListener() {}
469 
470 #ifndef NO_VIRTUAL_COV
471  virtual SymbolListListener* clone() const = 0;
472 #endif
473 
474  public:
475  virtual bool isRemovable() const = 0;
476  virtual bool isShared() const = 0;
477  virtual void beforeSequenceChanged(const SymbolListEditionEvent& event) = 0;
478  virtual void afterSequenceChanged(const SymbolListEditionEvent& event) = 0;
479  virtual void beforeSequenceInserted(const SymbolListInsertionEvent& event) = 0;
480  virtual void afterSequenceInserted(const SymbolListInsertionEvent& event) = 0;
481  virtual void beforeSequenceDeleted(const SymbolListDeletionEvent& event) = 0;
482  virtual void afterSequenceDeleted(const SymbolListDeletionEvent& event) = 0;
483  virtual void beforeSequenceSubstituted(const SymbolListSubstitutionEvent& event) = 0;
484  virtual void afterSequenceSubstituted(const SymbolListSubstitutionEvent& event) = 0;
485  };
486 
487 
500  class EdSymbolList:
501  public virtual SymbolList
502  {
503 
504  private:
511 
513 
514  protected:
518  std::vector<int> content_;
519 
523  std::vector<SymbolListListener*> listeners_;
524 
525 
526  public:
532  EdSymbolList(const Alphabet* alpha) : alphabet_(alpha), propagateEvents_(true), content_(), listeners_() {}
533 
542  EdSymbolList(const std::vector<std::string>& list, const Alphabet* alpha) throw (BadCharException);
543 
552  EdSymbolList(const std::vector<int>& list, const Alphabet* alpha) throw (BadIntException);
553 
557  EdSymbolList(const SymbolList& list);
558 
562  EdSymbolList(const EdSymbolList& list);
563 
567  EdSymbolList& operator=(const SymbolList& list);
568 
572  EdSymbolList& operator=(const EdSymbolList& list);
573 
579 #ifdef NO_VIRTUAL_COV
580  Clonable*
581 #else
582  EdSymbolList*
583 #endif
584  clone() const { return new EdSymbolList(* this); }
587  // Class destructor
588  virtual ~EdSymbolList()
589  {
590  for (size_t i = 0; i < listeners_.size(); ++i) {
591  if (listeners_[i] && !listeners_[i]->isShared()) {
592  delete listeners_[i];
593  }
594  }
595  }
596 
597  public:
598 
599  virtual const Alphabet* getAlphabet() const { return alphabet_; }
600 
601  virtual size_t size() const { return static_cast<size_t>(content_.size()); }
602 
603  virtual const std::vector<int>& getContent() const { return content_; }
604 
605  virtual void setContent(const std::vector<int>& list) throw (BadIntException);
606 
607  virtual void setContent(const std::vector<std::string>& list) throw (BadCharException);
608 
609  virtual std::string toString() const;
610 
611  virtual void addElement(const std::string& c) throw (BadCharException);
612 
613  virtual void addElement(size_t pos, const std::string& c) throw (BadCharException, IndexOutOfBoundsException);
614 
615  virtual void setElement(size_t pos, const std::string& c) throw (BadCharException, IndexOutOfBoundsException);
616 
617  virtual void deleteElement(size_t pos) throw (IndexOutOfBoundsException);
618 
619  virtual void deleteElements(size_t pos, size_t len) throw (IndexOutOfBoundsException);
620 
621  virtual std::string getChar(size_t pos) const throw (IndexOutOfBoundsException);
622 
623  virtual void addElement(int v) throw (BadIntException);
624 
625  virtual void addElement(size_t pos, int v) throw (BadIntException, IndexOutOfBoundsException);
626 
627  virtual void setElement(size_t pos, int v) throw (BadIntException, IndexOutOfBoundsException);
628 
629  virtual int getValue(size_t pos) const throw (IndexOutOfBoundsException);
630 
631  virtual const int& operator[](size_t i) const { return content_[i]; }
632 
633  virtual int& operator[](size_t i) { return content_[i]; }
634 
635  virtual void shuffle()
636  {
637  random_shuffle(content_.begin(), content_.end());
638  }
639 
645  virtual size_t getNumberOfListeners() const { return listeners_.size(); }
646 
647  virtual const SymbolListListener& getListener(size_t i) const {
648  if (listeners_[i] == 0) std::cout << "aie!!!" << std::endl;
649  return *listeners_[i];
650  }
651 
652  virtual SymbolListListener& getListener(size_t i) {
653  if (listeners_[i] == 0) std::cout << "aie!!!" << std::endl;
654  return *listeners_[i];
655  }
656 
657  virtual void addSymbolListListener(SymbolListListener* listener) {
658  listeners_.push_back(listener);
659  }
660 
662  if (listener->isRemovable())
663  listeners_.erase(remove(listeners_.begin(), listeners_.end(), listener), listeners_.end());
664  else
665  throw Exception("EdSymbolList::removeSymbolListListener. Listener is not removable.");
666  }
667 
668  protected:
669  virtual void beforeSequenceChanged(const SymbolListEditionEvent& event) {};
670  virtual void afterSequenceChanged(const SymbolListEditionEvent& event) {};
671  virtual void beforeSequenceInserted(const SymbolListInsertionEvent& event) {};
672  virtual void afterSequenceInserted(const SymbolListInsertionEvent& event) {};
673  virtual void beforeSequenceDeleted(const SymbolListDeletionEvent& event) {};
674  virtual void afterSequenceDeleted(const SymbolListDeletionEvent& event) {};
677 
679  beforeSequenceChanged(event);
680  if (propagateEvents_)
681  for (size_t i = 0; i < listeners_.size(); ++i)
683  }
684 
686  afterSequenceChanged(event);
687  if (propagateEvents_)
688  for (size_t i = 0; i < listeners_.size(); ++i)
689  listeners_[i]->afterSequenceChanged(event);
690  }
691 
693  beforeSequenceInserted(event);
694  if (propagateEvents_)
695  for (size_t i = 0; i < listeners_.size(); ++i)
697  }
698 
700  afterSequenceInserted(event);
701  if (propagateEvents_)
702  for (size_t i = 0; i < listeners_.size(); ++i)
704  }
705 
707  beforeSequenceDeleted(event);
708  if (propagateEvents_)
709  for (size_t i = 0; i < listeners_.size(); ++i)
711  }
712 
714  afterSequenceDeleted(event);
715  if (propagateEvents_)
716  for (size_t i = 0; i < listeners_.size(); ++i)
717  listeners_[i]->afterSequenceDeleted(event);
718  }
719 
722  if (propagateEvents_)
723  for (size_t i = 0; i < listeners_.size(); ++i)
725  }
726 
729  if (propagateEvents_)
730  for (size_t i = 0; i < listeners_.size(); ++i)
732  }
735  protected:
736  void propagateEvents(bool yn) { propagateEvents_ = yn; }
737  bool propagateEvents() const { return propagateEvents_; }
738 
739  };
740 
741 
742 } //end of namespace bpp.
743 
744 #endif // _SYMBOLLIST_H_
745 
void fireAfterSequenceSubstituted(const SymbolListSubstitutionEvent &event)
Definition: SymbolList.h:727
virtual void shuffle()
Randomly shuffle the content of the list, with linear complexity.
Definition: SymbolList.h:635
virtual ~SymbolListListener()
Definition: SymbolList.h:468
virtual size_t getEnd() const
Definition: SymbolList.h:461
virtual void beforeSequenceSubstituted(const SymbolListSubstitutionEvent &event)=0
virtual void afterSequenceInserted(const SymbolListInsertionEvent &event)=0
std::vector< int > content_
The list content.
Definition: SymbolList.h:518
virtual const std::vector< int > & getContent() const
Get the whole content of the list as a vector of int.
Definition: SymbolList.h:603
virtual size_t getBegin() const
Definition: SymbolList.h:460
An alphabet exception thrown when trying to specify a bad char to the alphabet.
virtual void beforeSequenceChanged(const SymbolListEditionEvent &event)
Definition: SymbolList.h:669
EdSymbolList * clone() const
Definition: SymbolList.h:584
virtual const int & operator[](size_t i) const =0
Operator [] overloaded for quick access to a character in list.
virtual SymbolList * getSymbolList()
Definition: SymbolList.h:409
EdSymbolList(const Alphabet *alpha)
Build a new void BasicSymbolList object with the specified alphabet.
Definition: SymbolList.h:532
The SymbolList interface.
Definition: SymbolList.h:60
SymbolListEditionEvent(SymbolList *list)
Definition: SymbolList.h:396
SymbolListDeletionEvent(SymbolList *list, size_t pos, size_t len)
Definition: SymbolList.h:439
virtual const Alphabet * getAlphabet() const
Get the alphabet associated to the list.
Definition: SymbolList.h:599
const Alphabet * alphabet_
The Alphabet attribute must be initialized in constructor and then can never be changed.
Definition: SymbolList.h:274
virtual size_t getLength() const
Definition: SymbolList.h:427
BasicSymbolList & operator=(const SymbolList &list)
The generic assignment operator.
Definition: SymbolList.cpp:69
virtual size_t getNumberOfListeners() const
Definition: SymbolList.h:645
This alphabet is used to deal NumericAlphabet.
virtual void afterSequenceChanged(const SymbolListEditionEvent &event)
Definition: SymbolList.h:670
virtual void setContent(const std::vector< int > &list)
Set the whole content of the list.
Definition: SymbolList.cpp:297
virtual void deleteElements(size_t pos, size_t len)=0
Delete the elements at position &#39;pos&#39;.
virtual SymbolListListener * clone() const =0
virtual std::string getChar(size_t pos) const
Get the element at position &#39;pos&#39; as a character.
Definition: SymbolList.cpp:145
virtual std::string toString() const
Convert the list as a string.
Definition: SymbolList.cpp:314
The Alphabet interface.
Definition: Alphabet.h:130
void fireAfterSequenceChanged(const SymbolListEditionEvent &event)
Definition: SymbolList.h:685
virtual int & operator[](size_t i)
Operator [] overloaded for quick access to a character in list.
Definition: SymbolList.h:633
SymbolList * clone() const =0
virtual void afterSequenceSubstituted(const SymbolListSubstitutionEvent &event)
Definition: SymbolList.h:676
virtual void afterSequenceInserted(const SymbolListInsertionEvent &event)
Definition: SymbolList.h:672
bool propagateEvents() const
Definition: SymbolList.h:737
virtual const SymbolList * getSymbolList() const
Definition: SymbolList.h:410
SymbolListInsertionEvent(SymbolList *list, size_t pos, size_t len)
Definition: SymbolList.h:422
virtual void deleteElement(size_t pos)
Delete the element at position &#39;pos&#39;.
Definition: SymbolList.cpp:369
std::vector< SymbolListListener * > listeners_
Contains the listeners.
Definition: SymbolList.h:523
virtual void afterSequenceChanged(const SymbolListEditionEvent &event)=0
SymbolListEditionEvent(const SymbolListEditionEvent &slee)
Definition: SymbolList.h:399
virtual void deleteElements(size_t pos, size_t len)
Delete the elements at position &#39;pos&#39;.
Definition: SymbolList.cpp:172
virtual void beforeSequenceDeleted(const SymbolListDeletionEvent &event)
Definition: SymbolList.h:673
virtual ~BasicSymbolList()
Definition: SymbolList.h:344
virtual size_t getLength() const
Definition: SymbolList.h:444
virtual void setContent(const std::vector< int > &list)=0
Set the whole content of the list.
virtual void addElement(const std::string &c)=0
Add a character to the end of the list.
virtual void beforeSequenceSubstituted(const SymbolListSubstitutionEvent &event)
Definition: SymbolList.h:675
virtual void afterSequenceDeleted(const SymbolListDeletionEvent &event)
Definition: SymbolList.h:674
virtual bool isShared() const =0
virtual int getValue(size_t pos) const
Get the element at position &#39;pos&#39; as an int.
Definition: SymbolList.cpp:434
virtual size_t getPosition() const
Definition: SymbolList.h:443
virtual const int & operator[](size_t i) const
Operator [] overloaded for quick access to a character in list.
Definition: SymbolList.h:380
virtual void afterSequenceDeleted(const SymbolListDeletionEvent &event)=0
virtual const std::vector< int > & getContent() const
Get the whole content of the list as a vector of int.
Definition: SymbolList.h:352
virtual void setElement(size_t pos, const std::string &c)
Set the element at position &#39;pos&#39; to character &#39;c&#39;.
Definition: SymbolList.cpp:342
virtual void deleteElement(size_t pos)=0
Delete the element at position &#39;pos&#39;.
virtual ~SymbolList()
Definition: SymbolList.h:76
virtual std::string getChar(size_t pos) const
Get the element at position &#39;pos&#39; as a character.
Definition: SymbolList.cpp:354
virtual void setContent(const std::vector< int > &list)
Set the whole content of the list.
Definition: SymbolList.cpp:101
virtual void beforeSequenceInserted(const SymbolListInsertionEvent &event)=0
virtual ~EdSymbolList()
Definition: SymbolList.h:588
virtual void addElement(const std::string &c)
Add a character to the end of the list.
Definition: SymbolList.cpp:121
virtual void beforeSequenceInserted(const SymbolListInsertionEvent &event)
Definition: SymbolList.h:671
virtual SymbolListListener & getListener(size_t i)
Definition: SymbolList.h:652
virtual int getValue(size_t pos) const
Get the element at position &#39;pos&#39; as an int.
Definition: SymbolList.cpp:212
A basic SymbolList object.
Definition: SymbolList.h:264
virtual void shuffle()=0
Randomly shuffle the content of the list, with linear complexity.
virtual std::string getChar(size_t pos) const =0
Get the element at position &#39;pos&#39; as a character.
SymbolListEditionEvent & operator=(const SymbolListEditionEvent &slee)
Definition: SymbolList.h:401
virtual void shuffle()
Randomly shuffle the content of the list, with linear complexity.
Definition: SymbolList.h:384
virtual void addSymbolListListener(SymbolListListener *listener)
Definition: SymbolList.h:657
virtual int getValue(size_t pos) const =0
Get the element at position &#39;pos&#39; as an int.
virtual void deleteElements(size_t pos, size_t len)
Delete the elements at position &#39;pos&#39;.
Definition: SymbolList.cpp:381
virtual void setElement(size_t pos, const std::string &c)=0
Set the element at position &#39;pos&#39; to character &#39;c&#39;.
std::vector< int > content_
The list content.
Definition: SymbolList.h:280
EdSymbolList & operator=(const SymbolList &list)
The generic assignment operator.
Definition: SymbolList.cpp:249
virtual size_t size() const
Get the number of elements in the list.
Definition: SymbolList.h:350
virtual void removeSymbolListListener(SymbolListListener *listener)
Definition: SymbolList.h:661
virtual const Alphabet * getAlphabet() const =0
Get the alphabet associated to the list.
virtual int & operator[](size_t i)
Operator [] overloaded for quick access to a character in list.
Definition: SymbolList.h:382
void fireBeforeSequenceDeleted(const SymbolListDeletionEvent &event)
Definition: SymbolList.h:706
void fireBeforeSequenceChanged(const SymbolListEditionEvent &event)
Definition: SymbolList.h:678
virtual bool isRemovable() const =0
virtual size_t size() const =0
Get the number of elements in the list.
virtual const std::vector< int > & getContent() const =0
Get the whole content of the list as a vector of int.
void fireBeforeSequenceSubstituted(const SymbolListSubstitutionEvent &event)
Definition: SymbolList.h:720
void fireBeforeSequenceInserted(const SymbolListInsertionEvent &event)
Definition: SymbolList.h:692
virtual std::string toString() const
Convert the list as a string.
Definition: SymbolList.cpp:114
virtual void beforeSequenceDeleted(const SymbolListDeletionEvent &event)=0
virtual std::string toString() const =0
Convert the list as a string.
An alphabet exception thrown when trying to specify a bad int to the alphabet.
virtual const Alphabet * getAlphabet() const
Get the alphabet associated to the list.
Definition: SymbolList.h:348
virtual void afterSequenceSubstituted(const SymbolListSubstitutionEvent &event)=0
A event-driven SymbolList object.
Definition: SymbolList.h:500
BasicSymbolList * clone() const
Definition: SymbolList.h:340
virtual const SymbolListListener & getListener(size_t i) const
Definition: SymbolList.h:647
virtual size_t size() const
Get the number of elements in the list.
Definition: SymbolList.h:601
virtual void beforeSequenceChanged(const SymbolListEditionEvent &event)=0
const Alphabet * alphabet_
The Alphabet attribute must be initialized in constructor and then can never be changed.
Definition: SymbolList.h:510
void fireAfterSequenceDeleted(const SymbolListDeletionEvent &event)
Definition: SymbolList.h:713
virtual void setElement(size_t pos, const std::string &c)
Set the element at position &#39;pos&#39; to character &#39;c&#39;.
Definition: SymbolList.cpp:136
virtual void deleteElement(size_t pos)
Delete the element at position &#39;pos&#39;.
Definition: SymbolList.cpp:163
virtual const int & operator[](size_t i) const
Operator [] overloaded for quick access to a character in list.
Definition: SymbolList.h:631
virtual void addElement(const std::string &c)
Add a character to the end of the list.
Definition: SymbolList.cpp:321
SymbolListSubstitutionEvent(SymbolList *list, size_t begin, size_t end)
Definition: SymbolList.h:456
void propagateEvents(bool yn)
Definition: SymbolList.h:736
virtual size_t getPosition() const
Definition: SymbolList.h:426
void fireAfterSequenceInserted(const SymbolListInsertionEvent &event)
Definition: SymbolList.h:699
BasicSymbolList(const Alphabet *alpha)
Build a new void BasicSymbolList object with the specified alphabet.
Definition: SymbolList.h:288