Changeset 3152 in Sophya
- Timestamp:
- Jan 19, 2007, 4:54:31 PM (19 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/parradapter.cc
r2615 r3152 41 41 // double X(int i) 42 42 // Retourne l'abcisse de l'element "i" 43 // int DecodeOptionString(vector<string> & opt, bool rmdecopt=true) 44 // Effectue le décodage des options du traceur à partir de "opt". Si "rmdecopt==true" 45 // les options décodées sont supprimées du vecteur "opt". 46 // Retourne le nombre d'options décodées. 47 // L'implémentation par défaut ne fait rien. Cette méthode est appelée par les drawers 48 // utilisant l'objet. 49 // int OptionToString(vector<string> & opt) const 50 // Méthode virtuelle qui peut être redéfinie dans les classes filles, 51 // pour fournir des chaines de caracteres décodable par *DecodeOptionString()* . 52 // Renvoie le nombre d'éléments ajoutés. 53 // L'implémentation par défaut ne fait rien. 43 54 //-- 44 55 … … 67 78 } 68 79 80 /* --Methode-- */ 81 int P1DArrayAdapter::DecodeOptionString(vector<string> & /* opt */, bool /*rmdecopt*/) 82 { 83 return 0; 84 } 85 /* --Methode-- */ 86 int P1DArrayAdapter::OptionToString(vector<string> & /*opt*/) const 87 { 88 return 0; 89 } 69 90 70 91 //++ … … 104 125 // void XYfromxy(int ix, int iy, double& x, double& y) 105 126 // Coordonnees "x,y" a partir d'indice du tableau 127 // int DecodeOptionString(vector<string> & opt, bool rmdecopt=true) 128 // Effectue le décodage des options du traceur à partir de "opt". Si "rmdecopt==true" 129 // les options décodées sont supprimées du vecteur "opt". 130 // Retourne le nombre d'options décodées. 131 // L'implémentation par défaut ne fait rien. Cette méthode est appelée par les drawers 132 // utilisant l'objet, ou par PIImage . 133 // int OptionToString(vector<string> & opt) const 134 // Méthode virtuelle qui peut être redéfinie dans les classes filles, 135 // pour fournir des chaines de caracteres décodable par *DecodeOptionString()* . 136 // Renvoie le nombre d'éléments ajoutés. 137 // L'implémentation par défaut ne fait rien. 106 138 //-- 107 139 … … 462 494 } 463 495 496 /* --Methode-- */ 497 int P2DArrayAdapter::DecodeOptionString(vector<string> & /* opt */, bool /*rmdecopt*/) 498 { 499 return 0; 500 } 501 /* --Methode-- */ 502 int P2DArrayAdapter::OptionToString(vector<string> & /*opt*/) const 503 { 504 return 0; 505 } 506 507 464 508 //++ 465 509 // Class P1DAdapter<T> -
trunk/SophyaPI/PI/parradapter.h
r2886 r3152 10 10 #include "lut.h" 11 11 12 #include <string> 13 #include <vector> 14 12 15 class P1DArrayAdapter { 13 16 public : … … 19 22 virtual void DefineXCoordinate(double x0, double dx); 20 23 virtual double X(int i); 24 25 // Methode de decodage des options - Implementation par defaut ne fait rien 26 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true); 27 // liste des options sous forme text - Implementation par defaut ne fait rien 28 virtual int OptionToString(vector<string> & opt) const; 21 29 22 30 protected : … … 81 89 int xwsz, int ywsz, unsigned char * opix, 82 90 int * oxsp, int * oysp); 91 92 // Methode de decodage des options - Implementation par defaut ne fait rien 93 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true); 94 // liste des options sous forme text - Implementation par defaut ne fait rien 95 virtual int OptionToString(vector<string> & opt) const; 96 83 97 protected : 84 98 int sX, sY; -
trunk/SophyaPI/PI/piimage.cc
r2998 r3152 523 523 vector<string> udopt; 524 524 unsigned int k = 0; 525 int ndec = opt.size(); 525 int ndec = opt.size(); 526 int optsz1 = ndec; 526 527 bool fgcmapid=false, revcmapid=false; CMapId cmapid=CMAP_COLRJ32; 527 528 bool invx = false; … … 621 622 622 623 if (rmdecopt) opt = udopt; 623 return(ndec); 624 625 // Decodage des options par le array-adapter 626 int ndec2 = 0; 627 if ( ( optsz1-ndec > 0) && (img) ) { 628 ndec2 = img->DecodeOptionString(opt, rmdecopt); 629 } 630 return(ndec+ndec2); 624 631 } 625 632 -
trunk/SophyaPI/PI/pisurfdr.cc
r2998 r3152 294 294 } 295 295 296 /* --Methode-- */ 297 int PISurfaceDrawer::DecodeOptionString(vector<string> & opt, bool rmdecopt) 298 { 299 int optsz1 = opt.size(); 300 if(optsz1<1) return(0); 301 int ndec1 = PIDrawer3D::DecodeOptionString(opt, rmdecopt); 302 if(optsz1-ndec1<1) return(ndec1); // si tout a ete decode 303 // Decodage des options par le array-adapter 304 int ndec2 = 0; 305 if ( ( optsz1-ndec1 > 0) && (mArr) ) { 306 ndec2 = mArr->DecodeOptionString(opt, rmdecopt); 307 } 308 return(ndec1+ndec2); 309 } 310 311 /* --Methode-- */ 312 int PISurfaceDrawer::OptionToString(vector<string> & opt) const 313 { 314 PIDrawer3D::OptionToString(opt); 315 if (mArr) mArr->OptionToString(opt); 316 return 1; 317 } -
trunk/SophyaPI/PI/pisurfdr.h
r2546 r3152 20 20 21 21 /* --- Juin 2004 : decodage des options mis ds PIDrawer3D 22 Jan 2007 : reactive pour decoder les options du P2DArrayAdapter* mArr --- */ 22 23 // Methode de decodage des options 23 24 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true); 24 25 virtual int OptionToString(vector<string> & opt) const; 25 26 // Texte d'aide des options disponibles 26 virtual void GetOptionsHelpInfo(string& info); 27 --------- */ 27 //-- Celui de PIDrawer3D (Juin04/Jan07) virtual void GetOptionsHelpInfo(string& info); 28 28 29 29 protected :
Note:
See TracChangeset
for help on using the changeset viewer.