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

w.h

00001 /* libIXAml - IXA Taldea */
00002 
00003 #ifndef _W_H
00004 #define _W_H
00005 
00006 #include "m.h"
00007 #include "wid.h"
00008 #include "wtype.h"
00009 #include "offset.h"
00010 #include "xmlsimplestruct.h"
00011 #include <string>
00012 #include <list>
00013 
00017 typedef enum WStatus {
00018   LIBIXAML_W_ENABLED    = 0,       
00019   LIBIXAML_W_DISABLED   = 1,       
00020   LIBIXAML_W_DUBIOUS    = 2,       
00021 };
00022 
00023 
00029 class W {
00030   WId            id;            
00031   std::string    value;         
00032   Offset         from;          
00033   Offset         to;            
00034   WType          type;          
00035   std::string    target;        
00036   std::string    rend;          
00037   std::list<M>   parts;         
00038   std::string    orig;          
00039   WStatus        status;
00040   bool           targetSynced;
00041   bool           edited;
00042   
00043 
00044 public:
00045 
00047   W();
00048   
00055   W(const WId & id, const std::string & value, const Offset & from, const Offset & to);
00056   
00064   W(const WId & id, const std::string & value, const Offset & from, const Offset & to, const WType & type);
00065 
00077   W(const WId & id, const std::string & value, const Offset & from, const Offset & to, const WType & type, const std::string & target, const std::string & rend, const std::list<M> & parts, const std::string & ori);
00078   
00093   W(const WId & id, const std::string & value, const Offset & from, const Offset & to, const WType & type, const std::string & target, const std::string & rend, const std::list<M> & parts, const std::string & ori, const WStatus & sts, const bool & snc, const bool & edt);
00094   
00099   W&   operator  =(const W & w);
00100 
00105   bool operator==(const W & w) const;
00106 
00111   bool operator !=(const W & w) const;
00112 
00117   bool operator < (const W & w) const;
00118 
00122   bool           hasType() const;
00123   
00127   WId            getId() const;
00128   
00132   std::string    getValue() const;
00133   
00137   Offset         getFrom() const;
00138   
00142   Offset         getTo() const;
00143   
00147   WType          getType() const;
00148   
00152   std::string    getTarget() const;
00153 
00157   std::string    getRend() const;
00158 
00162   std::list<M>   getParts() const;
00163 
00167   std::string    getOrig() const;
00168 
00172   WStatus        getStatus() const;
00173 
00177   bool           getTargetSynced() const;
00178 
00182   bool           getEdited() const;
00183   
00187   void putId(const WId & id);
00188 
00192   void putValue(const std::string & value);
00193 
00197   void putFrom(const Offset & from);
00198   
00202   void putTo(const Offset & to);
00203 
00207   void putType(const WType & type);
00208 
00212   void putTarget(const std::string & tar);
00213 
00217   void putRend(const std::string & ren);
00218 
00222   void putParts(const std::list<M> & par);
00223 
00227   void addPart(const M & p);
00228 
00232   void putOrig(const std::string & ori);
00233 
00237   void putStatus(WStatus sts);
00238 
00242   void putTargetSynced(bool snc);
00243 
00247   void putEdited(bool edt);
00248 
00254   XMLSimpleNode* toXML_Xptr(XMLSimpleStruct* xmlstruct , std::string docRef) const;
00255 
00260   XMLSimpleNode* toXML_W(XMLSimpleStruct* xmlstruct) const;
00261 
00266   void init(XMLSimpleNode* xptrItem,XMLSimpleNode* wItem) throw (char*);
00267 
00268                                                  
00269 };
00270 
00271 #endif //_W_H
00272 

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