Main Page | Class Hierarchy | Class List | File List | Class Members

wl.h

00001 /* libIXAml - IXA Taldea */
00002 
00003 #ifndef _WL_H
00004 #define _WL_H
00005 
00006 #include "w.h"
00007 #include "xmlsimplestruct.h"
00008 #include <vector>
00009 #include <string>
00010 
00015 class WL {
00016   std::vector <W> wV;                  //W lista duen bektorea
00017   unsigned int ind;                 // Hasierakoa() zein posizio erakutsi
00018   bool showDisabled;                   // desaktibatutako tokenak erakutsi
00019   
00020   void printErrorea(const char* msg, XMLSimpleNode*, XMLSimpleNode*) const;  // Funtzio laguntzailea 
00021 
00022 public:
00023 
00025   WL();
00026   
00030   WL( const WL & wl );
00031 
00035   WL operator =( const WL & wl);
00036   
00037   friend class WXMLDoc;
00038 
00041   void begin();
00042   
00045   void next();    
00046   
00049   void previous();
00050 
00054   void add(const W & w);
00055 
00059   void insert(const W & w);
00060 
00065   void insert(const W & w, unsigned int pos);
00066 
00070   void remove(const W & w);
00071   
00075   void remove(const WId & wid);
00076 
00080   void change(const W & w);
00081 
00082   //  void change(const W &, unsigned int);      // W bat aldatu
00083 
00087   W current() const;
00088 
00092   bool ready() const;
00093 
00097   unsigned int size() const;
00098 
00102   unsigned int currentPosition() const;
00103 
00107   W get(const unsigned) const;
00108 
00112   W get(const WId &) const;
00113 
00117   int getPosition(const WId &) const;
00118 
00122   bool getShowDisabled() const;
00123 
00127   void putShowDisabled(bool sd);
00128   
00135   WId mergeTokens(const WId & wid1, const WId & wid2, const std::string & value);
00136 
00143    WId mergeTokens(unsigned int ind1, unsigned int ind2, const std::string & value);
00144 
00152   WId mergeTokens(const WId & wid1, const WId & wid2, const std::string & value, const std::string & target);
00153 
00161    WId mergeTokens(unsigned int ind1, unsigned int ind2, const std::string & value, const std::string & target);
00162 
00168   const std::list<W> splitToken(const WId & wid, const std::list<unsigned int> & poslst);
00169 
00175   const std::list<W> splitToken(unsigned int ind1, const std::list<unsigned int> & poslst);
00176  
00182   const std::list<W> splitToken(const WId & wid, const std::list<W> & wlst);
00183 
00189   const std::list<W> splitToken(unsigned int ind1, const std::list<W> & wlst);
00190   
00195   XMLSimpleNode* toXML(XMLSimpleStruct* xmlstruct, std::string docRef) const;
00196 
00201   void init(XMLSimpleNode* tlItem) throw (char*);
00202 
00203  protected:
00204 
00208   void forceAdd(const W & w);
00209   
00210  private:
00211 
00216   std::vector<W>::iterator getVWIterator(unsigned int pos);
00217 
00218   bool syncEnabledUp();
00219 
00220   bool syncEnabledDown();
00221   
00222 };
00223 
00224 #endif //_WL_H
00225 

Generated on Tue Sep 11 12:07:45 2007 for libIXAml by doxygen 1.3.5