Changeset 3152 in Sophya


Ignore:
Timestamp:
Jan 19, 2007, 4:54:31 PM (19 years ago)
Author:
ansari
Message:

declaration des methodes DecodeOptionString() OptionToString() au niveau des adaptateurs de tableaux PI (P1D,P2D ArrayAdapter , Reza 19/01/2007

Location:
trunk/SophyaPI/PI
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/parradapter.cc

    r2615 r3152  
    4141// double X(int i)
    4242//      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.
    4354//--
    4455
     
    6778}
    6879
     80/* --Methode-- */
     81int P1DArrayAdapter::DecodeOptionString(vector<string> & /* opt */, bool /*rmdecopt*/)
     82{
     83return 0;
     84}
     85/* --Methode-- */
     86int P1DArrayAdapter::OptionToString(vector<string> & /*opt*/) const
     87{
     88return 0;
     89}
    6990
    7091//++
     
    104125// void XYfromxy(int ix, int iy, double& x, double& y)
    105126//      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.
    106138//--
    107139
     
    462494}
    463495
     496/* --Methode-- */
     497int P2DArrayAdapter::DecodeOptionString(vector<string> & /* opt */, bool /*rmdecopt*/)
     498{
     499return 0;
     500}
     501/* --Methode-- */
     502int P2DArrayAdapter::OptionToString(vector<string> & /*opt*/) const
     503{
     504return 0;
     505}
     506
     507
    464508//++
    465509// Class        P1DAdapter<T>
  • trunk/SophyaPI/PI/parradapter.h

    r2886 r3152  
    1010#include "lut.h"
    1111
     12#include <string>
     13#include <vector>
     14
    1215class P1DArrayAdapter {
    1316public :
     
    1922  virtual void    DefineXCoordinate(double x0, double dx);
    2023  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;
    2129     
    2230protected :
     
    8189                           int xwsz, int ywsz, unsigned char * opix,
    8290                           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
    8397protected :
    8498  int sX, sY;
  • trunk/SophyaPI/PI/piimage.cc

    r2998 r3152  
    523523  vector<string> udopt;
    524524  unsigned int k = 0;
    525   int ndec = opt.size();
     525  int ndec = opt.size(); 
     526  int optsz1 = ndec;
    526527  bool fgcmapid=false, revcmapid=false; CMapId cmapid=CMAP_COLRJ32;
    527528  bool invx = false;
     
    621622
    622623  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);
    624631}
    625632
  • trunk/SophyaPI/PI/pisurfdr.cc

    r2998 r3152  
    294294}
    295295
     296/* --Methode-- */
     297int 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-- */
     312int 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  
    2020
    2121/* --- Juin 2004 : decodage des options mis ds PIDrawer3D
     22       Jan 2007 : reactive pour decoder les options du P2DArrayAdapter* mArr  ---  */
    2223//   Methode de decodage des options
    2324  virtual int        DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
    2425  virtual int        OptionToString(vector<string> & opt) const;
    2526//   Texte d'aide des options disponibles
    26   virtual void       GetOptionsHelpInfo(string& info);
    27   ---------     */
     27//-- Celui de PIDrawer3D (Juin04/Jan07)  virtual void       GetOptionsHelpInfo(string& info);
    2828
    2929protected :
Note: See TracChangeset for help on using the changeset viewer.