You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(89) |
Mar
(219) |
Apr
(82) |
May
(33) |
Jun
(11) |
Jul
(129) |
Aug
(357) |
Sep
(34) |
Oct
(37) |
Nov
(42) |
Dec
(182) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(74) |
Mar
(196) |
Apr
(205) |
May
(109) |
Jun
(268) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <de...@us...> - 2003-07-04 13:08:00
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type In directory sc8-pr-cvs1:/tmp/cvs-serv19946/type Log Message: Directory /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type added to the repository |
|
From: <de...@us...> - 2003-07-04 13:02:47
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie
In directory sc8-pr-cvs1:/tmp/cvs-serv19150
Modified Files:
DBoite.java DGrille.java DGrilleIrreguliere.java
DGrilleReguliere.java DPoint.java DPolygone.java
DPolyligne.java DSphere.java DSurfaceComposee.java
SPointVecteur.java
Log Message:
Maj des import
Index: DBoite.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie/DBoite.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DBoite.java 18 Mar 2003 12:39:43 -0000 1.2
--- DBoite.java 4 Jul 2003 13:02:44 -0000 1.3
***************
*** 13,16 ****
--- 13,17 ----
import org.fudaa.dodico.objet.DObjet;
import org.fudaa.dodico.objet.CDodico;
+ import org.fudaa.dodico.usine.UsineHelper;
import org.fudaa.dodico.corba.objet.IObjet;
import org.fudaa.dodico.corba.usine.IUsine;
***************
*** 38,42 ****
public DBoite()
{
! IUsine u=CDodico.findUsine();
pmin_ = u.creeGeometriePoint();
pmax_ = u.creeGeometriePoint();
--- 39,43 ----
public DBoite()
{
! IUsine u=UsineHelper.findUsine();
pmin_ = u.creeGeometriePoint();
pmax_ = u.creeGeometriePoint();
***************
*** 150,154 ****
c[i] = (cmin[i] + cmax[i]) / 2.;
}
! IPoint r = CDodico.findUsine().creeGeometriePoint();
r.coordonnees(c);
return r;
--- 151,155 ----
c[i] = (cmin[i] + cmax[i]) / 2.;
}
! IPoint r = UsineHelper.findUsine().creeGeometriePoint();
r.coordonnees(c);
return r;
***************
*** 480,484 ****
rcmax[i] = Math.min(bcmax[i], tcmax[i]);
}
! IUsine u = CDodico.findUsine();
r = u.creeGeometrieBoite();
IPoint tempMax = u.creeGeometriePoint();
--- 481,485 ----
rcmax[i] = Math.min(bcmax[i], tcmax[i]);
}
! IUsine u = UsineHelper.findUsine();
r = u.creeGeometrieBoite();
IPoint tempMax = u.creeGeometriePoint();
***************
*** 539,543 ****
rcmax[i] = Math.min(bcmax[i], tcmax[i]);
}
! IUsine u = CDodico.findUsine();
r = u.creeGeometrieBoite();
IPoint tempMax = u.creeGeometriePoint();
--- 540,544 ----
rcmax[i] = Math.min(bcmax[i], tcmax[i]);
}
! IUsine u = UsineHelper.findUsine();
r = u.creeGeometrieBoite();
IPoint tempMax = u.creeGeometriePoint();
***************
*** 607,611 ****
else
{
! r = CDodico.findUsine().creeGeometrieBoite();
r.pmin(pmin_);
r.pmax(pmax_);
--- 608,612 ----
else
{
! r = UsineHelper.findUsine().creeGeometrieBoite();
r.pmin(pmin_);
r.pmax(pmax_);
Index: DGrille.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie/DGrille.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DGrille.java 18 Mar 2003 12:39:43 -0000 1.2
--- DGrille.java 4 Jul 2003 13:02:44 -0000 1.3
***************
*** 10,14 ****
package org.fudaa.dodico.geometrie;
! import org.fudaa.dodico.corba.geometrie.*;
/**
--- 10,16 ----
package org.fudaa.dodico.geometrie;
! import org.fudaa.dodico.corba.geometrie.IBoite;
! import org.fudaa.dodico.corba.geometrie.IGrilleOperations;
! import org.fudaa.dodico.corba.geometrie.IPoint;
/**
Index: DGrilleIrreguliere.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie/DGrilleIrreguliere.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DGrilleIrreguliere.java 18 Mar 2003 12:39:43 -0000 1.2
--- DGrilleIrreguliere.java 4 Jul 2003 13:02:44 -0000 1.3
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.dodico.objet.CDodico;
+ import org.fudaa.dodico.usine.UsineHelper;
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.corba.geometrie.*;
***************
*** 54,58 ****
newz[i] = ( double[] )z_[i].clone();
}
! IGrilleIrreguliere r=CDodico.findUsine().creeGeometrieGrilleIrreguliere();
r.vvz(z_);
r.vy(y_);
--- 55,59 ----
newz[i] = ( double[] )z_[i].clone();
}
! IGrilleIrreguliere r=UsineHelper.findUsine().creeGeometrieGrilleIrreguliere();
r.vvz(z_);
r.vy(y_);
***************
*** 168,172 ****
}
}
! IUsine u=CDodico.findUsine();
IBoite boite=u.creeGeometrieBoite();
IPoint pmax=u.creeGeometriePoint();
--- 169,173 ----
}
}
! IUsine u=UsineHelper.findUsine();
IBoite boite=u.creeGeometrieBoite();
IPoint pmax=u.creeGeometriePoint();
***************
*** 210,214 ****
ymoy /= x_.length * y_.length;
zmoy /= x_.length * y_.length;
! IUsine u=CDodico.findUsine();
IPoint r=u.creeGeometriePoint();
r.coordonnees( new double[] {xmoy, ymoy, zmoy});
--- 211,215 ----
ymoy /= x_.length * y_.length;
zmoy /= x_.length * y_.length;
! IUsine u=UsineHelper.findUsine();
IPoint r=u.creeGeometriePoint();
r.coordonnees( new double[] {xmoy, ymoy, zmoy});
***************
*** 386,390 ****
{
IPoint[] pts = new IPoint[x_.length * y_.length];
! IUsine u=CDodico.findUsine();
for( int j = 0; j < x_.length; j++ )
{
--- 387,391 ----
{
IPoint[] pts = new IPoint[x_.length * y_.length];
! IUsine u=UsineHelper.findUsine();
for( int j = 0; j < x_.length; j++ )
{
Index: DGrilleReguliere.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie/DGrilleReguliere.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DGrilleReguliere.java 18 Mar 2003 12:39:43 -0000 1.2
--- DGrilleReguliere.java 4 Jul 2003 13:02:44 -0000 1.3
***************
*** 10,16 ****
package org.fudaa.dodico.geometrie;
! import org.fudaa.dodico.objet.CDodico;
import org.fudaa.dodico.corba.usine.IUsine;
! import org.fudaa.dodico.corba.geometrie.*;
/**
--- 10,19 ----
package org.fudaa.dodico.geometrie;
! import org.fudaa.dodico.corba.geometrie.IBoite;
! import org.fudaa.dodico.corba.geometrie.IGrilleReguliereOperations;
! import org.fudaa.dodico.corba.geometrie.IPoint;
import org.fudaa.dodico.corba.usine.IUsine;
! import org.fudaa.dodico.objet.CDodico;
! import org.fudaa.dodico.usine.UsineHelper;
/**
***************
*** 127,131 ****
}
}
! IUsine u = CDodico.findUsine();
IBoite boite = u.creeGeometrieBoite();
IPoint pmax = u.creeGeometriePoint();
--- 130,134 ----
}
}
! IUsine u = UsineHelper.findUsine();
IBoite boite = u.creeGeometrieBoite();
IPoint pmax = u.creeGeometriePoint();
***************
*** 157,161 ****
}
zmoy /= nbX_ * nbY_;
! IPoint r = CDodico.findUsine().creeGeometriePoint();
r.coordonnees( new double[]{( xmax_ - xmin_ ) / 2, ( ymax_ - ymin_ ) / 2, zmoy} );
return r;
--- 160,164 ----
}
zmoy /= nbX_ * nbY_;
! IPoint r = UsineHelper.findUsine().creeGeometriePoint();
r.coordonnees( new double[]{( xmax_ - xmin_ ) / 2, ( ymax_ - ymin_ ) / 2, zmoy} );
return r;
***************
*** 314,318 ****
double ypas = ( ymax_ - ymin_ ) / nbY_;
IPoint[] pts = new IPoint[nbX_ * nbY_];
! IUsine u = CDodico.findUsine();
for( int j = 0; j < nbX_; j++ )
{
--- 317,321 ----
double ypas = ( ymax_ - ymin_ ) / nbY_;
IPoint[] pts = new IPoint[nbX_ * nbY_];
! IUsine u = UsineHelper.findUsine();
for( int j = 0; j < nbX_; j++ )
{
Index: DPoint.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie/DPoint.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DPoint.java 18 Mar 2003 12:39:43 -0000 1.2
--- DPoint.java 4 Jul 2003 13:02:44 -0000 1.3
***************
*** 10,14 ****
package org.fudaa.dodico.geometrie;
! import org.fudaa.dodico.corba.geometrie.*;
/**
--- 10,17 ----
package org.fudaa.dodico.geometrie;
! import org.fudaa.dodico.corba.geometrie.IBoite;
! import org.fudaa.dodico.corba.geometrie.IPoint;
! import org.fudaa.dodico.corba.geometrie.IPointHelper;
! import org.fudaa.dodico.corba.geometrie.IPointOperations;
/**
***************
*** 212,216 ****
public IPoint centreApparent()
{
! return IPointHelper.narrow( this.tie_ );
}
--- 215,219 ----
public IPoint centreApparent()
{
! return IPointHelper.narrow( tie() );
}
***************
*** 223,227 ****
public IPoint barycentre()
{
! return IPointHelper.narrow( this.tie_ );
}
--- 226,230 ----
public IPoint barycentre()
{
! return IPointHelper.narrow( tie() );
}
Index: DPolygone.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie/DPolygone.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DPolygone.java 18 Mar 2003 12:39:43 -0000 1.2
--- DPolygone.java 4 Jul 2003 13:02:44 -0000 1.3
***************
*** 10,16 ****
package org.fudaa.dodico.geometrie;
! import org.fudaa.dodico.objet.CDodico;
import org.fudaa.dodico.corba.objet.IObjet;
! import org.fudaa.dodico.corba.geometrie.*;
/**
--- 10,22 ----
package org.fudaa.dodico.geometrie;
! import org.fudaa.dodico.corba.geometrie.IBoite;
! import org.fudaa.dodico.corba.geometrie.IPoint;
! import org.fudaa.dodico.corba.geometrie.IPolygone;
! import org.fudaa.dodico.corba.geometrie.IPolygoneHelper;
! import org.fudaa.dodico.corba.geometrie.IPolygoneOperations;
! import org.fudaa.dodico.corba.geometrie.IPolyligne;
import org.fudaa.dodico.corba.objet.IObjet;
! import org.fudaa.dodico.objet.CDodico;
! import org.fudaa.dodico.usine.UsineHelper;
/**
***************
*** 34,38 ****
public DPolygone()
{
! sommets_ = CDodico.findUsine().creeGeometriePolyligne();
}
--- 40,44 ----
public DPolygone()
{
! sommets_ = UsineHelper.findUsine().creeGeometriePolyligne();
}
Index: DPolyligne.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie/DPolyligne.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DPolyligne.java 18 Mar 2003 12:39:43 -0000 1.2
--- DPolyligne.java 4 Jul 2003 13:02:44 -0000 1.3
***************
*** 10,18 ****
package org.fudaa.dodico.geometrie;
! import org.fudaa.dodico.corba.objet.IObjet;
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.objet.CDodico;
! import org.fudaa.dodico.corba.geometrie.*;
! import org.fudaa.dodico.corba.collection.ITableau;
/**
--- 10,21 ----
package org.fudaa.dodico.geometrie;
! import org.fudaa.dodico.corba.collection.ITableau;
! import org.fudaa.dodico.corba.geometrie.IBoite;
! import org.fudaa.dodico.corba.geometrie.IPoint;
! import org.fudaa.dodico.corba.geometrie.IPointHelper;
! import org.fudaa.dodico.corba.geometrie.IPolyligneOperations;
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.objet.CDodico;
! import org.fudaa.dodico.usine.UsineHelper;
/**
***************
*** 34,38 ****
public DPolyligne()
{
! points_ = CDodico.findUsine().creeCollectionTableau();
}
--- 37,41 ----
public DPolyligne()
{
! points_ = UsineHelper.findUsine().creeCollectionTableau();
}
***************
*** 124,128 ****
{
points_.vide();
! IUsine u=CDodico.findUsine();
for( int i = 0; i < _r.length; i++ )
{
--- 127,131 ----
{
points_.vide();
! IUsine u=UsineHelper.findUsine();
for( int i = 0; i < _r.length; i++ )
{
***************
*** 162,166 ****
{
IPoint p0 = point( 0 );
! r = CDodico.findUsine().creeGeometrieBoite();
r.pmin(p0);
r.pmax(p0);
--- 165,169 ----
{
IPoint p0 = point( 0 );
! r = UsineHelper.findUsine().creeGeometrieBoite();
r.pmin(p0);
r.pmax(p0);
***************
*** 203,207 ****
}
! r =CDodico.findUsine().creeGeometriePoint();
r.coordonnees(c);
}
--- 206,210 ----
}
! r =UsineHelper.findUsine().creeGeometriePoint();
r.coordonnees(c);
}
***************
*** 235,239 ****
c[i] /= ( double )l;
}
! r =CDodico.findUsine().creeGeometriePoint();
r.coordonnees(c);
}
--- 238,242 ----
c[i] /= ( double )l;
}
! r =UsineHelper.findUsine().creeGeometriePoint();
r.coordonnees(c);
}
Index: DSphere.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie/DSphere.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DSphere.java 18 Mar 2003 12:39:43 -0000 1.2
--- DSphere.java 4 Jul 2003 13:02:44 -0000 1.3
***************
*** 14,17 ****
--- 14,18 ----
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.objet.CDodico;
+ import org.fudaa.dodico.usine.UsineHelper;
/**
***************
*** 41,45 ****
public DSphere()
{
! centre_ = CDodico.findUsine().creeGeometriePoint();
rayon_ = 0.0;
}
--- 42,46 ----
public DSphere()
{
! centre_ = UsineHelper.findUsine().creeGeometriePoint();
rayon_ = 0.0;
}
***************
*** 110,114 ****
// REM: faire une methode d'acces indicee a un IPoint
double[] cen = centre_.coordonnees();
! IUsine u=CDodico.findUsine();
IBoite boite=u.creeGeometrieBoite();
IPoint pmax=u.creeGeometriePoint();
--- 111,115 ----
// REM: faire une methode d'acces indicee a un IPoint
double[] cen = centre_.coordonnees();
! IUsine u=UsineHelper.findUsine();
IBoite boite=u.creeGeometrieBoite();
IPoint pmax=u.creeGeometriePoint();
Index: DSurfaceComposee.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie/DSurfaceComposee.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DSurfaceComposee.java 18 Mar 2003 12:39:43 -0000 1.2
--- DSurfaceComposee.java 4 Jul 2003 13:02:44 -0000 1.3
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.dodico.objet.CDodico;
+ import org.fudaa.dodico.usine.UsineHelper;
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.corba.objet.IObjet;
***************
*** 39,43 ****
public DSurfaceComposee()
{
! IUsine u = CDodico.findUsine();
positives_ = u.creeCollectionTableau();
negatives_ = u.creeCollectionTableau();
--- 40,44 ----
public DSurfaceComposee()
{
! IUsine u = UsineHelper.findUsine();
positives_ = u.creeCollectionTableau();
negatives_ = u.creeCollectionTableau();
Index: SPointVecteur.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/geometrie/SPointVecteur.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SPointVecteur.java 18 Mar 2003 12:39:43 -0000 1.2
--- SPointVecteur.java 4 Jul 2003 13:02:44 -0000 1.3
***************
*** 11,16 ****
! import java.io.*;
! import java.util.*;
import org.fudaa.dodico.corba.geometrie.SPoint;
--- 11,16 ----
! import java.io.Serializable;
! import java.util.NoSuchElementException;
import org.fudaa.dodico.corba.geometrie.SPoint;
|
|
From: <de...@us...> - 2003-07-04 12:47:17
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran
In directory sc8-pr-cvs1:/tmp/cvs-serv17151
Modified Files:
FortranBinaryInputStream.java FortranBinaryOutputStream.java
FortranReader.java FortranWriter.java
NativeBinaryInputStream.java NativeBinaryOutputStream.java
Added Files:
FortranInterface.java FortranLib.java
Log Message:
Permet de considerer les FortranWriter et FortranReader sous une seule
interface : utile pour la gestion de la fermeture des flux.
--- NEW FILE: FortranInterface.java ---
/*
* @file FortranInterface.java
* @creation 8 juin 2003
* @modification $Date: 2003/07/04 12:47:13 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fortran;
import java.io.IOException;
/**
* @author fred deniger
* @version $Id: FortranInterface.java,v 1.1 2003/07/04 12:47:13 deniger Exp $
*
*/
public interface FortranInterface
{
public void close() throws IOException;
}
--- NEW FILE: FortranLib.java ---
/*
* @file FortranLib.java
* @creation 8 juin 2003
* @modification $Date: 2003/07/04 12:47:13 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fortran;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import org.fudaa.dodico.commun.DodicoLib;
/**
* @author fred deniger
* @version $Id: FortranLib.java,v 1.1 2003/07/04 12:47:13 deniger Exp $
*
*/
public class FortranLib
{
/**
* Methode statique permettant de fermer plusieurs readers.
* Renvoie dans l'ordre respectif les exceptions levees.
* @return null si aucune exception.
*/
public final static String close(FortranInterface[] _r)
{
StringBuffer b=new StringBuffer();
int l= _r.length;
FortranReader t;
String s;
for (int i= 0; i < l; i++)
{
s= FortranLib.closeState(_r[i]);
if (s != null)
{
if(b.length()>0) b.append(DodicoLib.LINE_SEP);
b.append(s);
}
}
return b.length()==0?null:b.toString();
}
public final static IOException close(FortranInterface _r)
{
IOException envoie= null;
try
{
_r.close();
}
//Si echoue,on modifie l'exception envoie.
catch (IOException e)
{
envoie= e;
}
return envoie;
}
public final static String closeState(FortranInterface _r)
{
IOException r= FortranLib.close(_r);
if (r != null)
{
return "Erreur lors de la fermeture du flux."
+ DodicoLib.SEP_LINE
+ r.getMessage();
}
else
return null;
}
public final static FortranInterface getFortranInterface(final OutputStream _r)
{
return new FortranInterface()
{
public void close() throws IOException
{
_r.close();
}
};
}
public final static FortranInterface getFortranInterface(final InputStream _r)
{
return new FortranInterface()
{
public void close() throws IOException
{
_r.close();
}
};
}
public final static FortranInterface getFortranInterface(final Writer _r)
{
return new FortranInterface()
{
public void close() throws IOException
{
_r.close();
}
};
}
public final static FortranInterface getFortranInterface(final Reader _r)
{
return new FortranInterface()
{
public void close() throws IOException
{
_r.close();
}
};
}
public final static String closeState(Writer _out)
{
return closeState(getFortranInterface(_out));
}
}
Index: FortranBinaryInputStream.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranBinaryInputStream.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FortranBinaryInputStream.java 11 Apr 2003 16:08:55 -0000 1.4
--- FortranBinaryInputStream.java 4 Jul 2003 12:47:12 -0000 1.5
***************
*** 71,75 ****
* @author Bertrand Marchand
*/
! public class FortranBinaryInputStream extends NativeBinaryInputStream {
// private NativeBinaryInputStream bufStream_;
// private ByteArrayInputStream arrayStream_;
--- 71,75 ----
* @author Bertrand Marchand
*/
! public class FortranBinaryInputStream extends NativeBinaryInputStream implements FortranInterface {
// private NativeBinaryInputStream bufStream_;
// private ByteArrayInputStream arrayStream_;
Index: FortranBinaryOutputStream.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranBinaryOutputStream.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FortranBinaryOutputStream.java 11 Apr 2003 16:08:55 -0000 1.4
--- FortranBinaryOutputStream.java 4 Jul 2003 12:47:13 -0000 1.5
***************
*** 60,64 ****
* @author Bertrand Marchand
*/
! public class FortranBinaryOutputStream extends NativeBinaryOutputStream {
private NativeBinaryOutputStream bufStream_;
private ByteArrayOutputStream arrayStream_;
--- 60,65 ----
* @author Bertrand Marchand
*/
! public class FortranBinaryOutputStream extends NativeBinaryOutputStream
! implements FortranInterface{
private NativeBinaryOutputStream bufStream_;
private ByteArrayOutputStream arrayStream_;
Index: FortranReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranReader.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FortranReader.java 17 Apr 2003 17:26:17 -0000 1.6
--- FortranReader.java 4 Jul 2003 12:47:13 -0000 1.7
***************
*** 29,33 ****
* @author Guillaume Desnoix , Axel von Arnim, Bertrand Marchand
*/
! public class FortranReader
// B.M. (20/05/99) Ne pas supprimer les lignes suivantes en commentaire
// extends FilterReader
--- 29,33 ----
* @author Guillaume Desnoix , Axel von Arnim, Bertrand Marchand
*/
! public class FortranReader implements FortranInterface
// B.M. (20/05/99) Ne pas supprimer les lignes suivantes en commentaire
// extends FilterReader
***************
*** 62,66 ****
throw new RuntimeException(
DodicoLib.geti18n("Argument ne doit pas etre nul"));
! in_ = _reader;
}
--- 62,66 ----
throw new RuntimeException(
DodicoLib.geti18n("Argument ne doit pas etre nul"));
! in_= _reader;
}
***************
*** 98,102 ****
public String readLine() throws EOFException, IOException
{
! line = in_.readLine();
if (line == null)
throw new EOFException();
--- 98,102 ----
public String readLine() throws EOFException, IOException
{
! line= in_.readLine();
if (line == null)
throw new EOFException();
***************
*** 144,148 ****
public void setBlankZero(boolean _state)
{
! blankIsZero = _state;
}
--- 144,148 ----
public void setBlankZero(boolean _state)
{
! blankIsZero= _state;
}
***************
*** 156,160 ****
public void setCommentInOneField(String _c)
{
! commentChar_ = _c;
}
--- 156,160 ----
public void setCommentInOneField(String _c)
{
! commentChar_= _c;
}
***************
*** 174,178 ****
}
*/
!
/**
* Analyse la ligne courante selon le format passe en parametre.
--- 174,178 ----
}
*/
!
/**
* Analyse la ligne courante selon le format passe en parametre.
***************
*** 182,186 ****
public void analyzeCurrentLine(int[] _fmt) throws IOException, EOFException
{
! fields = null;
if (_fmt != null)
--- 182,186 ----
public void analyzeCurrentLine(int[] _fmt) throws IOException, EOFException
{
! fields= null;
if (_fmt != null)
***************
*** 188,195 ****
int i, j, l;
! l = _fmt.length;
! fields = new String[l];
! j = 0;
! int lineLength = line.length();
int begin;
int end;
--- 188,195 ----
int i, j, l;
! l= _fmt.length;
! fields= new String[l];
! j= 0;
! int lineLength= line.length();
int begin;
int end;
***************
*** 199,213 ****
StringBuffer tempS;
! for (i = 0; i < l; i++)
{
! fmti = _fmt[i];
//begin=Math.min(j, lineLength);
! begin = j < lineLength ? j : lineLength;
//end=Math.min(j + _fmt[i], lineLength);
! temp = j + fmti;
! end = temp < lineLength ? temp : lineLength;
! cars = new char[end - begin];
line.getChars(begin, end, cars, 0);
! tempS = new StringBuffer(fmti);
tempS.append(cars);
// MODIF AXEL
--- 199,213 ----
StringBuffer tempS;
! for (i= 0; i < l; i++)
{
! fmti= _fmt[i];
//begin=Math.min(j, lineLength);
! begin= j < lineLength ? j : lineLength;
//end=Math.min(j + _fmt[i], lineLength);
! temp= j + fmti;
! end= temp < lineLength ? temp : lineLength;
! cars= new char[end - begin];
line.getChars(begin, end, cars, 0);
! tempS= new StringBuffer(fmti);
tempS.append(cars);
// MODIF AXEL
***************
*** 222,226 ****
while (tempS.length() < fmti)
tempS.append(" ");
! fields[i] = tempS.toString();
j += fmti;
--- 222,226 ----
while (tempS.length() < fmti)
tempS.append(" ");
! fields[i]= tempS.toString();
j += fmti;
***************
*** 291,295 ****
if (line.startsWith(commentChar_))
{
! fields = new String[] { line };
return;
}
--- 291,295 ----
if (line.startsWith(commentChar_))
{
! fields= new String[] { line };
return;
}
***************
*** 297,310 ****
int i;
! fields = null;
! int fieldBegin = -1;
! int fieldEnd = -1;
! boolean fieldQuote = false;
! char[] c = line.toCharArray();
! int staille = c.length;
! Vector v = new Vector(21);
! for (i = 0; i < staille; i++)
{
// Hors d'un champ
--- 297,310 ----
int i;
! fields= null;
! int fieldBegin= -1;
! int fieldEnd= -1;
! boolean fieldQuote= false;
! char[] c= line.toCharArray();
! int staille= c.length;
! Vector v= new Vector(21);
! for (i= 0; i < staille; i++)
{
// Hors d'un champ
***************
*** 313,322 ****
if (c[i] == '\'')
{
! fieldQuote = true;
! fieldBegin = i;
}
else if (c[i] != ' ' && c[i] != '\t')
{
! fieldBegin = i;
}
}
--- 313,322 ----
if (c[i] == '\'')
{
! fieldQuote= true;
! fieldBegin= i;
}
else if (c[i] != ' ' && c[i] != '\t')
{
! fieldBegin= i;
}
}
***************
*** 329,334 ****
if ((i + 1 == staille) || (c[i + 1] != '\''))
{
! fieldEnd = i + 1;
! fieldQuote = false;
}
--- 329,334 ----
if ((i + 1 == staille) || (c[i + 1] != '\''))
{
! fieldEnd= i + 1;
! fieldQuote= false;
}
***************
*** 338,342 ****
if ((c[i] == ' ') || (c[i] == '\t'))
{
! fieldEnd = i;
}
}
--- 338,342 ----
if ((c[i] == ' ') || (c[i] == '\t'))
{
! fieldEnd= i;
}
}
***************
*** 345,350 ****
{
v.addElement(line.substring(fieldBegin, fieldEnd));
! fieldBegin = -1;
! fieldEnd = -1;
}
}
--- 345,350 ----
{
v.addElement(line.substring(fieldBegin, fieldEnd));
! fieldBegin= -1;
! fieldEnd= -1;
}
}
***************
*** 357,361 ****
"erreur sur le champ " + line.substring(fieldBegin, staille));
! fields = new String[v.size()];
v.toArray(fields);
}
--- 357,361 ----
"erreur sur le champ " + line.substring(fieldBegin, staille));
! fields= new String[v.size()];
v.toArray(fields);
}
***************
*** 372,387 ****
int i, l;
! fields = null;
! String s = clearSpaces(line) + ' ';
! int fieldBegin = -1;
! int fieldEnd = -1;
! boolean fieldQuote = false;
! char[] c = s.toCharArray();
! int staille = c.length;
! Vector v = new Vector(21);
// for(i=0; i<s.length(); i++)
! for (i = 0; i < staille; i++)
{
// Hors d'un champ
--- 372,387 ----
int i, l;
! fields= null;
! String s= clearSpaces(line) + ' ';
! int fieldBegin= -1;
! int fieldEnd= -1;
! boolean fieldQuote= false;
! char[] c= s.toCharArray();
! int staille= c.length;
! Vector v= new Vector(21);
// for(i=0; i<s.length(); i++)
! for (i= 0; i < staille; i++)
{
// Hors d'un champ
***************
*** 390,399 ****
if (c[i] == '\'')
{
! fieldQuote = true;
! fieldBegin = i;
}
else if (c[i] != ' ' && c[i] != '\t')
{
! fieldBegin = i;
}
}
--- 390,399 ----
if (c[i] == '\'')
{
! fieldQuote= true;
! fieldBegin= i;
}
else if (c[i] != ' ' && c[i] != '\t')
{
! fieldBegin= i;
}
}
***************
*** 405,410 ****
if ((i + 1 < staille) && (c[i] == '\'') && (c[i + 1] != '\''))
{
! fieldEnd = i + 1;
! fieldQuote = false;
}
--- 405,410 ----
if ((i + 1 < staille) && (c[i] == '\'') && (c[i + 1] != '\''))
{
! fieldEnd= i + 1;
! fieldQuote= false;
}
***************
*** 414,418 ****
if (c[i] == ' ' || c[i] == '\t')
{
! fieldEnd = i;
}
}
--- 414,418 ----
if (c[i] == ' ' || c[i] == '\t')
{
! fieldEnd= i;
}
}
***************
*** 420,434 ****
if (fieldEnd != -1)
{
! String stemp = s.substring(fieldBegin, fieldEnd);
v.addElement(stemp);
! fieldBegin = -1;
! fieldEnd = -1;
}
}
}
! l = v.size();
! fields = new String[l];
! for (i = 0; i < l; i++)
! fields[i] = (String) v.elementAt(i);
}
--- 420,434 ----
if (fieldEnd != -1)
{
! String stemp= s.substring(fieldBegin, fieldEnd);
v.addElement(stemp);
! fieldBegin= -1;
! fieldEnd= -1;
}
}
}
! l= v.size();
! fields= new String[l];
! for (i= 0; i < l; i++)
! fields[i]= (String) v.elementAt(i);
}
***************
*** 463,474 ****
public double doubleField(int _i)
{
! double r = 0.;
if ((fields != null) && (_i < fields.length))
{
// r=(new Double(clearSpaces(fields[_i]))).doubleValue();
// String s=clearSpaces(fields[_i]);
! String s = fields[_i].trim();
if (!blankIsZero || s.length() != 0)
! r = Double.parseDouble(s);
}
return r;
--- 463,474 ----
public double doubleField(int _i)
{
! double r= 0.;
if ((fields != null) && (_i < fields.length))
{
// r=(new Double(clearSpaces(fields[_i]))).doubleValue();
// String s=clearSpaces(fields[_i]);
! String s= fields[_i].trim();
if (!blankIsZero || s.length() != 0)
! r= Double.parseDouble(s);
}
return r;
***************
*** 491,501 ****
public int intField(int _i)
{
! int r = 0;
if ((fields != null) && (_i < fields.length))
{
// r=(new Integer(clearSpaces(fields[_i]))).intValue();
! String s = clearSpaces(fields[_i]);
if (!blankIsZero || s.length() != 0)
! r = Integer.parseInt(s);
}
return r;
--- 491,501 ----
public int intField(int _i)
{
! int r= 0;
if ((fields != null) && (_i < fields.length))
{
// r=(new Integer(clearSpaces(fields[_i]))).intValue();
! String s= clearSpaces(fields[_i]);
if (!blankIsZero || s.length() != 0)
! r= Integer.parseInt(s);
}
return r;
***************
*** 510,522 ****
public String stringField(int _i)
{
! String r = "";
if ((fields != null) && (_i < fields.length))
! r = clearSpaces(fields[_i]);
if (r.length() >= 2)
{
! char c = r.charAt(0);
if ((c == '\'' || c == '\"') && (c == r.charAt(r.length() - 1)))
! r = r.substring(1, r.length() - 1);
}
--- 510,522 ----
public String stringField(int _i)
{
! String r= "";
if ((fields != null) && (_i < fields.length))
! r= clearSpaces(fields[_i]);
if (r.length() >= 2)
{
! char c= r.charAt(0);
if ((c == '\'' || c == '\"') && (c == r.charAt(r.length() - 1)))
! r= r.substring(1, r.length() - 1);
}
***************
*** 540,590 ****
public void setJumpBlankLine(boolean jumpBlankLine)
{
! jumpBlankLine_ = jumpBlankLine;
! }
!
! /**
! * Methode statique permettant de fermer plusieurs readers.
! * Renvoie dans l'ordre respectif les exceptions levees.
! * @return null si aucune exception.
! */
! public final static IOException[] close(FortranReader[] _r)
! {
! IOException[] envoie = null;
! boolean exceptionLauch = false;
! int l = _r.length;
! FortranReader t;
! envoie = new IOException[l];
! for (int i = 0; i < l; i++)
! {
! envoie[i] = close(_r[i]);
! if (envoie[i] != null)
! {
! exceptionLauch = true;
! }
! }
! if (exceptionLauch)
! {
! return envoie;
! }
! else
! return null;
}
- public final static IOException close(FortranReader _r)
- {
- IOException envoie = null;
-
- try
- {
- _r.close();
- }
- //Si echoue,on modifie l'exception envoie.
- catch (IOException e)
- {
- envoie = e;
- }
- return envoie;
- }
}
--- 540,547 ----
public void setJumpBlankLine(boolean jumpBlankLine)
{
! jumpBlankLine_= jumpBlankLine;
}
}
Index: FortranWriter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranWriter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** FortranWriter.java 18 Mar 2003 11:09:39 -0000 1.3
--- FortranWriter.java 4 Jul 2003 12:47:13 -0000 1.4
***************
*** 25,29 ****
* @author Guillaume Desnoix , Bertrand Marchand
*/
! public class FortranWriter
// extends PrintWriter
{
--- 25,29 ----
* @author Guillaume Desnoix , Bertrand Marchand
*/
! public class FortranWriter implements FortranInterface
// extends PrintWriter
{
***************
*** 67,70 ****
--- 67,72 ----
out_.close();
}
+
+
public void flush()
***************
*** 443,485 ****
}
! /**
! * Methode statique permettant de fermer plusieurs readers.
! * Renvoie dans l'ordre respectif les exceptions levees.
! * @return null si aucune exception.
! */
! public final static IOException[] close(FortranWriter[] _r)
! {
! IOException[] envoie = null;
! boolean exceptionLauch = false;
! if (_r != null)
! {
! int l = _r.length;
! FortranWriter t;
! envoie = new IOException[l];
! for (int i = 0; i < l; i++)
! {
! t = _r[i];
! //ferme un flux
! if (t != null)
! {
! try
! {
! t.close();
! }
! //Si echoue,on modifie l'exception envoie.
! catch( IOException e)
! {
! exceptionLauch=true;
! envoie[i]=e;
! }
! }
! }
! }
! if (exceptionLauch)
! {
! return envoie;
! }
! else
! return null;
! }
}
--- 445,448 ----
}
!
}
Index: NativeBinaryInputStream.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/NativeBinaryInputStream.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NativeBinaryInputStream.java 18 Mar 2003 11:09:38 -0000 1.3
--- NativeBinaryInputStream.java 4 Jul 2003 12:47:13 -0000 1.4
***************
*** 42,45 ****
--- 42,48 ----
private String machineType_;
+ /**
+ * L'inputStream est transforme est "habille" en BufferedInputStream.
+ */
public NativeBinaryInputStream(
InputStream _in,
***************
*** 64,70 ****
//buf=null;
setMachineType(_machine);
}
-
/**
* Lecture d'un champ chaine de caractères "<I>character</I>" Fortran
--- 67,73 ----
//buf=null;
setMachineType(_machine);
+ buf=new byte[8];
}
/**
* Lecture d'un champ chaine de caractères "<I>character</I>" Fortran
***************
*** 74,78 ****
public String readCharacter(int _lgString) throws IOException
{
! byte[] buf = new byte[_lgString];
in_.read(buf);
return new String(buf);
--- 77,82 ----
public String readCharacter(int _lgString) throws IOException
{
! if(buf.length!=_lgString)
! buf = new byte[_lgString];
in_.read(buf);
return new String(buf);
***************
*** 98,102 ****
in_.skipBytes(_l);
}
!
/**
* Renvoie l'identifiant correspond a la machine.
--- 102,111 ----
in_.skipBytes(_l);
}
!
! public static String getLocalMachine()
! {
! return System.getProperty("os.arch");
! }
!
/**
* Renvoie l'identifiant correspond a la machine.
***************
*** 164,193 ****
public final void setMachineType(String _machine)
{
! if (isX86(_machine))
! {
! machineType_=X86;
! l1 = i1 = s1 = 0;
! l2 = i2 = s2 = 1;
! l3 = i3 = 2;
! l4 = i4 = 3;
! l5 = 4;
! l6 = 5;
! l7 = 6;
! l8 = 7;
! }
! else
! {
! machineType_=SPARC;
! l1 = 7;
! l2 = 6;
! l3 = 5;
! l4 = 4;
! l5 = i1 = 3;
! l6 = i2 = 2;
! l7 = i3 = s1 = 1;
! l8 = i4 = s2 = 0;
! }
}
!
public String getMachineType()
{
--- 173,203 ----
public final void setMachineType(String _machine)
{
! if(_machine==null) _machine=NativeBinaryInputStream.getLocalMachine();
! if (isX86(_machine))
! {
! machineType_ = X86;
! l1 = i1 = s1 = 0;
! l2 = i2 = s2 = 1;
! l3 = i3 = 2;
! l4 = i4 = 3;
! l5 = 4;
! l6 = 5;
! l7 = 6;
! l8 = 7;
! }
! else
! {
! machineType_ = SPARC;
! l1 = 7;
! l2 = 6;
! l3 = 5;
! l4 = 4;
! l5 = i1 = 3;
! l6 = i2 = 2;
! l7 = i3 = s1 = 1;
! l8 = i4 = s2 = 0;
! }
}
!
public String getMachineType()
{
***************
*** 197,200 ****
--- 207,211 ----
private long _readInt_64() throws IOException
{
+ if(buf.length!=8)
buf = new byte[8];
nbByteLus_ = in_.read(buf);
***************
*** 211,214 ****
--- 222,226 ----
public byte readInt_8() throws IOException
{
+ if(buf.length!=1)
buf = new byte[1];
nbByteLus_ = in_.read(buf);
***************
*** 218,221 ****
--- 230,234 ----
public short readUInt_8() throws IOException
{
+ if(buf.length!=1)
buf = new byte[1];
nbByteLus_ = in_.read(buf);
***************
*** 235,238 ****
--- 248,252 ----
public short readInt_16() throws IOException
{
+ if(buf.length!=2)
buf = new byte[2];
nbByteLus_ = in_.read(buf);
***************
*** 243,246 ****
--- 257,261 ----
public int readUInt_16() throws IOException
{
+ if(buf.length!=2)
buf = new byte[2];
nbByteLus_ = in_.read(buf);
***************
*** 256,259 ****
--- 271,275 ----
private int _readInt_32() throws IOException
{
+ if(buf.length!=4)
buf = new byte[4];
nbByteLus_ = in_.read(buf);
***************
*** 266,269 ****
--- 282,286 ----
public long readUInt_32() throws IOException
{
+ if(buf.length!=4)
buf = new byte[4];
nbByteLus_ = in_.read(buf);
Index: NativeBinaryOutputStream.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/NativeBinaryOutputStream.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NativeBinaryOutputStream.java 18 Mar 2003 11:09:39 -0000 1.3
--- NativeBinaryOutputStream.java 4 Jul 2003 12:47:13 -0000 1.4
***************
*** 40,43 ****
--- 40,44 ----
public void setMachineType(String _machine)
{
+ if(_machine==null) _machine=NativeBinaryInputStream.getLocalMachine();
if( NativeBinaryInputStream.isX86(_machine) ) {
machineType_=NativeBinaryInputStream.X86;
|
|
From: <de...@us...> - 2003-07-04 12:41:23
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers
In directory sc8-pr-cvs1:/tmp/cvs-serv16548
Added Files:
FileFormat.java FileOpReadCharSimpleAbstract.java
FileOpWriterCharSimpleAbstract.java FileOperationAbstract.java
FileOperationInterface.java FileOperationSynthese.java
Log Message:
Nouvelles classes gerant les io
--- NEW FILE: FileFormat.java ---
/*
* @file FileFormat.java
* @creation 12 mars 2003
* @modification $Date: 2003/07/04 12:41:19 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import com.memoire.bu.BuInformationsSoftware;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
/**
*
* @author deniger
* @version $Id: FileFormat.java,v 1.1 2003/07/04 12:41:19 deniger Exp $
*/
public abstract class FileFormat
{
public static final int MODE_ASCII = 0;
public static final int MODE_BINAIRE = 1;
//Le nombre de fichiers demandé par ce format.
private int nbFile_;
protected String[] extensions_;
protected String nom_;
protected String ID_;
protected String version_;
protected String description_;
protected int mode_;
protected BuInformationsSoftware software_;
public FileFormat(int _nbFile)
{
if (_nbFile < 1)
throw new IllegalArgumentException("Nombre de fichier strictement positif");
nbFile_ = _nbFile;
}
/**
* Returns the description.
* @return String
*/
public String getDescription()
{
return description_;
}
public String getID()
{
return ID_;
}
/**
* Returns the extensions.
* @return String[]
*/
public String[] getExtensions()
{
return extensions_;
}
/**
* Returns the mode.
* @return int
*/
public int getMode()
{
return mode_;
}
/**
* Returns the nbFile.
* @return int
*/
public final int getNbFile()
{
return nbFile_;
}
/**
* Returns the nom.
* @return String
*/
public String getName()
{
return nom_;
}
/**
* Returns the software.
* @return BuInformationsSoftware
*/
public BuInformationsSoftware getSoftware()
{
return software_;
}
/**
* Renvoie a partir du nombre de fichier et des extensions du format les fichiers
* correspondants (si le nombre de fichier est 1, fichier donne est renvoye).
*
* @return un tableau de taille getNbFile() avec les fichiers existants
* et correspondant aux extensions.
*/
public final File[] getFile(File _fInit)
{
File[] r = new File[nbFile_];
if (_fInit == null)
return r;
if (nbFile_ == 1)
return new File[] { _fInit };
String base = DodicoLib.getSansExtension(_fInit.getAbsolutePath());
for (int i = 0; i < nbFile_; i++)
{
r[i] = new File(base + "." + extensions_[i]);
}
return r;
}
public static void initOperation(
FileOperationSynthese _synt,
FileOperationInterface _op,
ProgressionInterface _progress,
File _f)
{
_op.setProgressReceiver(_progress);
_op.setFile(_f);
_synt.setMainFile(_f);
}
public static FileOperationSynthese initOperation(
FileOperationInterface _op,
ProgressionInterface _progress,
File _f)
{
FileOperationSynthese r = new FileOperationSynthese();
initOperation(r,_op,_progress,_f);
return r;
}
/**
* Methode generale permettant de lire le fichier _f et renvoie une structure
* donnant la synthese (resultat, erreur) de la lecture.
* @param _progress l'etat d'avancement de la lecture.
*/
// public final FileOperationSynthese read(File _f, ProgressionInterface _progress)
// {
// FileReaderInterface r = createReader();
// IOException[] exs = read(_f, r, _progress);
// return new FileOperationSynthese(_f, r, exs);
// }
/**
* Permet de le lire le fichier <code>_f</code>.
* @return les exceptions levees lors de la fermeture du flux.
*/
// public final IOException[] read(File _f, FileReaderInterface _r, ProgressionInterface _progress)
// {
// if (getNbFile() == 1)
// {
// _r.setFile(_f);
// _r.setProgressReceiver(_progress);
// _r.read();
// return _r.close();
// }
// else
// return read(getFile(_f), _r, _progress);
// }
//
// public static final IOException[] readFile(File _f, FileReaderInterface _reader, ProgressionInterface _progress)
// {
// _reader.setFile(_f);
// _reader.setProgressReceiver(_progress);
// _reader.read();
// return _reader.close();
// }
//
// public static final IOException[] readFile(File[] _f, FileReaderInterface _reader, ProgressionInterface _progress)
// {
// _reader.setFile(_f);
// _reader.setProgressReceiver(_progress);
// _reader.read();
// return _reader.close();
// }
//
// public final FileOperationSynthese read(File[] _f)
// {
// return read(_f, null);
// }
//
// public final IOException[] read(File[] _f, FileReaderInterface _r, ProgressionInterface _progress)
// {
// int l = _f.length;
// if (l != getNbFile())
// throw new IllegalArgumentException("Le nombre de fichier donne " + l + DodicoLib.LINE_SEP + "Nb Fichier attendu " + getNbFile());
// _r.setFile(_f);
// _r.setProgressReceiver(_progress);
// _r.read();
// return _r.close();
//
// }
//
//
// public final FileOperationSynthese read(File[] _f, ProgressionInterface _progress)
// {
// FileReaderInterface r = createReader();
// IOException[] exs = read(_f, r, _progress);
// return new FileOperationSynthese(_f, r, exs);
// }
//
// public final FileOperationSynthese write(File _f, Object _interface, ProgressionInterface _progress)
// {
// if (getNbFile() == 1)
// {
// FileWriterInterface r = createWriter();
// r.setFile(_f);
// r.setInterface(_interface);
// r.setProgressReceiver(_progress);
// r.write();
// IOException[] exs = r.close();
// return new FileOperationSynthese(_f, r, exs);
// }
// else
// return write(getFile(_f), _interface, _progress);
// }
//
// public final FileOperationSynthese write(File[] _f, Object _interface)
// {
// return write(_f, _interface, null);
// }
//
// public final FileOperationSynthese write(File[] _f, Object _interface, ProgressionInterface _progress)
// {
// int l = _f.length;
// if (l != getNbFile())
// throw new IllegalArgumentException("Le nombre de fichier donne " + l + DodicoLib.LINE_SEP + "Nb Fichier attendu " + getNbFile());
// FileWriterInterface r = createWriter();
// r.setFile(_f);
// r.setProgressReceiver(_progress);
// r.setInterface(_interface);
// r.write();
// IOException[] exs = r.close();
// return new FileOperationSynthese(_f, r, exs);
// }
//
}
--- NEW FILE: FileOpReadCharSimpleAbstract.java ---
/*
* @file TrReaderCharSimple.java
* @creation 21 mars 2003
* @modification $Date: 2003/07/04 12:41:19 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.fortran.FortranReader;
/**
*
* @author deniger
* @version $Id: FileOpReadCharSimpleAbstract.java,v 1.1 2003/07/04 12:41:19 deniger Exp $
*/
public abstract class FileOpReadCharSimpleAbstract
extends FileOperationAbstract
{
protected FortranReader in_;
public final void setFile(File _f)
{
FileReader r= null;
try
{
r= new FileReader(_f);
}
catch (FileNotFoundException _e)
{
//manageException(_e, analyze_);
}
if (r != null)
setFile(r);
}
public final void setFile(File[] _f)
{
setFile(_f[0]);
}
public final void setFile(Reader _r)
{
in_= new FortranReader(_r);
}
public final void close() throws IOException
{
in_.close();
}
protected void addAnalyzeLigneLue(DodicoAnalyze.Editor _analyze)
{
_analyze.addInfo(DodicoLib.geti18n("Ligne lue") + ": " + in_.getLine(), in_);
}
}
--- NEW FILE: FileOpWriterCharSimpleAbstract.java ---
/*
* @file TrWriterCharSimpleAbstract.java
* @creation 21 mars 2003
* @modification $Date: 2003/07/04 12:41:19 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.fortran.FortranLib;
/**
*
* @author deniger
* @version $Id: FileOpWriterCharSimpleAbstract.java,v 1.1 2003/07/04 12:41:19 deniger Exp $
*/
public abstract class FileOpWriterCharSimpleAbstract extends FileOperationAbstract
{
protected String lineSep_;
protected Writer out_;
public FileOpWriterCharSimpleAbstract()
{
lineSep_ = DodicoLib.LINE_SEP;
}
public void writeln() throws IOException
{
out_.write(lineSep_);
}
public void writeln(StringBuffer _b) throws IOException
{
write(_b.append(lineSep_));
}
public void write(StringBuffer _b) throws IOException
{
out_.write(_b.toString());
_b.setLength(0);
}
public void writeln(String _b) throws IOException
{
write(_b + lineSep_);
}
public void write(String _b) throws IOException
{
out_.write(_b);
}
/**
* Renvoie le separateur de ligne.
* @return separateur de ligne
*/
public final String getLineSeparator()
{
return lineSep_;
}
/**
* Modifie le separateur de ligne.
* @param lineSep The lineSep to set
*/
public final void setLineSeparator(String lineSep)
{
lineSep_ = lineSep;
}
public final void setFile(File _f)
{
FileWriter out = null;
try
{
out = new FileWriter(_f);
}
catch (IOException _e)
{
// manageException(_e, analyze_);
}
if (out != null)
setFile(out);
}
public final void setFile(File[] _f)
{
setFile(_f[0]);
}
public final void setFile(Writer _f)
{
out_ = _f;
}
public final void close() throws IOException
{
out_.close();
}
}
--- NEW FILE: FileOperationAbstract.java ---
/*
* @file FileOperationAbstract.java
* @creation 8 juin 2003
* @modification $Date: 2003/07/04 12:41:19 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.ProgressionInterface;
/**
* @author fred deniger
* @version $Id: FileOperationAbstract.java,v 1.1 2003/07/04 12:41:19 deniger Exp $
*
*/
public abstract class FileOperationAbstract implements FileOperationInterface
{
protected ProgressionInterface progress_;
public ProgressionInterface getProgressReceiver()
{
return progress_;
}
public void setProgressReceiver(ProgressionInterface _progressReceiver)
{
progress_= _progressReceiver;
}
protected final DodicoAnalyze.Editor[] initAnalyze(int _nb)
{
DodicoAnalyze.Editor[] analyze_= new DodicoAnalyze.Editor[_nb];
for (int i= _nb - 1; i >= 0; i--)
{
analyze_[i]= new DodicoAnalyze.Editor();
}
return analyze_;
}
public static final FileReader initFileReader(File _f)
{
FileReader r= null;
try
{
r= new FileReader(_f);
}
catch (FileNotFoundException _e)
{
//manageException(_e, analyze_[_i]);
}
return r;
}
public static final FileWriter initFileWriter(File _f)
{
FileWriter r= null;
try
{
r= new FileWriter(_f);
}
catch (IOException _e)
{
//manageException(_e, analyze_[_i]);
}
return r;
}
}
--- NEW FILE: FileOperationInterface.java ---
/*
* @file FileInterface.java
* @creation 6 juin 2003
* @modification $Date: 2003/07/04 12:41:19 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.fortran.FortranInterface;
/**
* @author deniger
* @version $Id: FileOperationInterface.java,v 1.1 2003/07/04 12:41:19 deniger Exp $
*/
public interface FileOperationInterface extends FortranInterface
{
public ProgressionInterface getProgressReceiver();
public void setProgressReceiver(ProgressionInterface progressReceiver);
public void setFile(File _f);
public FileFormat getFileFormat();
}
--- NEW FILE: FileOperationSynthese.java ---
/*
* @file TrFileReadView.java
* @creation 12 mars 2003
* @modification $Date: 2003/07/04 12:41:19 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.fortran.FortranLib;
/**
*
* @author deniger
* @version $Id: FileOperationSynthese.java,v 1.1 2003/07/04 12:41:19 deniger Exp $
*/
public class FileOperationSynthese
{
private File[] files_;
private File mainFile_;
private String exClose_;
private DodicoAnalyze analyze_;
FileOperationInterface fileOp_;
private String desc_;
private long opTime_;
/**
*
*/
public final String getDesc()
{
return desc_;
}
/**
*
*/
public final void setDesc(String _string)
{
desc_= _string;
}
/**
*
*/
public long getOpTime()
{
return opTime_;
}
/**
*
*/
public void setOpTime(long _l)
{
opTime_= _l;
}
public void initOpTime()
{
opTime_= System.currentTimeMillis();
}
public FileOperationSynthese()
{
}
public void setRessource(File[] _f)
{
files_=_f;
}
public static void initAndClose(
FileOperationSynthese _opResults,
DodicoAnalyze.Editor _analyze,
FileOperationInterface _op,
String _desc)
{
_opResults.setAnalyze(_analyze.toAnalyze());
_opResults.setFileOp(_op);
_opResults.setOpTime(System.currentTimeMillis());
_opResults.setDesc(_desc);
_opResults.setExClose(FortranLib.closeState(_op));
}
public DodicoAnalyze getAnalyze()
{
return analyze_;
}
public String getClosingException()
{
return exClose_;
}
public boolean containsFatalError()
{
return ((analyze_ != null) && (analyze_.containsFatalError()));
}
public boolean containsClosingError()
{
return exClose_ != null;
}
/**
*
*/
public boolean containsMessages()
{
return analyze_ != null;
}
/**
*
*/
public String getExClose()
{
return exClose_;
}
/**
*
*/
public File getFile()
{
return mainFile_;
}
/**
*
*/
public FileOperationInterface getFileOp()
{
return fileOp_;
}
/**
*
*/
public void setAnalyze(DodicoAnalyze _analyze)
{
analyze_= _analyze;
}
/**
*
*/
public void setExClose(String _exception)
{
exClose_= _exception;
}
/**
*
*/
public void setFileOp(FileOperationInterface _interface)
{
fileOp_= _interface;
}
/**
* @return
*/
public File[] getFiles()
{
return files_;
}
/**
* @return
*/
public File getMainFile()
{
return mainFile_;
}
/**
* @param _files
*/
public void setFiles(File[] _files)
{
files_= _files;
}
/**
* @param _file
*/
public void setMainFile(File _file)
{
mainFile_= _file;
}
}
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers
In directory sc8-pr-cvs1:/tmp/cvs-serv16109
Modified Files:
MaillageCORELEBTH.java
Removed Files:
FileReaderCharSimpleAbstract.java FileReaderInterface.java
FileReaderWriterAbstract.java
FileReaderWriterMultiAbstract.java
FileReaderWriterSimpleAbstract.java
FileWriterCharSimpleAbstract.java FileWriterInterface.java
Log Message:
Simplification des interface de lecture
Index: MaillageCORELEBTH.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/MaillageCORELEBTH.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MaillageCORELEBTH.java 18 Mar 2003 11:00:32 -0000 1.3
--- MaillageCORELEBTH.java 4 Jul 2003 12:39:45 -0000 1.4
***************
*** 14,17 ****
--- 14,18 ----
import org.fudaa.dodico.objet.*;
+ import org.fudaa.dodico.usine.UsineHelper;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.corba.usine.IUsine;
***************
*** 76,80 ****
elements=lireFichierELE(racine+eleExt,noeuds);
! IMaillage res=CDodico.findUsine().creeEfMaillage();
res.elements(elements);
return res;
--- 77,81 ----
elements=lireFichierELE(racine+eleExt,noeuds);
! IMaillage res=UsineHelper.findUsine().creeEfMaillage();
res.elements(elements);
return res;
***************
*** 260,264 ****
// Coordonnées <x>,<y>
fmt=new int[]{formatCol1,10,10};
! IUsine usine=CDodico.findUsine();
for (int i=0; i<nbNoeuds; i++) {
file.readFields(fmt);
--- 261,265 ----
// Coordonnées <x>,<y>
fmt=new int[]{formatCol1,10,10};
! IUsine usine=UsineHelper.findUsine();
for (int i=0; i<nbNoeuds; i++) {
file.readFields(fmt);
--- FileReaderCharSimpleAbstract.java DELETED ---
--- FileReaderInterface.java DELETED ---
--- FileReaderWriterAbstract.java DELETED ---
--- FileReaderWriterMultiAbstract.java DELETED ---
--- FileReaderWriterSimpleAbstract.java DELETED ---
--- FileWriterCharSimpleAbstract.java DELETED ---
--- FileWriterInterface.java DELETED ---
|
|
From: <de...@us...> - 2003-07-04 12:30:54
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/evenement In directory sc8-pr-cvs1:/tmp/cvs-serv14878 Modified Files: DObjetEventListenerSupport.java ObjetEventListener.java Log Message: Maj mineure Index: DObjetEventListenerSupport.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/evenement/DObjetEventListenerSupport.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DObjetEventListenerSupport.java 1 Apr 2003 09:33:38 -0000 1.3 --- DObjetEventListenerSupport.java 4 Jul 2003 12:30:51 -0000 1.4 *************** *** 10,18 **** package org.fudaa.dodico.evenement; ! import org.fudaa.dodico.objet.*; ! import org.fudaa.dodico.corba.objet.*; ! import org.fudaa.dodico.collection.*; ! import org.fudaa.dodico.corba.collection.*; ! import org.fudaa.dodico.corba.evenement.*; /** --- 10,16 ---- package org.fudaa.dodico.evenement; ! import org.fudaa.dodico.corba.evenement.IObjetEvent; ! import org.fudaa.dodico.corba.evenement.IObjetEventListenerSupportOperations; ! import org.fudaa.dodico.objet.DObjet; /** Index: ObjetEventListener.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/evenement/ObjetEventListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ObjetEventListener.java 1 Apr 2003 09:33:39 -0000 1.3 --- ObjetEventListener.java 4 Jul 2003 12:30:51 -0000 1.4 *************** *** 10,14 **** package org.fudaa.dodico.evenement; ! import org.fudaa.dodico.corba.evenement.*; /** --- 10,14 ---- package org.fudaa.dodico.evenement; ! import org.fudaa.dodico.corba.evenement.IObjetEvent; /** |
|
From: <de...@us...> - 2003-07-04 12:27:30
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/ef/serviceDunes
In directory sc8-pr-cvs1:/tmp/cvs-serv14705/serviceDunes
Modified Files:
Convertisseur.java DServiceDunes.java
Log Message:
Maj UsineHelper
Index: Convertisseur.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/ef/serviceDunes/Convertisseur.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Convertisseur.java 1 Apr 2003 09:37:07 -0000 1.3
--- Convertisseur.java 4 Jul 2003 12:27:27 -0000 1.4
***************
*** 10,18 ****
package org.fudaa.dodico.ef.serviceDunes;
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.objet.CDodico;
- import org.fudaa.dodico.corba.dunes.*;
- import org.fudaa.dodico.corba.ef.*;
- import org.fudaa.dodico.corba.geometrie.*;
/**
--- 10,33 ----
package org.fudaa.dodico.ef.serviceDunes;
+ import org.fudaa.dodico.corba.dunes.ICalculDunes;
+ import org.fudaa.dodico.corba.ef.IElement;
+ import org.fudaa.dodico.corba.ef.IMaillage;
+ import org.fudaa.dodico.corba.ef.INoeud;
+ import org.fudaa.dodico.corba.ef.IParametresCalcul;
+ import org.fudaa.dodico.corba.ef.IRegion;
+ import org.fudaa.dodico.corba.ef.ITrou;
+ import org.fudaa.dodico.corba.geometrie.IPoint;
+ import org.fudaa.dodico.corba.geometrie.IPointHelper;
+ import org.fudaa.dodico.corba.geometrie.IPolyligne;
+ import org.fudaa.dodico.corba.geometrie.LTypeElement;
+ import org.fudaa.dodico.corba.geometrie.SElement;
+ import org.fudaa.dodico.corba.geometrie.SMaillage;
+ import org.fudaa.dodico.corba.geometrie.SNoeud;
+ import org.fudaa.dodico.corba.geometrie.SPoint;
+ import org.fudaa.dodico.corba.geometrie.SPolyligne;
+ import org.fudaa.dodico.corba.geometrie.SRegion;
+ import org.fudaa.dodico.corba.geometrie.STrou;
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.objet.CDodico;
/**
Index: DServiceDunes.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/ef/serviceDunes/DServiceDunes.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DServiceDunes.java 1 Apr 2003 09:37:06 -0000 1.3
--- DServiceDunes.java 4 Jul 2003 12:27:27 -0000 1.4
***************
*** 18,21 ****
--- 18,22 ----
import org.fudaa.dodico.objet.*;
+ import org.fudaa.dodico.usine.UsineHelper;
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.corba.objet.*;
***************
*** 155,159 ****
points_ = new IPoint[longueur];
double[] p;
! IUsine u=CDodico.findUsine();
for(int i = longueur - 1; i >= 0; i--)
{
--- 156,160 ----
points_ = new IPoint[longueur];
double[] p;
! IUsine u=UsineHelper.findUsine();
for(int i = longueur - 1; i >= 0; i--)
{
***************
*** 336,340 ****
results.maillage(null);
! IMaillage r = Convertisseur.SMaillage2I(results.maillage(), CDodico.findUsine());
setProgression("conversion terminée", 100);
System.out.println("conversion terminée pour le service Dunes");
--- 337,341 ----
results.maillage(null);
! IMaillage r = Convertisseur.SMaillage2I(results.maillage(), UsineHelper.findUsine());
setProgression("conversion terminée", 100);
System.out.println("conversion terminée pour le service Dunes");
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io
In directory sc8-pr-cvs1:/tmp/cvs-serv14117/io
Modified Files:
DunesAdapter.java DunesFileFormat.java DunesInterface.java
DunesReader.java DunesWriter.java
Log Message:
Maj mineure
Index: DunesAdapter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesAdapter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DunesAdapter.java 18 Mar 2003 14:59:01 -0000 1.1
--- DunesAdapter.java 4 Jul 2003 12:22:19 -0000 1.2
***************
*** 11,14 ****
--- 11,16 ----
import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
+ import org.fudaa.dodico.h2d.H2dMaillage;
+
/**
*
***************
*** 19,23 ****
{
! SMaillageIndex maillage_;
double[] adaptatif_;
--- 21,25 ----
{
! H2dMaillage maillage_;
double[] adaptatif_;
***************
*** 25,29 ****
* @see org.fudaa.dodico.tr.reflux.DunesInterface#getMaillage()
*/
! public SMaillageIndex getMaillage()
{
return maillage_;
--- 27,31 ----
* @see org.fudaa.dodico.tr.reflux.DunesInterface#getMaillage()
*/
! public H2dMaillage getMaillage()
{
return maillage_;
***************
*** 51,55 ****
* @param maillage The maillage to set
*/
! public void setMaillage(SMaillageIndex maillage)
{
maillage_ = maillage;
--- 53,57 ----
* @param maillage The maillage to set
*/
! public void setMaillage(H2dMaillage maillage)
{
maillage_ = maillage;
Index: DunesFileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesFileFormat.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DunesFileFormat.java 19 May 2003 13:53:59 -0000 1.3
--- DunesFileFormat.java 4 Jul 2003 12:22:19 -0000 1.4
***************
*** 9,16 ****
package org.fudaa.dodico.dunes.io;
! import org.fudaa.dodico.fichiers.FileReaderInterface;
! import org.fudaa.dodico.fichiers.FileWriterInterface;
! import org.fudaa.dodico.h2d.H2dFileFormat;
! import org.fudaa.dodico.h2d.H2dParametres;
/**
--- 9,17 ----
package org.fudaa.dodico.dunes.io;
! import java.io.File;
!
! import org.fudaa.dodico.commun.ProgressionInterface;
! import org.fudaa.dodico.fichiers.FileFormat;
! import org.fudaa.dodico.fichiers.FileOperationSynthese;
/**
***************
*** 19,23 ****
* @version $Id$
*/
! public class DunesFileFormat extends H2dFileFormat
{
--- 20,24 ----
* @version $Id$
*/
! public class DunesFileFormat extends FileFormat
{
***************
*** 33,37 ****
private DunesFileFormat()
{
! super(NB_FILE,H2dParametres.FICHIER_GEOMETRIE);
extensions_ = new String[] { "mail" };
ID_ = "DUNES";
--- 34,38 ----
private DunesFileFormat()
{
! super(NB_FILE);
extensions_ = new String[] { "mail" };
ID_ = "DUNES";
***************
*** 42,65 ****
}
! /**
! * @see org.fudaa.dodico.tr.TrFileFormat#createReader(File[], ProgressionInterface, boolean, int)
! */
! public FileReaderInterface createReader()
{
! return new DunesReader();
}
! /**
! * @see org.fudaa.dodico.tr.TrFileFormat#createWriter(File[], Object, ProgressionInterface)
! */
! public FileWriterInterface createWriter()
{
! return new DunesWriter();
}
! public DunesKeyWord getKeyWords()
{
! return new DunesKeyWord();
}
}
--- 43,83 ----
}
!
! public DunesKeyWord getKeyWords()
{
! return new DunesKeyWord();
}
+
! public DunesKeyWord getKeywords()
{
! return new DunesKeyWord();
}
! public DunesReader createReader()
{
! return new DunesReader(this);
! }
!
! public DunesWriter createWriter()
! {
! return new DunesWriter(this);
}
+
+ public FileOperationSynthese write(File _f, DunesInterface _inter, ProgressionInterface _prog)
+ {
+ DunesWriter w = createWriter();
+ FileOperationSynthese synt = FileFormat.initOperation(w, _prog, _f);
+ w.write(_inter, synt);
+ return synt;
+ }
+
+ public DunesInterface read(File _f, FileOperationSynthese _synt,ProgressionInterface _prog)
+ {
+ DunesReader r = createReader();
+ FileFormat.initOperation(_synt, r, _prog, _f);
+ return r.read(_synt);
+ }
+
}
Index: DunesInterface.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesInterface.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DunesInterface.java 18 Mar 2003 14:59:02 -0000 1.1
--- DunesInterface.java 4 Jul 2003 12:22:19 -0000 1.2
***************
*** 11,14 ****
--- 11,16 ----
import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
+ import org.fudaa.dodico.h2d.H2dMaillage;
+
/**
*
***************
*** 22,26 ****
* Renvoie le maillage.
*/
! SMaillageIndex getMaillage();
/**
--- 24,28 ----
* Renvoie le maillage.
*/
! H2dMaillage getMaillage();
/**
Index: DunesReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesReader.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** DunesReader.java 19 May 2003 13:53:59 -0000 1.4
--- DunesReader.java 4 Jul 2003 12:22:19 -0000 1.5
***************
*** 12,21 ****
import java.io.IOException;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
import org.fudaa.dodico.corba.geometrie.SPoint;
! import org.fudaa.dodico.fichiers.FileReaderCharSimpleAbstract;
! import org.fudaa.dodico.h2d.H2dFileFormat;
import org.fudaa.dodico.h2d.H2dLib;
/**
--- 12,26 ----
import java.io.IOException;
+ import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
import org.fudaa.dodico.corba.geometrie.SPoint;
! import org.fudaa.dodico.fichiers.FileFormat;
! import org.fudaa.dodico.fichiers.FileOpReadCharSimpleAbstract;
! import org.fudaa.dodico.fichiers.FileOperationSynthese;
! import org.fudaa.dodico.h2d.H2dElement;
import org.fudaa.dodico.h2d.H2dLib;
+ import org.fudaa.dodico.h2d.H2dMaillage;
+ import org.fudaa.dodico.h2d.H2dPoint;
/**
***************
*** 25,32 ****
* @version $Id$
*/
! public class DunesReader extends FileReaderCharSimpleAbstract
{
- DunesAdapter source_;
DunesKeyWord kw_;
DunesFileFormat fileFormat_;
--- 30,36 ----
* @version $Id$
*/
! public class DunesReader extends FileOpReadCharSimpleAbstract
{
DunesKeyWord kw_;
DunesFileFormat fileFormat_;
***************
*** 46,58 ****
}
!
! public DunesInterface getDunesInterface()
{
! return source_;
}
! public void read()
{
!
in_.setJumpBlankLine(true);
try
--- 50,69 ----
}
!
! public DunesInterface read(FileOperationSynthese _operationState)
{
! DodicoAnalyze.Editor edit=new DodicoAnalyze.Editor();
! DunesInterface r=readDunes(edit);
! FileOperationSynthese.initAndClose(_operationState,edit,this,"Lecture Fichier Dunes");
! return r;
}
+
! protected DunesInterface readDunes(DodicoAnalyze.Editor _analyze)
{
! DunesAdapter source_=null;
! H2dPoint[] points=null;
! H2dElement[] elems=null;
! double[] adaptatifs=null;
in_.setJumpBlankLine(true);
try
***************
*** 64,75 ****
if ((in_.getNumberOfFields() != 1) && (!kw_.getNoeudCode().equals(in_.stringField(0))))
{
! analyze_.addError(DodicoLib.geti18n("L'identifiant") + " " + kw_.getNoeudCode() + " " + DodicoLib.geti18n("est attendu"), in_);
! return;
}
- //Le mot clef noeud est trouve, on peut creer le maillage.
- SMaillageIndex maillage = new SMaillageIndex();
- source_ = new DunesAdapter();
- source_.setMaillage(maillage);
//Lecture du nombre de noeud et format du maillage (apaptatif ou non)
--- 75,82 ----
if ((in_.getNumberOfFields() != 1) && (!kw_.getNoeudCode().equals(in_.stringField(0))))
{
! _analyze.addError(DodicoLib.geti18n("L'identifiant") + " " + kw_.getNoeudCode() + " " + DodicoLib.geti18n("est attendu"), in_);
! return null;
}
//Lecture du nombre de noeud et format du maillage (apaptatif ou non)
***************
*** 79,84 ****
if (in_.getNumberOfFields() != 2)
{
! analyze_.addError("Nombre de noeuds non trouve", in_, true);
! return;
}
//le nombre de noeud
--- 86,91 ----
if (in_.getNumberOfFields() != 2)
{
! _analyze.addFatalError(DodicoLib.geti18n("Nombre de noeuds non trouve"), in_);
! return null;
}
//le nombre de noeud
***************
*** 88,105 ****
int typeMaillage = in_.intField(1);
//Si adaptatif, on initialise le tableau stockant les valeurs.
- double[] adaptatifs = null;
if (typeMaillage == kw_.getAdaptatifCode())
{
adaptatifs = new double[nbNoeuds];
//on affecte a source le tableau.
- source_.setAdaptatif(adaptatifs);
}
//Creation du tableau de point.
! SPoint[] points = new SPoint[nbNoeuds];
! maillage.points = points;
int pourc = 0;
! boolean afficheAvance = (progressReceiver_ == null ? false : true);
if (afficheAvance)
! progressReceiver_.setProgression(pourc);
int step = H2dLib.getStep(nbNoeuds);
int pourcStep = (int) (50 / step);
--- 95,110 ----
int typeMaillage = in_.intField(1);
//Si adaptatif, on initialise le tableau stockant les valeurs.
if (typeMaillage == kw_.getAdaptatifCode())
{
adaptatifs = new double[nbNoeuds];
//on affecte a source le tableau.
}
//Creation du tableau de point.
! points = new H2dPoint[nbNoeuds];
! // maillage.points = points;
int pourc = 0;
! boolean afficheAvance = (progress_ == null ? false : true);
if (afficheAvance)
! progress_.setProgression(pourc);
int step = H2dLib.getStep(nbNoeuds);
int pourcStep = (int) (50 / step);
***************
*** 114,130 ****
{
! analyze_.addInfo(DodicoLib.geti18n("Format attendu") + ": NUM_POINT X Y Z", in_);
! analyze_.addError(DodicoLib.geti18n("Définition du noeud") + " " + (i + 1) + " " + DodicoLib.geti18n("non valide"), in_);
! return;
}
temp = in_.intField(0);
if (temp != (i + 1))
{
! analyze_.addInfo("Le numero du point ne correspond pas au numéro réel", in_, true);
}
! points[i] = new SPoint();
! points[i].x = in_.doubleField(1);
! points[i].y = in_.doubleField(2);
! points[i].z = in_.doubleField(3);
if (adaptatifs != null)
{
--- 119,132 ----
{
! _analyze.addInfo(DodicoLib.geti18n("Format attendu") + ": NUM_POINT X Y Z", in_);
! _analyze.addError(DodicoLib.geti18n("Définition du noeud") + " " + (i + 1) + " " + DodicoLib.geti18n("non valide"), in_);
! return null;
}
temp = in_.intField(0);
if (temp != (i + 1))
{
! _analyze.addInfo(DodicoLib.geti18n("Le numero du point ne correspond pas au numéro réel"), in_);
}
! points[i] = new H2dPoint(in_.doubleField(1),in_.doubleField(2),in_.doubleField(3));
if (adaptatifs != null)
{
***************
*** 133,137 ****
{
! analyze_.addWarning("la ligne du coefficient adaptatif ne doit contenir qu'un champ", in_, true);
}
adaptatifs[i] = in_.doubleField(0);
--- 135,139 ----
{
! _analyze.addWarning(DodicoLib.geti18n("la ligne du coefficient adaptatif ne doit contenir qu'un champ"), in_);
}
adaptatifs[i] = in_.doubleField(0);
***************
*** 142,146 ****
{
pourc += pourcStep;
! progressReceiver_.setProgression(pourc);
pMax += pas;
}
--- 144,148 ----
{
pourc += pourcStep;
! progress_.setProgression(pourc);
pMax += pas;
}
***************
*** 151,156 ****
if ((in_.getNumberOfFields() != 1) && (!kw_.getElementCode().equals(in_.stringField(0))))
{
! analyze_.addError(DodicoLib.geti18n("L'identifiant") + " " + kw_.getElementCode() + " " + DodicoLib.geti18n("est attendu"), in_);
! return;
}
--- 153,158 ----
if ((in_.getNumberOfFields() != 1) && (!kw_.getElementCode().equals(in_.stringField(0))))
{
! _analyze.addError(DodicoLib.geti18n("L'identifiant") + " " + kw_.getElementCode() + " " + DodicoLib.geti18n("est attendu"), in_);
! return null;
}
***************
*** 160,169 ****
if (in_.getNumberOfFields() != 1)
{
! analyze_.addError("Cette ligne ne doit contenir que le nombre d'elements", in_, true);
! return;
}
int nbElem = in_.intField(0);
! int[][] elems = new int[nbElem][];
! maillage.elements = elems;
//Les donnees utiles pour l'etat d'avancement
step = H2dLib.getStep(nbElem);
--- 162,170 ----
if (in_.getNumberOfFields() != 1)
{
! _analyze.addFatalError(DodicoLib.geti18n("Cette ligne ne doit contenir que le nombre d'elements"), in_);
! return null;
}
int nbElem = in_.intField(0);
! elems = new H2dElement[nbElem];
//Les donnees utiles pour l'etat d'avancement
step = H2dLib.getStep(nbElem);
***************
*** 171,174 ****
--- 172,176 ----
pMax = pas;
pourcStep = (int) (50 / step);
+ int[] index;
for (int i = 0; i < nbElem; i++)
{
***************
*** 176,182 ****
if (in_.getNumberOfFields() < 2)
{
! analyze_.addInfo(DodicoLib.geti18n("Format attendu") + "NUM_ELEMENT NB_POINT P[1] ...P[NB_POINT]", in_);
! analyze_.addError(DodicoLib.geti18n("Définition de l'element") + " " + (i + 1) + " " + DodicoLib.geti18n("non valide"), in_);
! return;
}
//le numero d'element
--- 178,184 ----
if (in_.getNumberOfFields() < 2)
{
! _analyze.addInfo(DodicoLib.geti18n("Format attendu") + "NUM_ELEMENT NB_POINT P[1] ...P[NB_POINT]", in_);
! _analyze.addError(DodicoLib.geti18n("Définition de l'element") + " " + (i + 1) + " " + DodicoLib.geti18n("non valide"), in_);
! return null;
}
//le numero d'element
***************
*** 184,210 ****
if (temp != (i + 1))
{
! analyze_.addInfo("Le numero de l'element ne correspond pas au numéro réel", in_, true);
}
temp = in_.intField(1);
if (temp <= 0)
{
! analyze_.addError(DodicoLib.geti18n("Nombre de points négatifs ou nul pour l'élément") + " " + (i + 1), in_);
! return;
}
if (in_.getNumberOfFields() != (temp + 2))
{
! analyze_.addInfo(
DodicoLib.geti18n("Nombre indiqué") + ": " + temp + "." + DodicoLib.geti18n("Nombre lu") + ": " + (in_.getNumberOfFields() - 2),
in_);
! analyze_.addError("Le nombre d'éléments ne correspond pas", in_, true);
! return;
}
! elems[i] = new int[temp];
for (int j = 0; j < temp; j++)
{
//on stocke les indexs en commencant a 0.
! elems[i][j] = in_.intField(2 + j) - 1;
}
if (afficheAvance)
{
--- 186,213 ----
if (temp != (i + 1))
{
! _analyze.addInfo(DodicoLib.geti18n("Le numero de l'element ne correspond pas au numéro réel"), in_);
}
temp = in_.intField(1);
if (temp <= 0)
{
! _analyze.addError(DodicoLib.geti18n("Nombre de points négatifs ou nul pour l'élément") + " " + (i + 1), in_);
! return null;
}
if (in_.getNumberOfFields() != (temp + 2))
{
! _analyze.addInfo(
DodicoLib.geti18n("Nombre indiqué") + ": " + temp + "." + DodicoLib.geti18n("Nombre lu") + ": " + (in_.getNumberOfFields() - 2),
in_);
! _analyze.addFatalError(DodicoLib.geti18n("Le nombre d'éléments ne correspond pas"), in_);
! return null;
}
! index= new int[temp];
for (int j = 0; j < temp; j++)
{
//on stocke les indexs en commencant a 0.
! index[j] = in_.intField(2 + j) - 1;
}
+ elems[i]=new H2dElement(index);
if (afficheAvance)
{
***************
*** 212,216 ****
{
pourc += pourcStep;
! progressReceiver_.setProgression(pourc);
pMax += pas;
}
--- 215,219 ----
{
pourc += pourcStep;
! progress_.setProgression(pourc);
pMax += pas;
}
***************
*** 221,230 ****
{
if (in_.getLine().trim() != "")
! analyze_.addWarning("Cette ligne et les suivantes sont ignorées", in_);
}
in_.readFields();
if (in_.getLine().trim() != "")
! analyze_.addWarning("Cette ligne et les suivantes sont ignorées", in_);
!
}
catch (EOFException e)
--- 224,233 ----
{
if (in_.getLine().trim() != "")
! _analyze.addWarning("Cette ligne et les suivantes sont ignorées", in_);
}
in_.readFields();
if (in_.getLine().trim() != "")
! _analyze.addWarning("Cette ligne et les suivantes sont ignorées", in_);
!
}
catch (EOFException e)
***************
*** 235,258 ****
catch (NumberFormatException fe)
{
! manageException(fe, analyze_, in_);
}
catch (IOException _e)
{
! manageException(_e, analyze_);
}
! }
! /**
! * @see org.fudaa.dodico.tr.TrReaderAbstract#getInterface()
! */
! public Object getInterface()
! {
! return getDunesInterface();
}
/**
* @return
*/
! public H2dFileFormat getFileFormat()
{
return getDunesFileFormat();
--- 238,261 ----
catch (NumberFormatException fe)
{
! DodicoAnalyze.manageException(fe, _analyze, in_);
}
catch (IOException _e)
{
! DodicoAnalyze.manageException(_e, _analyze);
}
! //Le mot clef noeud est trouve, on peut creer le maillage.
! H2dMaillage maillage = new H2dMaillage(points,elems);
! source_ = new DunesAdapter();
! source_.setMaillage(maillage);
! source_.setAdaptatif(adaptatifs);
! return source_;
}
+
/**
* @return
*/
! public FileFormat getFileFormat()
{
return getDunesFileFormat();
Index: DunesWriter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesWriter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** DunesWriter.java 19 May 2003 13:53:59 -0000 1.4
--- DunesWriter.java 4 Jul 2003 12:22:19 -0000 1.5
***************
*** 11,19 ****
import java.io.IOException;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
import org.fudaa.dodico.corba.geometrie.SPoint;
! import org.fudaa.dodico.fichiers.FileWriterCharSimpleAbstract;
import org.fudaa.dodico.h2d.H2dLib;
/**
--- 11,25 ----
import java.io.IOException;
+ import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
import org.fudaa.dodico.corba.geometrie.SPoint;
! import org.fudaa.dodico.fichiers.FileFormat;
! import org.fudaa.dodico.fichiers.FileOpWriterCharSimpleAbstract;
! import org.fudaa.dodico.fichiers.FileOperationSynthese;
! import org.fudaa.dodico.h2d.H2dElement;
import org.fudaa.dodico.h2d.H2dLib;
+ import org.fudaa.dodico.h2d.H2dMaillage;
+ import org.fudaa.dodico.h2d.H2dPoint;
/**
***************
*** 22,30 ****
* @version $Id$
*/
! public class DunesWriter extends FileWriterCharSimpleAbstract
{
- DunesInterface dunes_;
DunesKeyWord format_;
public DunesWriter()
--- 28,36 ----
* @version $Id$
*/
! public class DunesWriter extends FileOpWriterCharSimpleAbstract
{
DunesKeyWord format_;
+ DunesFileFormat fileFormat_;
public DunesWriter()
***************
*** 35,52 ****
public DunesWriter(DunesFileFormat _f)
{
if (_f == null)
! format_ = DunesFileFormat.getInstance().getKeyWords();
else
! format_ = _f.getKeyWords();
}
! public void setDunesInterface(DunesInterface _inter)
{
! dunes_ = _inter;
}
! public void setInterface(Object _inter)
{
! setDunesInterface((DunesInterface) _inter);
}
--- 41,65 ----
public DunesWriter(DunesFileFormat _f)
{
+ fileFormat_= _f;
if (_f == null)
! format_= DunesFileFormat.getInstance().getKeyWords();
else
! format_= _f.getKeyWords();
}
! public FileFormat getFileFormat()
{
! return fileFormat_;
}
! public void write(DunesInterface _d, FileOperationSynthese _op)
{
! DodicoAnalyze.Editor edit= new DodicoAnalyze.Editor();
! writeDunes(_d, edit);
! FileOperationSynthese.initAndClose(
! _op,
! edit,
! this,
! "Ecriture Fichier Dunes");
}
***************
*** 57,128 ****
* La méthode se termine par un flush mais ne ferme pas le flux.
*/
! public void write()
{
//Test sur les objets a ecrire
if (dunes_ == null)
{
! analyze_.addError("La structure à écrire est nulle !", -1, true);
return;
}
if (out_ == null)
{
! analyze_.addError("Le flux de sortie est nul !", -1, true);
return;
}
! SMaillageIndex maillage = dunes_.getMaillage();
if (maillage == null)
{
! analyze_.addError("Le maillage est nul !", -1, true);
! return;
! }
! SPoint[] pts = dunes_.getMaillage().points;
! if (pts == null)
! {
! analyze_.addError(
! "Le maillage ne contient pas de points !",
! -1,
! true);
return;
}
! int nPts = pts.length;
if (nPts == 0)
{
! analyze_.addError(
! "Le maillage ne contient pas de points !",
! -1,
! true);
return;
}
! int[][] elems = maillage.elements;
if (elems == null)
{
! analyze_.addError(
! "Le maillage ne contient pas d'éléments !",
! -1,
! true);
return;
}
! int nElems = elems.length;
if (nElems == 0)
{
! analyze_.addError(
! "Le maillage ne contient pas d'éléments !",
! -1,
! true);
return;
}
! StringBuffer b = new StringBuffer(600);
b.append(format_.getNoeudCode());
b.append(' ');
b.append(lineSep_);
b.append(nPts);
! boolean printAdaptatifV = false;
! double[] adValeur = dunes_.getAdaptatifValeur();
if (adValeur != null)
{
b.append(' ');
b.append(format_.getAdaptatifCode());
! printAdaptatifV = true;
}
else
--- 70,126 ----
* La méthode se termine par un flush mais ne ferme pas le flux.
*/
! protected void writeDunes(DunesInterface _d, DodicoAnalyze.Editor analyze_)
{
+ DunesInterface dunes_= _d;
//Test sur les objets a ecrire
if (dunes_ == null)
{
! analyze_.addFatalError(
! DodicoLib.geti18n("La structure à écrire est nulle !"));
return;
}
if (out_ == null)
{
! analyze_.addFatalError("Le flux de sortie est nul !");
return;
}
! H2dMaillage maillage= dunes_.getMaillage();
if (maillage == null)
{
! analyze_.addFatalError("Le maillage est nul !");
return;
}
! int nPts= maillage.getPtsNb();
if (nPts == 0)
{
! analyze_.addFatalError(
! DodicoLib.geti18n("Le maillage ne contient pas de points !"));
return;
}
! H2dElement[] elems= maillage.getElts();
if (elems == null)
{
! analyze_.addFatalError("Le maillage ne contient pas d'éléments !");
return;
}
! int nElems= elems.length;
if (nElems == 0)
{
! analyze_.addFatalError("Le maillage ne contient pas d'éléments !");
return;
}
! StringBuffer b= new StringBuffer(600);
b.append(format_.getNoeudCode());
b.append(' ');
b.append(lineSep_);
b.append(nPts);
! boolean printAdaptatifV= false;
! double[] adValeur= dunes_.getAdaptatifValeur();
if (adValeur != null)
{
b.append(' ');
b.append(format_.getAdaptatifCode());
! printAdaptatifV= true;
}
else
***************
*** 133,157 ****
//Gestion de l'etat d'avancement
//le pas pour afficher l'etat d'avancement
! int pourc = 0;
! boolean afficheAvance = (progressReceiver_ == null ? false : true);
if (afficheAvance)
! progressReceiver_.setProgression(pourc);
! int step = H2dLib.getStep(nPts);
! int pas = (int) (nPts / step);
! int pMax = pas;
! int pourcStep = (int) (50 / step);
! SPoint pt;
try
{
! for (int i = 0; i < nPts; i++)
{
! pt = pts[i];
b.append((i + 1));
b.append(' ');
! b.append(pt.x);
b.append(' ');
! b.append(pt.y);
b.append(' ');
! b.append(pt.z);
b.append(lineSep_);
if (printAdaptatifV)
--- 131,155 ----
//Gestion de l'etat d'avancement
//le pas pour afficher l'etat d'avancement
! int pourc= 0;
! boolean afficheAvance= (progress_ == null ? false : true);
if (afficheAvance)
! progress_.setProgression(pourc);
! int step= H2dLib.getStep(nPts);
! int pas= (int) (nPts / step);
! int pMax= pas;
! int pourcStep= (int) (50 / step);
! H2dPoint pt;
try
{
! for (int i= 0; i < nPts; i++)
{
! pt= maillage.getPt(i);
b.append((i + 1));
b.append(' ');
! b.append(pt.getX());
b.append(' ');
! b.append(pt.getY());
b.append(' ');
! b.append(pt.getZ());
b.append(lineSep_);
if (printAdaptatifV)
***************
*** 166,170 ****
{
pourc += pourcStep;
! progressReceiver_.setProgression(pourc);
pMax += pas;
}
--- 164,168 ----
{
pourc += pourcStep;
! progress_.setProgression(pourc);
pMax += pas;
}
***************
*** 180,195 ****
b.append(lineSep_);
//pour afficher l'etat d'avancement
! step = H2dLib.getStep(nElems);
! pas = (int) (nElems / step);
! pMax = pas;
! pourcStep = (int) (50 / step);
//les points par elements
! int[] ppel;
//le nombre de points par elements.
int nppel;
! for (int i = 0; i < nElems; i++)
{
! ppel = elems[i];
! nppel = ppel.length;
//le num d'elements
b.append((i + 1));
--- 178,194 ----
b.append(lineSep_);
//pour afficher l'etat d'avancement
! step= H2dLib.getStep(nElems);
! pas= (int) (nElems / step);
! pMax= pas;
! pourcStep= (int) (50 / step);
//les points par elements
! H2dElement ppel;
//le nombre de points par elements.
int nppel;
! int[] index;
! for (int i= 0; i < nElems; i++)
{
! ppel= elems[i];
! nppel= ppel.getPtNb();
//le num d'elements
b.append((i + 1));
***************
*** 198,206 ****
b.append(nppel);
//les indices des points pour l'element i
! for (int j = 0; j < nppel; j++)
{
b.append(' ');
//Les indices sont stockés a partir de 0.
! b.append(ppel[j] + 1);
}
writeln(b);
--- 197,206 ----
b.append(nppel);
//les indices des points pour l'element i
! index=ppel.getPtIndex();
! for (int j= 0; j < nppel; j++)
{
b.append(' ');
//Les indices sont stockés a partir de 0.
! b.append(index[j] + 1);
}
writeln(b);
***************
*** 211,215 ****
{
pourc += pourcStep;
! progressReceiver_.setProgression(pourc);
pMax += pas;
}
--- 211,215 ----
{
pourc += pourcStep;
! progress_.setProgression(pourc);
pMax += pas;
}
***************
*** 221,228 ****
catch (IOException _ex)
{
! manageException(_ex, analyze_);
}
return;
}
-
}
--- 221,227 ----
catch (IOException _ex)
{
! DodicoAnalyze.manageException(_ex, analyze_);
}
return;
}
}
|
|
From: <de...@us...> - 2003-07-04 12:14:40
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dimduc In directory sc8-pr-cvs1:/tmp/cvs-serv13132 Modified Files: DParametresDimduc.java Log Message: Maj mineure Index: DParametresDimduc.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dimduc/DParametresDimduc.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DParametresDimduc.java 18 Mar 2003 10:53:54 -0000 1.2 --- DParametresDimduc.java 4 Jul 2003 12:14:37 -0000 1.3 *************** *** 10,18 **** package org.fudaa.dodico.dimduc; import org.fudaa.dodico.corba.dimduc.IParametresDimducOperations; import org.fudaa.dodico.corba.dimduc.SParametres01; import org.fudaa.dodico.corba.dimduc.SParametres02; - - import org.fudaa.dodico.calcul.DParametres; /** --- 10,17 ---- package org.fudaa.dodico.dimduc; + import org.fudaa.dodico.calcul.DParametres; import org.fudaa.dodico.corba.dimduc.IParametresDimducOperations; import org.fudaa.dodico.corba.dimduc.SParametres01; import org.fudaa.dodico.corba.dimduc.SParametres02; /** |
|
From: <de...@us...> - 2003-07-04 12:11:27
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico In directory sc8-pr-cvs1:/tmp/cvs-serv12786 Removed Files: DicoManager.java.save Log Message: Fichier inutile --- DicoManager.java.save DELETED --- |
|
From: <de...@us...> - 2003-07-04 12:03:33
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/diapre
In directory sc8-pr-cvs1:/tmp/cvs-serv11492
Modified Files:
ClientDiapre.java
Log Message:
Utilisation de UsineHelper
Index: ClientDiapre.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/diapre/ClientDiapre.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ClientDiapre.java 18 Mar 2003 10:52:05 -0000 1.2
--- ClientDiapre.java 4 Jul 2003 12:03:31 -0000 1.3
***************
*** 21,24 ****
--- 21,25 ----
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.objet.CDodico;
+ import org.fudaa.dodico.usine.UsineHelper;
/**
***************
*** 47,51 ****
System.out.println("création du serveur");
//Creation de l'usine de base
! IUsine usine=CDodico.creeUsineLocale();
//Creation d'une personne (et son organisme)
IPersonne p=usine.creeObjetPersonne();
--- 48,52 ----
System.out.println("création du serveur");
//Creation de l'usine de base
! IUsine usine=UsineHelper.creeUsineLocale();
//Creation d'une personne (et son organisme)
IPersonne p=usine.creeObjetPersonne();
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun
In directory sc8-pr-cvs1:/tmp/cvs-serv15410
Modified Files:
DodicoAnalyze.java DodicoLib.java DodicoPreferences.java
DodicoResource.java ProgressionBuAdapter.java
ProgressionDodicoAdapter.java ProgressionInterface.java
Added Files:
DodicoDoubleDoubleSortedList.java DodicoPermanentList.java
DodicoUI.java DodicoUIDefault.java
Removed Files:
DodicoFileFormat.java
Log Message:
DodicoDoubleDoubleSortedList: liste permettant de manipuler une table de
correspondance de double triee.
DodicoPermanentList : liste non modifiable.
DodicoUI : interface utilisateur ( envoyer des messages normaux et
d'erreur). Cette interface permet de choisir le type de rendu ( console,
graphique, log...)
DodicoUIDefault :implementation de base de DodicoUI qui envoie les
messages dans la console.
--- NEW FILE: DodicoDoubleDoubleSortedList.java ---
/*
* @file DodicoDoubleDoubleSortedList.java
* @creation 26 juin 2003
* @modification $Date: 2003/07/04 08:11:42 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.commun;
import gnu.trove.TDoubleArrayList;
import gnu.trove.TDoubleDoubleHashMap;
/**
* @author deniger
* @version $Id: DodicoDoubleDoubleSortedList.java,v 1.1 2003/07/04 08:11:42 deniger Exp $
*/
public class DodicoDoubleDoubleSortedList
{
TDoubleArrayList t_;
TDoubleArrayList val_;
public DodicoDoubleDoubleSortedList()
{
t_ = new TDoubleArrayList();
val_ = new TDoubleArrayList();
}
public boolean containsKey(double _key)
{
return indexOfKey(_key)>=0;
}
/**
*
*/
public DodicoDoubleDoubleSortedList(int _n)
{
t_ = new TDoubleArrayList(_n);
val_ = new TDoubleArrayList(_n);
}
public int size()
{
return t_.size();
}
public void put(double _t, double _val)
{
if (t_.size() == 0)
{
t_.add(_t);
val_.add(_val);
}
else
{
int k = t_.binarySearch(_t);
if (k < 0)
{
k = -k;
if (k > t_.size())
{
t_.add(_t);
val_.add(_val);
}
else
{
t_.insert(k-1, _t);
val_.insert(k-1, _val);
}
}
else
{
val_.set(k, _val);
}
}
}
public String toString()
{
return t_.toString()+DodicoLib.LINE_SEP+val_.toString();
}
public void removeKey(double _key)
{
int index=indexOfKey(_key);
if(index>=0)
{
t_.remove(index);
val_.remove(index);
}
}
public void removeValue(double _val)
{
int index=indexOfValue(_val);
if(index>=0)
{
t_.remove(index);
val_.remove(index);
}
}
public int indexOfKey(double _key)
{
return t_.binarySearch(_key);
}
public int indexOfValue(double _val)
{
return val_.binarySearch(_val);
}
public double getKeyAtIndex(int _offset)
{
return t_.get(_offset);
}
public double getQuickKeyAtIndex(int _offset)
{
return t_.getQuick(_offset);
}
public double getValueAtIndex(int _offset)
{
return val_.get(_offset);
}
public double getQuickValueAtIndex(int _offset)
{
return val_.getQuick(_offset);
}
public double getValueForKey(double _key)
{
int i = indexOfKey(_key);
return i < 0 ? (double) 0 : val_.getQuick(i);
}
public double getKeyForValue(double _val)
{
int i = indexOfValue(_val);
return i < 0 ? (double) 0 : t_.getQuick(i);
}
public static void main(String[] args)
{
DodicoDoubleDoubleSortedList l=new DodicoDoubleDoubleSortedList(15);
l.put(1d,1d);
l.put(3d,3d);
l.put(5d,5d);
l.put(4d,5d);
l.put(0d,0d);
l.put(4d,4d);
System.out.println(l.toString());
System.out.println(l.getValueForKey(1d));
System.out.println(l.getKeyForValue(5d));
System.out.println(l.containsKey(0d));
l.removeKey(4d);
l.removeValue(1d);
System.out.println(l.toString());
}
}
--- NEW FILE: DodicoPermanentList.java ---
/*
* @file DodicoPermanentList.java
* @creation 17 juin 2003
* @modification $Date: 2003/07/04 08:11:42 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.commun;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Set;
/**
* @author deniger
* @version $Id: DodicoPermanentList.java,v 1.1 2003/07/04 08:11:42 deniger Exp $
*/
public class DodicoPermanentList extends ArrayList
{
/**
* @param c
*/
public DodicoPermanentList(Collection c)
{
super(c);
super.trimToSize();
}
public DodicoPermanentList(Object[] _o)
{
this(Arrays.asList(_o));
}
/**
*
*/
public void add(int index, Object element)
{
throw new UnsupportedOperationException();
}
/**
*
*/
public boolean add(Object o)
{
throw new UnsupportedOperationException();
}
/**
*
*/
public boolean addAll(Collection c)
{
throw new UnsupportedOperationException();
}
/**
*
*/
public boolean addAll(int index, Collection c)
{
throw new UnsupportedOperationException();
}
/**
*
*/
public void clear()
{
throw new UnsupportedOperationException();
}
/**
*
*/
public void ensureCapacity(int minCapacity)
{
throw new UnsupportedOperationException();
}
/**
*
*/
public Object remove(int index)
{
throw new UnsupportedOperationException();
}
/**
*
*/
protected void removeRange(int fromIndex, int toIndex)
{
throw new UnsupportedOperationException();
}
/**
*
*/
public Object set(int index, Object element)
{
throw new UnsupportedOperationException();
}
/**
*
*/
public void trimToSize()
{
throw new UnsupportedOperationException();
}
}
--- NEW FILE: DodicoUI.java ---
/*
* @file DodicoUI.java
* @creation 13 juin 2003
* @modification $Date: 2003/07/04 08:11:42 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.commun;
/**
* @author fred deniger
* @version $Id: DodicoUI.java,v 1.1 2003/07/04 08:11:42 deniger Exp $
*
*/
public interface DodicoUI
{
public void error(String _titre,String _msg);
public void message(String _titre,String _msg);
public void error(String _msg);
public void message(String _msg);
}
--- NEW FILE: DodicoUIDefault.java ---
/*
* @file DodicoUIDefault.java
* @creation 13 juin 2003
* @modification $Date: 2003/07/04 08:11:42 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.commun;
/**
* @author fred deniger
* @version $Id: DodicoUIDefault.java,v 1.1 2003/07/04 08:11:42 deniger Exp $
*
*/
public class DodicoUIDefault implements DodicoUI
{
public final static DodicoUIDefault INSTANCE= new DodicoUIDefault();
private DodicoUIDefault()
{
}
/**
* @param _titre
* @param _msg
*/
public void error(String _titre, String _msg)
{
System.err.println(_titre + ": " + _msg);
}
/**
* @param _titre
* @param _msg
*/
public void message(String _titre, String _msg)
{
System.out.println(_titre + ": " + _msg);
}
/**
* @param _msg
*/
public void error(String _msg)
{
error(DodicoLib.EMPTY_STRING, _msg);
}
/**
* @param _msg
*/
public void message(String _msg)
{
message(DodicoLib.EMPTY_STRING, _msg);
}
}
Index: DodicoAnalyze.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoAnalyze.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DodicoAnalyze.java 17 Apr 2003 17:26:16 -0000 1.3
--- DodicoAnalyze.java 4 Jul 2003 08:11:42 -0000 1.4
***************
*** 9,12 ****
--- 9,15 ----
package org.fudaa.dodico.commun;
+ import java.io.FileNotFoundException;
+ import java.io.IOException;
+ import java.io.LineNumberReader;
import java.util.ArrayList;
import java.util.Collection;
***************
*** 17,22 ****
* Cette classe sert a transmettre les informations d'une operation de lecture
* ou d'ecriture. Les informations et les erreurs de l'operation sont stockées
! * avec eventuellement leur numero de ligne.
! * TODO : Creer une interface pour ne pas modifier ces donnees.
* @author deniger
* @version $Id$
--- 20,25 ----
* Cette classe sert a transmettre les informations d'une operation de lecture
* ou d'ecriture. Les informations et les erreurs de l'operation sont stockées
! * avec eventuellement leur numero de ligne et un identifiant ( a modifier ...).
! *
* @author deniger
* @version $Id$
***************
*** 27,30 ****
--- 30,35 ----
private DodicoAnalyze.Field[] warns_;
private DodicoAnalyze.Field[] infos_;
+ private DodicoAnalyze.Field fatalError_;
+ private String desc_;
public DodicoAnalyze(DodicoAnalyze.Editor _io)
***************
*** 32,50 ****
if (_io != null)
{
! errors_ = _io.getErrors();
! warns_ = _io.getWarnings();
! infos_ = _io.getInfos();
}
}
!
public static DodicoAnalyze[] getAnalyze(DodicoAnalyze.Editor[] _io)
{
!
! if(_io==null) return null;
! int nb=_io.length;
! DodicoAnalyze[] r=new DodicoAnalyze[nb];
! for(int i=nb-1;i>=0;i--)
{
! r[i]=_io[i].toAnalyze();
}
return r;
--- 37,63 ----
if (_io != null)
{
! errors_= _io.getErrors();
! warns_= _io.getWarnings();
! infos_= _io.getInfos();
! fatalError_= _io.getFatalError();
! desc_= _io.desc_;
}
}
!
! public boolean containsFatalError()
! {
! return fatalError_ != null;
! }
!
public static DodicoAnalyze[] getAnalyze(DodicoAnalyze.Editor[] _io)
{
!
! if (_io == null)
! return null;
! int nb= _io.length;
! DodicoAnalyze[] r= new DodicoAnalyze[nb];
! for (int i= nb - 1; i >= 0; i--)
{
! r[i]= _io[i].toAnalyze();
}
return r;
***************
*** 56,59 ****
--- 69,93 ----
}
+ public static String getResume(DodicoAnalyze[] _analyzes)
+ {
+ if (_analyzes == null)
+ return DodicoLib.EMPTY_STRING;
+ int n= _analyzes.length;
+ StringBuffer b= new StringBuffer();
+ DodicoAnalyze an;
+ for (int i= 0; i < n; i++)
+ {
+ an= _analyzes[i];
+ if (an != null)
+ {
+ if (i != 0)
+ b.append(DodicoLib.SEP_LINE);
+ b.append(an.getDesc()).append(DodicoLib.SEP_LINE);
+ b.append(an.getResume());
+ }
+ }
+ return b.toString();
+ }
+
public void printResume(String _prefix)
{
***************
*** 68,79 ****
public String getResume(String _prefix)
{
! String s = "";
! String t = getResume("Erreurs", errors_, _prefix);
if (t != null)
s += DodicoLib.LINE_SEP + t;
! t = getResume("Avertissements", warns_, _prefix);
if (t != null)
s += DodicoLib.LINE_SEP + t;
! t = getResume("Informations", infos_, _prefix);
if (t != null)
s += DodicoLib.LINE_SEP + t;
--- 102,122 ----
public String getResume(String _prefix)
{
!
! String s= "";
! if(fatalError_!=null)
! {
! s+=DodicoLib.LINE_SEP+_prefix+"Erreur fatale";
! if(fatalError_.getOffset()>=0)
! s+=DodicoLib.LINE_SEP+_prefix+fatalError_.toString();
! else
! s+=DodicoLib.LINE_SEP+_prefix+fatalError_.getMessage();
! }
! String t= getResume("Erreurs", errors_, _prefix);
if (t != null)
s += DodicoLib.LINE_SEP + t;
! t= getResume("Avertissements", warns_, _prefix);
if (t != null)
s += DodicoLib.LINE_SEP + t;
! t= getResume("Informations", infos_, _prefix);
if (t != null)
s += DodicoLib.LINE_SEP + t;
***************
*** 110,114 ****
public boolean containsErrors()
{
! return ((errors_ != null) && (errors_.length > 0)) ? true : false;
}
--- 153,157 ----
public boolean containsErrors()
{
! return ((fatalError_!=null) || ((errors_ != null) && (errors_.length > 0))) ? true : false;
}
***************
*** 128,132 ****
}
! protected static String getResume(String _titre, DodicoAnalyze.Field[] _ls, String _prefix)
{
if ((_ls == null) || (_ls.length <= 0))
--- 171,239 ----
}
! public static void manageException(
! FileNotFoundException _e,
! DodicoAnalyze.Editor _analyze)
! {
! _analyze.addError("Fichier non trouvé");
! _analyze.addInfo(_e.getMessage());
! if (DodicoLib.DEBUG)
! _e.printStackTrace();
! }
!
!
! public static void manageException(
! IOException _e,
! DodicoAnalyze.Editor _analyze)
! {
! _analyze.addError("Erreur d'entrée/sortie");
! _analyze.addInfo(_e.getMessage());
! if (DodicoLib.DEBUG)
! _e.printStackTrace();
! }
!
! public static void manageException(
! NumberFormatException _e,
! DodicoAnalyze.Editor _analyze,
! FortranReader _l)
! {
! manageException(_e,_analyze,_l,0);
! }
!
! public static void manageException(
! NumberFormatException _e,
! DodicoAnalyze.Editor _analyze,
! FortranReader _l,int fieldId)
! {
! _analyze.addError("Format du champ incorrect", _l).setId(fieldId);
! _analyze.addInfo(_e.getMessage()).setId(fieldId);
! if (DodicoLib.DEBUG)
! _e.printStackTrace();
! }
!
!
! public static void manageException(
! IllegalArgumentException _e,
! DodicoAnalyze.Editor _analyze)
! {
! _analyze.addError("Erreur interne d'argument");
! _analyze.addInfo(_e.getMessage());
! if (DodicoLib.DEBUG)
! _e.printStackTrace();
! }
!
! public static void manageException(
! Exception _e,
! DodicoAnalyze.Editor _analyze)
! {
! _analyze.addError("Erreur à l'exécution");
! _analyze.addInfo(_e.getMessage());
! if (DodicoLib.DEBUG)
! _e.printStackTrace();
! }
!
! protected static String getResume(
! String _titre,
! DodicoAnalyze.Field[] _ls,
! String _prefix)
{
if ((_ls == null) || (_ls.length <= 0))
***************
*** 134,147 ****
return null;
}
! StringBuffer r = new StringBuffer(200);
r.append(_prefix);
r.append(_titre);
! String lineSep = DodicoLib.LINE_SEP;
Field element;
! int nb = _ls.length;
! for (int i = 0; i < nb; i++)
{
r.append(lineSep);
! element = _ls[i];
r.append(_prefix);
r.append("Ligne " + element.getOffset() + ": " + element.getMessage());
--- 241,254 ----
return null;
}
! StringBuffer r= new StringBuffer(200);
r.append(_prefix);
r.append(_titre);
! String lineSep= DodicoLib.LINE_SEP;
Field element;
! int nb= _ls.length;
! for (int i= 0; i < nb; i++)
{
r.append(lineSep);
! element= _ls[i];
r.append(_prefix);
r.append("Ligne " + element.getOffset() + ": " + element.getMessage());
***************
*** 153,160 ****
public static class Editor
{
!
! private ArrayList warnings_;
! private ArrayList errors_;
! private ArrayList infos_;
public Editor()
--- 260,268 ----
public static class Editor
{
! String desc_;
! private ArrayList editorWarnings_;
! private ArrayList editorErrors_;
! private ArrayList editorInfos_;
! private DodicoAnalyze.Field editorFatalError_;
public Editor()
***************
*** 163,173 ****
}
public void merge(DodicoAnalyze.Editor _a)
{
if ((_a == null) || _a.isEmpty())
return;
! warnings_ = merge(warnings_, _a.warnings_);
! infos_ = merge(infos_, _a.infos_);
! errors_ = merge(errors_, _a.errors_);
}
--- 271,286 ----
}
+ public DodicoAnalyze.Field getFatalError()
+ {
+ return editorFatalError_;
+ }
+
public void merge(DodicoAnalyze.Editor _a)
{
if ((_a == null) || _a.isEmpty())
return;
! editorWarnings_= merge(editorWarnings_, _a.editorWarnings_);
! editorInfos_= merge(editorInfos_, _a.editorInfos_);
! editorErrors_= merge(editorErrors_, _a.editorErrors_);
}
***************
*** 188,197 ****
public void clear()
{
! if (warnings_ != null)
! warnings_.clear();
! if (errors_ != null)
! errors_.clear();
! if (infos_ != null)
! infos_.clear();
}
--- 301,310 ----
public void clear()
{
! if (editorWarnings_ != null)
! editorWarnings_.clear();
! if (editorErrors_ != null)
! editorErrors_.clear();
! if (editorInfos_ != null)
! editorInfos_.clear();
}
***************
*** 202,206 ****
public DodicoAnalyze.Field[] getErrors()
{
! return getFieldArray(errors_);
}
--- 315,319 ----
public DodicoAnalyze.Field[] getErrors()
{
! return getFieldArray(editorErrors_);
}
***************
*** 211,215 ****
public DodicoAnalyze.Field[] getWarnings()
{
! return getFieldArray(warnings_);
}
--- 324,328 ----
public DodicoAnalyze.Field[] getWarnings()
{
! return getFieldArray(editorWarnings_);
}
***************
*** 220,224 ****
public DodicoAnalyze.Field[] getInfos()
{
! return getFieldArray(infos_);
}
--- 333,337 ----
public DodicoAnalyze.Field[] getInfos()
{
! return getFieldArray(editorInfos_);
}
***************
*** 229,253 ****
public boolean containsErrors()
{
! return errors_ == null ? false : true;
}
public boolean containsInfos()
{
! return infos_ == null ? false : true;
}
public boolean containsWarnings()
{
! return warnings_ == null ? false : true;
}
public boolean isEmpty()
{
! return ((warnings_ == null) && (infos_ == null) && (errors_ == null)) ? true : false;
}
!
public DodicoAnalyze toAnalyze()
{
! return (isEmpty())?null:new DodicoAnalyze(this);
}
--- 342,368 ----
public boolean containsErrors()
{
! return editorErrors_ == null ? false : true;
}
public boolean containsInfos()
{
! return editorInfos_ == null ? false : true;
}
public boolean containsWarnings()
{
! return editorWarnings_ == null ? false : true;
}
public boolean isEmpty()
{
! return ((editorWarnings_ == null) && (editorInfos_ == null) && (editorErrors_ == null) && (editorFatalError_==null))
! ? true
! : false;
}
!
public DodicoAnalyze toAnalyze()
{
! return (isEmpty()) ? null : new DodicoAnalyze(this);
}
***************
*** 262,372 ****
if ((_list == null) || (_list.size() == 0))
return null;
! int l = _list.size();
! DodicoAnalyze.Field[] r = new DodicoAnalyze.Field[l];
_list.toArray(r);
return r;
}
! /**
! * Ajoute une erreur traduite (offset=-1).
! */
! public void addTranslateError(String _message)
! {
! addError(_message, -1, true);
! }
!
! public void addError(String _message)
{
! addError(_message, -1, false);
}
! public void addError(String _message, FortranReader _in)
{
! addError(_message, _in.getLineNumber(), false);
}
! public void addError(String _message, FortranReader _in, boolean _t)
{
! addError(_message, _in.getLineNumber(), _t);
}
! public void addError(String _message, int _offset)
{
! addError(_message, _offset, false);
}
! public synchronized void addError(String _message, int _offset, boolean _translate)
{
! if (errors_ == null)
! errors_ = new ArrayList();
! if (_message == null)
! {
! addField(errors_, "Erreur inconnue", _offset, true);
! return;
! }
! addField(errors_, _message, _offset, _translate);
}
! public void addWarning(String _message, FortranReader _in)
{
! addWarning(_message, _in.getLineNumber(), false);
}
! public void addWarning(String _message, FortranReader _in, boolean _t)
{
! addWarning(_message, _in.getLineNumber(), _t);
}
! public void addWarning(String _message, int _offset)
{
! addWarning(_message, _offset, false);
}
! public synchronized void addWarning(String _message, int _offset, boolean _translate)
{
! if (warnings_ == null)
! warnings_ = new ArrayList();
if (_message == null)
{
! addField(warnings_, "Avertissement inconnu", _offset, true);
! return;
}
! addField(warnings_, _message, _offset, _translate);
}
! public void addInfo(String _message, FortranReader _in)
{
! addInfo(_message, _in.getLineNumber(), false);
}
! public void addInfo(String _message, FortranReader _in, boolean _t)
{
! addInfo(_message, _in.getLineNumber(), _t);
}
! public void addInfo(String _message)
{
! addInfo(_message, -1, false);
}
! public void addInfo(String _message, int _offset)
{
! addInfo(_message, _offset, false);
}
! public synchronized void addInfo(String _message, int _offset, boolean _translate)
{
! if (infos_ == null)
! infos_ = new ArrayList();
if (_message == null)
{
! addField(infos_, "Information inconnue", _offset, true);
! return;
}
! addField(infos_, _message, _offset, _translate);
}
/**
! * Appelle la methode complete avec _offset=-1 et sans tranduction du
* message.
* @see #getField(String, int, boolean)
--- 377,487 ----
if ((_list == null) || (_list.size() == 0))
return null;
! int l= _list.size();
! DodicoAnalyze.Field[] r= new DodicoAnalyze.Field[l];
_list.toArray(r);
return r;
}
! public Field addError(String _message)
{
! return addError(_message, 0);
}
! public Field addError(String _message, FortranReader _in)
{
! return addError(_message, _in.getLineNumber());
}
! public Field addError(String _message, LineNumberReader _in)
{
! return addError(_message, _in.getLineNumber());
}
! public boolean containsFatalError()
{
! return editorFatalError_ != null;
}
! public Field addFatalError(String _message)
{
! return addFatalError(_message, 0);
}
! public Field addFatalError(String _message, LineNumberReader _in)
{
! return addFatalError(_message, _in.getLineNumber());
}
! public Field addFatalError(String _message, FortranReader _in)
{
! return addFatalError(_message, _in.getLineNumber());
}
! public Field addFatalError(String _message, int _offset)
{
! if (editorFatalError_ == null)
! {
! editorFatalError_= new DodicoAnalyze.Field(_message, _offset);
! }
!
! return editorFatalError_;
}
! public synchronized Field addError(String _message, int _offset)
{
! if (editorErrors_ == null)
! editorErrors_= new ArrayList();
if (_message == null)
{
! return addField(editorErrors_, "Erreur inconnue", _offset);
}
! return addField(editorErrors_, _message, _offset);
}
!
! public Field addWarning(String _message, FortranReader _in)
{
! return addWarning(_message, _in.getLineNumber());
}
! public synchronized Field addWarning(String _message, int _offset)
{
! if (editorWarnings_ == null)
! editorWarnings_= new ArrayList();
! if (_message == null)
! {
! return addField(editorWarnings_, "Avertissement inconnu", _offset);
! }
! return addField(editorWarnings_, _message, _offset);
}
! public Field addInfo(String _message, FortranReader _in)
{
! return addInfo(_message, _in.getLineNumber());
}
! public Field addInfo(String _message, LineNumberReader _in)
{
! return addInfo(_message, _in.getLineNumber());
}
! public Field addInfo(String _message)
{
! return addInfo(_message, 0);
! }
!
! public Field addInfo(String _message, int _offset)
! {
! if (editorInfos_ == null)
! editorInfos_= new ArrayList();
if (_message == null)
{
! return addField(editorInfos_, "Information inconnue", _offset);
}
! return addField(editorInfos_, _message, _offset);
}
/**
! * Appelle la methode complete avec _offset=0 et sans tranduction du
* message.
* @see #getField(String, int, boolean)
***************
*** 374,387 ****
public static DodicoAnalyze.Field createField(String _message)
{
! return createField(_message, -1);
! }
!
! /**
! * Appelle la methode complete sans tranduction du message.
! * @see #getField(String, int, boolean)
! */
! public static DodicoAnalyze.Field createField(String _message, int _offset)
! {
! return createField(_message, _offset, false);
}
--- 489,493 ----
public static DodicoAnalyze.Field createField(String _message)
{
! return createField(_message, 0);
}
***************
*** 391,449 ****
* @param _message le message
* @param _offset la ligne (ou le byte) concerne
- * @param _translate si true le message est traduit.
*/
! public static DodicoAnalyze.Field createField(String _message, int _offset, boolean _translate)
{
if (_message == null)
return null;
! return new DodicoAnalyze.Field(_translate ? DodicoLib.geti18n(_message) : _message, _offset);
}
/**
! * Ajoute l'info sans traduction.
! * @see #addField(Collection, String, FortranReader)
*/
! public static void addField(Collection _warns, String _message, FortranReader _in)
{
! addField(_warns, _message, _in, false);
}
/**
! * Ajoute l'info sans traduction.
! * @see #addField(Collection, String, int)
*/
! public static void addField(Collection _warns, String _message, int _offset)
{
! addField(_warns, _message, _offset, false);
}
-
/**
! * Ajoute le message <code>_message</code> traduit a la collection
! * <code>_warns</code>.Le numero de ligne sera determine a partir de
! * la methode <code>_in.getLineNumber()</code>.
! * @see #addField(Collection, String, int, boolean)
*/
! public static void addField(Collection _warns, String _message, FortranReader _in, boolean _translate)
{
! addField(_warns, _message, _in.getLineNumber(), _translate);
}
/**
! * Ajoute le message <code>_message</code> NON traduit a la collection
! * <code>_warns</code>.Le numero de ligne sera determine a partir de
! * la methode <code>_in.getLineNumber()</code>.
*/
! private static void addField(Collection _warns, String _message, int _offset, boolean _translate)
{
! _warns.add(DodicoAnalyze.Editor.createField(_message, _offset, _translate));
}
}
public static class Field
{
/**
* Le message de l'erreur ou de l'info.
*/
private String message_;
/**
* La ligne (ou le byte ?) de l'erreur
--- 497,562 ----
* @param _message le message
* @param _offset la ligne (ou le byte) concerne
*/
! public static DodicoAnalyze.Field createField(String _message, int _offset)
{
if (_message == null)
return null;
! return new DodicoAnalyze.Field(_message, _offset);
}
/**
! * Ajoute le message <code>_message</code> a la collection
! * <code>_warns</code>.Le numero de ligne sera determine a partir de
! * la methode <code>_in.getLineNumber()</code>.
! * @see #addField(Collection, String, int)
*/
! public static void addField(
! Collection _warns,
! String _message,
! FortranReader _in)
{
! addField(_warns, _message, _in.getLineNumber());
}
/**
! * Ajoute le message <code>_message</code>a la collection
! * <code>_warns</code>.Le numero de ligne sera determine a partir de
! * la methode <code>_in.getLineNumber()</code>.
*/
! private static Field addField(
! Collection _warns,
! String _message,
! int _offset)
{
! Field f= DodicoAnalyze.Editor.createField(_message, _offset);
! _warns.add(f);
! return f;
}
/**
! *
*/
! public String getDesc()
{
! return desc_;
}
/**
! *
*/
! public void setDesc(String _string)
{
! desc_= _string;
}
+
}
public static class Field
{
+
/**
* Le message de l'erreur ou de l'info.
*/
private String message_;
+
/**
* La ligne (ou le byte ?) de l'erreur
***************
*** 451,460 ****
private int offset_;
/**
! * Initialyse l'offset a -1.
*/
public Field(String _message)
{
! this(_message, -1);
}
--- 564,575 ----
private int offset_;
+ private int id_;
+
/**
! * Initialyse l'offset a 0.
*/
public Field(String _message)
{
! message_= _message;
}
***************
*** 464,469 ****
public Field(String _message, int _offset)
{
! message_ = _message;
! offset_ = _offset;
}
--- 579,584 ----
public Field(String _message, int _offset)
{
! message_= _message;
! offset_= _offset;
}
***************
*** 491,494 ****
--- 606,651 ----
}
+ /**
+ * un identifiant qui peut etre le num de fichier : A voir.
+ * @return
+ *
+ */
+ public int getId()
+ {
+ return id_;
+ }
+
+ /**
+ * @param _i
+ */
+ public void setId(int _i)
+ {
+ id_= _i;
+ }
+
+ }
+
+ /**
+ *
+ */
+ public DodicoAnalyze.Field getFatalError()
+ {
+ return fatalError_;
+ }
+
+ /**
+ *
+ */
+ public String getDesc()
+ {
+ return desc_;
+ }
+
+ /**
+ *
+ */
+ public void setDesc(String _string)
+ {
+ desc_= _string;
}
Index: DodicoLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoLib.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** DodicoLib.java 19 May 2003 13:53:58 -0000 1.8
--- DodicoLib.java 4 Jul 2003 08:11:42 -0000 1.9
***************
*** 9,17 ****
--- 9,29 ----
package org.fudaa.dodico.commun;
+ import java.io.BufferedInputStream;
+ import java.io.BufferedOutputStream;
+ import java.io.BufferedReader;
+ import java.io.BufferedWriter;
import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.FileNotFoundException;
[...987 lines suppressed...]
! int temp;
! for (int i= n; i > n2; i--) {
! temp= _t[i];
! _t[i]= _t[nOffset - i];
! _t[nOffset - i]= temp;
! }
! }
!
! public static void main(String[] args) {
! int[] d=new int[]{1,2,3,4,5,6,7
! };
! invert(d);
! DodicoLib.printObject(d, true);
! d=new int[]{1,2,3,4,5,6
! };
! invert(d,7);
! DodicoLib.printObject(d, true);
! }
!
! }
Index: DodicoPreferences.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoPreferences.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DodicoPreferences.java 1 Apr 2003 09:06:54 -0000 1.3
--- DodicoPreferences.java 4 Jul 2003 08:11:42 -0000 1.4
***************
*** 10,14 ****
package org.fudaa.dodico.commun;
! import com.memoire.bu.*;
/**
--- 10,14 ----
package org.fudaa.dodico.commun;
! import com.memoire.bu.BuPreferences;
/**
***************
*** 16,26 ****
* @author Fred Deniger
*/
! public class DodicoPreferences
! extends BuPreferences
{
! public final static DodicoPreferences DODICO= new DodicoPreferences();
private DodicoPreferences()
{
}
--- 16,56 ----
* @author Fred Deniger
*/
! public class DodicoPreferences extends BuPreferences
{
! public final static DodicoPreferences DODICO = new DodicoPreferences();
! public static final String VALUE_SEPARATOR = ",";
! public static final String KEY_SEPARATOR = ".";
private DodicoPreferences()
{
+ }
+
+ public static String buildPrefKey(String _deb, String _fin)
+ {
+ return buildPrefKey(_deb,_fin,false);
+ }
+
+ public static String buildPrefKey(String _deb, String _fin, boolean _sepFin)
+ {
+ StringBuffer b = new StringBuffer(_deb.length() + _fin.length() + 2);
+ b.append(_deb).append(KEY_SEPARATOR).append(_fin);
+ if (_sepFin)
+ b.append(KEY_SEPARATOR);
+ return b.toString();
+ }
+
+ public static String buildPrefKey(String _a, String _b, String _c)
+ {
+ return buildPrefKey(_a, _b, _c, false);
+ }
+
+ public static String buildPrefKey(String _a, String _b, String _c, boolean _sepFin)
+ {
+ StringBuffer b = new StringBuffer(_a.length() + _b.length() + _c.length() + 1);
+ b.append(_a).append(KEY_SEPARATOR).append(_b).append(KEY_SEPARATOR).append(_c);
+ if (_sepFin)
+ b.append(KEY_SEPARATOR);
+ return b.toString();
+
}
Index: DodicoResource.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoResource.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DodicoResource.java 1 Apr 2003 09:06:54 -0000 1.3
--- DodicoResource.java 4 Jul 2003 08:11:42 -0000 1.4
***************
*** 10,14 ****
package org.fudaa.dodico.commun;
! import com.memoire.bu.*;
/**
--- 10,14 ----
package org.fudaa.dodico.commun;
! import com.memoire.bu.BuResource;
/**
Index: ProgressionBuAdapter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionBuAdapter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ProgressionBuAdapter.java 18 Mar 2003 10:48:48 -0000 1.5
--- ProgressionBuAdapter.java 4 Jul 2003 08:11:42 -0000 1.6
***************
*** 39,44 ****
public void setProgression(int _v)
{
- System.out.println("progression : "+_v);
if(t_!=null) t_.setProgression(_v);
}
}
--- 39,48 ----
public void setProgression(int _v)
{
if(t_!=null) t_.setProgression(_v);
+ }
+
+ public void setDesc(String _s)
+ {
+ if(t_!=null) t_.setName(_s);
}
}
Index: ProgressionDodicoAdapter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionDodicoAdapter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ProgressionDodicoAdapter.java 1 Apr 2003 09:06:55 -0000 1.4
--- ProgressionDodicoAdapter.java 4 Jul 2003 08:11:42 -0000 1.5
***************
*** 24,34 ****
{
t_=_t;
! if(_txt==null) t_.operation="";
! else t_.operation=_txt;
}
! public void setProgression(int _v)
{
! t_.pourcentage=_v;
}
}
--- 24,38 ----
{
t_=_t;
! setDesc(_txt);
}
! public final void setProgression(int _v)
{
! if(t_!=null) t_.pourcentage=_v;
! }
!
! public final void setDesc(String _s)
! {
! if(t_!=null) t_.operation=_s;
}
}
Index: ProgressionInterface.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionInterface.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ProgressionInterface.java 1 Apr 2003 09:06:56 -0000 1.3
--- ProgressionInterface.java 4 Jul 2003 08:11:42 -0000 1.4
***************
*** 18,21 ****
--- 18,22 ----
{
void setProgression(int _v);
+ void setDesc(String _s);
}
--- DodicoFileFormat.java DELETED ---
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/calcul
In directory sc8-pr-cvs1:/tmp/cvs-serv14783
Modified Files:
DCalcul.java
Added Files:
CalculExec.java CalculLauncher.java
CalculLauncherAbstract.java CalculLauncherExe.java
CalculListener.java
Log Message:
Les classes calcul permettent de lancer un code de calcul
dans le repertoire du fichier parametres
--- NEW FILE: CalculExec.java ---
/*
* @file CalculLauncher.java
* @creation 12 juin 2003
* @modification $Date: 2003/07/04 08:02:50 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.calcul;
import java.io.File;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import com.memoire.fu.FuLib;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoUI;
import org.fudaa.dodico.commun.DodicoUIDefault;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.objet.CExec;
import org.fudaa.dodico.objet.CExecListener;
/**
* @author deniger
* @version $Id: CalculExec.java,v 1.1 2003/07/04 08:02:50 deniger Exp $
*/
public abstract class CalculExec
{
PrintStream outError_;
PrintStream outStandard_;
ProgressionInterface progress_;
DodicoUI ui_;
public CalculExec()
{
outError_= System.err;
outStandard_= System.out;
}
public void launch(File _f, String[] _params,CExecListener _l)
{
if ((_params != null) && (_params.length > getMaxArgsNb()))
{
// _mng.error("Nombre d'arguments maximum " + getMaxArgsNb());
return;
}
if (ui_ == null)
ui_= DodicoUIDefault.INSTANCE;
String[] r= getLaunchArray(_f, _params, ui_);
if (r == null)
return;
CExec ex= new CExec(r);
ex.setCatchExceptions(true);
ex.setErrStream(outError_);
ex.setOutStream(outStandard_);
ex.setListener(_l);
if (progress_ != null)
{
progress_.setDesc("Lancement calcul");
progress_.setProgression(0);
}
try
{
ex.exec();
}
catch(RuntimeException _e)
{
ui_.error("Calcul termine avec erreur",_e.getMessage());
}
if (progress_ != null)
{
progress_.setDesc("Calcul termine");
progress_.setProgression(100);
}
}
public abstract int getMaxArgsNb();
public abstract String[] getLaunchArray(
File _paramsFile,
String[] _codeArgs,
DodicoUI _ui);
public static boolean getParams(File _f, String[] _codeArgs, List _l)
{
if (FuLib.isWindows())
return getWinParams(_f, _codeArgs, _l);
else
return getUnixParams(_f, _codeArgs, _l);
}
/**
* Ajoute a la liste _l les elements suivant ["C:","repertoire","nom fichier","_codeArgs[0]","_codeArgs[i]"....]
* Par exemple pour le fichier C:\toto\test.exe, renvoie [C:,\toto\,test.exe].
* @param _codeArgs les arguments du code de calcul. peuvent être nuls.
*/
public static boolean getWinParams(File _f, String[] _codeArgs, List _l)
{
if (_f.getParentFile() == null)
return false;
String parentPath= _f.getParentFile().getAbsolutePath();
int index= parentPath.indexOf(":");
if (index < 0)
return false;
int n= _codeArgs == null ? 0 : _codeArgs.length;
_l.add(parentPath.substring(0, index + 1));
_l.add(parentPath.substring(index + 1));
_l.add(_f.getName());
for (int i= 0; i < n; i++)
{
_l.add(_codeArgs[i]);
}
return true;
}
public static String[] getParams(File _f, String[] _codeArgs)
{
int n= _codeArgs == null ? 0 : _codeArgs.length;
ArrayList l= new ArrayList(n + 5);
if (getParams(_f, _codeArgs, l))
{
return DodicoLib.enTableau(l);
}
else
return null;
}
public static String[] getWinParams(File _f, String[] _codeArgs)
{
int n= _codeArgs == null ? 0 : _codeArgs.length;
ArrayList l= new ArrayList(n + 5);
if (getWinParams(_f, _codeArgs, l))
{
return DodicoLib.enTableau(l);
}
else
return null;
}
public static String[] getUnixParams(File _f, String[] _codeArgs)
{
int n= _codeArgs == null ? 0 : _codeArgs.length;
ArrayList l= new ArrayList(n + 5);
if (getUnixParams(_f, _codeArgs, l))
{
return DodicoLib.enTableau(l);
}
else
return null;
}
/**
* Ajoute a la liste _l un tableau du style [repertoire_fichier,nom_fichier,_codeArgs[0],_codeArgs[i]....]
* @param _codeArgs les arguments du code de calcul. peuvent être nuls.
*/
public static boolean getUnixParams(File _f, String[] _codeArgs, List _l)
{
if (_f.getParentFile() == null)
return false;
int n= _codeArgs == null ? 0 : _codeArgs.length;
_l.add(_f.getParentFile().getAbsolutePath());
_l.add(_f.getName());
for (int i= 0; i < n; i++)
{
_l.add(_codeArgs[i]);
}
return true;
}
/**
* Permet de creer (si necessaire) un launcher special pour le code
* <code>_serveurName</code>. A partir d'un template
* (le fichier serveur/<code>_launchertplFile</code>)
* cree un launcher <code>_launcherFile</code> qui pourra
* lancer l'executable <code>_exeFile</code> depuis n'importe quel
* dossier. Le calculManager ne sert qu'a recuperer les erreurs.
* Voir le serveur reflux pour exemple.
* @return renvoie un tableau du type [_launchFile,_launcherArgs[0],_launcherArgs[i],...]
*
*/
public static String[] manageLauncher(
String _serveurName,
String _exeFile,
String _launchtplFile,
String _launchFile,
String[] _launcherArgs,
DodicoUI _ui)
{
File serveurDir= new File("serveurs/" + _serveurName + "/");
System.out.println(serveurDir.getAbsolutePath());
File launchFile= new File(serveurDir, _launchFile);
if (!launchFile.exists())
{
File in= new File(serveurDir, _launchtplFile);
File serveur= new File(serveurDir, _exeFile);
String newToken= serveur.getAbsolutePath();
if (!DodicoLib.replaceAndCopyFile(in, launchFile, "@exe@", newToken))
{
_ui.error(
"Copie de fichier",
"Erreur lors de la copie de " + _launchtplFile);
}
}
int n= _launcherArgs == null ? 0 : _launcherArgs.length;
String[] r= new String[1 + n];
r[0]= launchFile.getAbsolutePath();
for (int i= 0; i < n; i++)
{
r[i + 1]= _launcherArgs[i];
}
return r;
}
/**
*
*/
public PrintStream getOutError()
{
return outError_;
}
/**
*
*/
public PrintStream getOutStandard()
{
return outStandard_;
}
/**
*
*/
public void setOutError(PrintStream _writer)
{
outError_= _writer;
}
/**
*
*/
public void setOutStandard(PrintStream _writer)
{
outStandard_= _writer;
}
/**
* @return
*/
public ProgressionInterface getProgression()
{
return progress_;
}
/**
* @param _interface
*/
public void setProgression(ProgressionInterface _interface)
{
progress_= _interface;
}
/**
* @return
*/
public DodicoUI getUI()
{
return ui_;
}
/**
* @param _dodicoUI
*/
public void setUI(DodicoUI _dodicoUI)
{
if (_dodicoUI != null)
ui_= _dodicoUI;
}
}
--- NEW FILE: CalculLauncher.java ---
/*
* @file CalculManager.java
* @creation 12 juin 2003
* @modification $Date: 2003/07/04 08:02:50 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.calcul;
import java.io.PrintStream;
/**
* @author deniger
* @version $Id: CalculLauncher.java,v 1.1 2003/07/04 08:02:50 deniger Exp $
*/
public interface CalculLauncher
{
public void execute();
public void stop();
public void setArgs(String[] _args);
public boolean isFinished();
public void addListener(CalculListener _l);
public boolean containsListener(CalculListener _l);
public void removeListener(CalculListener _l);
public void setErr(PrintStream _err);
public void setStd(PrintStream _std);
}
--- NEW FILE: CalculLauncherAbstract.java ---
/*
* @file CalculManagerLocalAbstract.java
* @creation 13 juin 2003
* @modification $Date: 2003/07/04 08:02:50 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.calcul;
import java.io.File;
import java.io.PrintStream;
import java.util.ArrayList;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
/**
* @author deniger
* @version $Id: CalculLauncherAbstract.java,v 1.1 2003/07/04 08:02:50 deniger Exp $
*/
public abstract class CalculLauncherAbstract implements CalculLauncher
{
protected String[] args_;
protected ArrayList listeners_;
public void setArgs(String[] _args)
{
args_ = _args;
}
public void addListener(CalculListener _l)
{
if(listeners_==null) listeners_=new ArrayList(10);
synchronized(listeners_)
{
listeners_.add(_l);
}
}
public boolean containsListener(CalculListener _l)
{
if(listeners_==null) return false;
return listeners_.contains(_l);
}
public void removeListener(CalculListener _l)
{
if(listeners_==null) return ;
listeners_.remove(_l);
}
public void fireFinishedEvent()
{
if(listeners_==null) return;
int n=listeners_.size()-1;
for(int i=n;i>=0;i--)
{
((CalculListener)listeners_.get(i)).calculFinished(this);
}
}
}
--- NEW FILE: CalculLauncherExe.java ---
/*
* @file CalculManagerLocalDefault.java
* @creation 13 juin 2003
* @modification $Date: 2003/07/04 08:02:50 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.calcul;
import java.io.File;
import java.io.PrintStream;
import com.memoire.bu.BuTaskOperation;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoUI;
import org.fudaa.dodico.commun.DodicoUIDefault;
import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.objet.CExecListener;
/**
* @author deniger
* @version $Id: CalculLauncherExe.java,v 1.1 2003/07/04 08:02:50 deniger Exp $
*/
public class CalculLauncherExe extends CalculLauncherAbstract implements CExecListener
{
protected boolean finished_;
protected Process p_;
protected CalculExec exe_;
protected File f_;
protected DodicoUI ui_;
protected boolean stop_;
public CalculLauncherExe(CalculExec _exe)
{
exe_= _exe;
ui_= DodicoUIDefault.INSTANCE;
}
public void setUI(DodicoUI _ui)
{
ui_= _ui;
}
public String[] manageArgs()
{
return args_;
}
/**
*
*/
public void execute()
{
if (exe_ == null)
ui_.error("Executable non précisé");
new BuTaskOperation(null, "Calcul " + f_.getName())
{
public void act()
{
finished_= false;
_launchFudaaExec(new ProgressionBuAdapter(this));
finished_= true;
}
}.start();
}
protected void _launchFudaaExec(ProgressionInterface _progress)
{
exe_.setUI(ui_);
exe_.setProgression(_progress);
exe_.launch(f_,manageArgs(),CalculLauncherExe.this);
}
/**
*
*/
public boolean isFinished()
{
return finished_;
}
/**
*
*/
public void stop()
{
if(p_!=null)
{
p_.destroy();
}
}
/**
* @return
*/
public CalculExec getExe()
{
return exe_;
}
/**
* @return
*/
public File getFile()
{
return f_;
}
/**
* @param _file
*/
public void setFile(File _file)
{
f_= _file;
}
/**
* @param _err
*/
public void setErr(PrintStream _err)
{
exe_.setOutError(_err);
}
/**
* @param _std
*/
public void setStd(PrintStream _std)
{
exe_.setOutStandard(_std);
}
/**
* Methode appelee par CExec afin d'enregistrer le process
* avant de geler le thread de Cexec. Cela permet de détruire le process.
* @param p
*/
public void setProcess(Process p)
{
p_=p;
}
}
--- NEW FILE: CalculListener.java ---
/*
* @file CalculListener.java
* @creation 13 juin 2003
* @modification $Date: 2003/07/04 08:02:50 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.calcul;
/**
* @author deniger
* @version $Id: CalculListener.java,v 1.1 2003/07/04 08:02:50 deniger Exp $
*/
public interface CalculListener
{
public void calculFinished(CalculLauncher _source);
}
Index: DCalcul.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/calcul/DCalcul.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DCalcul.java 11 Apr 2003 16:08:50 -0000 1.3
--- DCalcul.java 4 Jul 2003 08:02:50 -0000 1.4
***************
*** 229,233 ****
String javaClassName=packagename+".D"+prefix+suffix;
try {
! System.err.println("DCalcul: instancie "+javaClassName);
Class clazz=Class.forName(javaClassName);
Constructor constr=clazz.getConstructor(new Class[0]);
--- 229,233 ----
String javaClassName=packagename+".D"+prefix+suffix;
try {
! // System.err.println("DCalcul: instancie "+javaClassName);
Class clazz=Class.forName(javaClassName);
Constructor constr=clazz.getConstructor(new Class[0]);
***************
*** 241,245 ****
object=null;
}
- System.err.println("DCalcul: instancie OK");
return object;
}
--- 241,244 ----
|
|
From: <de...@us...> - 2003-07-04 07:58:34
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/ant
In directory sc8-pr-cvs1:/tmp/cvs-serv14273
Modified Files:
genereUsine.java
Log Message:
Modif mineure
Index: genereUsine.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/ant/genereUsine.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** genereUsine.java 18 Mar 2003 10:40:49 -0000 1.2
--- genereUsine.java 4 Jul 2003 07:58:31 -0000 1.3
***************
*** 255,266 ****
j(" {");
j(" " + iobjet + " nouvTie=null;");
! j(" try {");
! j(" java.lang.Class dclass=java.lang.Class.forName(\"" + dobjet + "\");");
! j(" java.lang.reflect.Constructor dconstr=dclass.getConstructor(new Class[0]);");
! j(" java.lang.Object o=dconstr.newInstance(new Object[0]);");
! j(" nouvTie=(" + iobjet + ")(((" + pkgPrefixImpl_ + ".objet.DObjet)o).tie());");
! j(" } catch( java.lang.Exception e ) {");
! j(" e.printStackTrace();");
! j(" }");
j(" fireObjetCree(\"" + className + "\", nouvTie);");
j(" return nouvTie;");
--- 255,269 ----
j(" {");
j(" " + iobjet + " nouvTie=null;");
! // j(" try {");
! // j(" java.lang.Class dclass=java.lang.Class.forName(\"" + dobjet + "\");");
! // j(" java.lang.reflect.Constructor dconstr=dclass.getConstructor(new Class[0]);");
! // j(" java.lang.Object o=dconstr.newInstance(new Object[0]);");
! // j(" nouvTie=(" + iobjet + ")(((" + pkgPrefixImpl_ + ".objet.DObjet)o).tie());");
! // j(" } catch( java.lang.Exception e ) {");
! // j(" e.printStackTrace();");
! // j(" }");
! j(" "+dobjet+" o=new "+dobjet+"();");
! j(" nouvTie=" + iobjet +"Helper.narrow(o.tie());");
!
j(" fireObjetCree(\"" + className + "\", nouvTie);");
j(" return nouvTie;");
|
|
From: <de...@us...> - 2003-07-04 07:41:29
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/idl/code
In directory sc8-pr-cvs1:/tmp/cvs-serv12264/code
Modified Files:
tr.idl
Log Message:
Suppression du time out sur les taches
Maj de tr: ce fichier sera supprime par la suite
Index: tr.idl
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/idl/code/tr.idl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** tr.idl 17 Apr 2003 17:11:07 -0000 1.2
--- tr.idl 4 Jul 2003 07:41:23 -0000 1.3
***************
*** 100,104 ****
chaine traceurCode;
reel traceur;
! //Relfux : un frottement peut etre libre,permanent ou transitoire.
chaine stricklerCode;
reel strickler;
--- 100,104 ----
chaine traceurCode;
reel traceur;
! //Reflux : un frottement peut etre libre,permanent ou transitoire.
chaine stricklerCode;
reel strickler;
|
|
From: <de...@us...> - 2003-07-04 07:41:26
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/idl/general
In directory sc8-pr-cvs1:/tmp/cvs-serv12264/general
Modified Files:
objet.idl
Log Message:
Suppression du time out sur les taches
Maj de tr: ce fichier sera supprime par la suite
Index: objet.idl
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/idl/general/objet.idl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** objet.idl 1 Apr 2003 08:33:45 -0000 1.7
--- objet.idl 4 Jul 2003 07:41:23 -0000 1.8
***************
*** 93,99 ****
long long dateCourante();
entier numero();
! long long tempsInactif();
long long timeout();
! booleen timeoutAtteint();
attribute booleen connecte;
attribute vchaine log;
--- 93,99 ----
long long dateCourante();
entier numero();
! /** long long tempsInactif();
long long timeout();
! booleen timeoutAtteint();*/
attribute booleen connecte;
attribute vchaine log;
|
|
From: <de...@us...> - 2003-07-04 07:37:09
|
Update of /cvsroot/fudaa/fudaa_devel/ctulu/lib In directory sc8-pr-cvs1:/tmp/cvs-serv11629/lib Modified Files: ant.jar Added Files: trove-1.0.2.src.jar trove.jar Log Message: Ajout d'une libraire pour manipuler les list,map de types primitifs --- NEW FILE: trove-1.0.2.src.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: trove.jar --- (This appears to be a binary file; contents omitted.) Index: ant.jar =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ctulu/lib/ant.jar,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsG90xxg and /tmp/cvs6ThGcq differ |
|
From: <jm_...@us...> - 2003-06-08 22:13:07
|
Update of /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d In directory sc8-pr-cvs1:/tmp/cvs-serv21976 Added Files: hydraulique1d-casier.gif hydraulique1d-liaisoncasier.gif Log Message: intégration ressources casier --- NEW FILE: hydraulique1d-casier.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: hydraulique1d-liaisoncasier.gif --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau
In directory sc8-pr-cvs1:/tmp/cvs-serv21058/reseau
Modified Files:
Hydraulique1dReseauFrame.java Hydraulique1dReseauPalette.java
Added Files:
Hydraulique1dReseauCasier.java
Hydraulique1dReseauLiaisonCasier.java
Log Message:
intégration casier
--- NEW FILE: Hydraulique1dReseauCasier.java ---
/*
* @file Hydraulique1dReseauCasier.java
* @creation 2003-06-06
* @modification $Date: 2003/06/08 22:10:19 $
* @license GNU General Public License 2
* @copyright (c)1998-2003 EDF/LNHE
* @mail de...@fu...
*/
package org.fudaa.fudaa.hydraulique1d.reseau;
import java.awt.Color;
import org.fudaa.dodico.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import com.memoire.dja.DjaRoundBox;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 22:10:19 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public class Hydraulique1dReseauCasier extends DjaRoundBox {
private static int numero=0;
Hydraulique1dReseauCasier(ICasier icasier){
super();
numero++;
super.addText(""+numero);
super.setForeground(Color.blue);
if (icasier!=null) putData("casier", icasier);
}
Hydraulique1dReseauCasier(){
this(null);
}
public String[] getInfos() {
IHydraulique1d iobjet = (IHydraulique1d)getData("casier");
return iobjet.getInfos();
}
}
--- NEW FILE: Hydraulique1dReseauLiaisonCasier.java ---
/*
* @file Hydraulique1dReseauLiaisonCasier.java
* @creation 2003-06-06
* @modification $Date: 2003/06/08 22:10:19 $
* @license GNU General Public License 2
* @copyright (c)1998-2003 EDF/LNHE
* @mail de...@fu...
*/
package org.fudaa.fudaa.hydraulique1d.reseau;
import java.awt.Color;
import org.fudaa.dodico.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import com.memoire.dja.DjaAnchor;
import com.memoire.dja.DjaBrokenArrow;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 22:10:19 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public class Hydraulique1dReseauLiaisonCasier extends DjaBrokenArrow {
Hydraulique1dReseauLiaisonCasier(ILiaison iliaison){
super();
super.setForeground(Color.blue);
super.setEndType(0); // pas de fleche à l'extrémité de fin
if (iliaison!=null) putData("liaison", iliaison);
}
Hydraulique1dReseauLiaisonCasier(){
this(null);
}
public DjaAnchor[] getAnchors() {
DjaAnchor[] r=new DjaAnchor[0];
return r;
}
public String[] getInfos() {
IHydraulique1d iobjet = (IHydraulique1d)getData("liaison");
return iobjet.getInfos();
}
}
Index: Hydraulique1dReseauFrame.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauFrame.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Hydraulique1dReseauFrame.java 18 Mar 2003 17:55:46 -0000 1.3
--- Hydraulique1dReseauFrame.java 8 Jun 2003 22:10:19 -0000 1.4
***************
*** 100,104 ****
}
!
public void addBief(String type){
--- 100,104 ----
}
!
public void addBief(String type){
***************
*** 182,185 ****
--- 182,199 ----
}
+ public void addCasier() {
+ ICasier icasier = reseau_.ajouterCasier();
+ Hydraulique1dReseauCasier casier = new Hydraulique1dReseauCasier(icasier);
+ grid_.add(casier);
+ repaint();
+ }
+
+ public void addLiaisonCasier() {
+ ILiaison iliaison = reseau_.ajouterLiaison();
+ Hydraulique1dReseauLiaisonCasier liaison = new Hydraulique1dReseauLiaisonCasier(iliaison);
+ grid_.add(liaison);
+ repaint();
+ }
+
/* public void addBarragePrincipal() {
IParametresGeneraux paramGen = etude.paramGeneraux();
***************
*** 323,327 ****
if("Barrage/Seuil".equals(arg)) addSeuil();
if("Déversoir latéral".equals(arg)) addDeversoir();
! // if("Barrage principal".equals(arg)) addBarragePrincipal();
}
else {
--- 337,342 ----
if("Barrage/Seuil".equals(arg)) addSeuil();
if("Déversoir latéral".equals(arg)) addDeversoir();
! if("Casier".equals(arg)) addCasier();
! if("Liaison casier".equals(arg)) addLiaisonCasier();
}
else {
Index: Hydraulique1dReseauPalette.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauPalette.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Hydraulique1dReseauPalette.java 18 Mar 2003 17:55:45 -0000 1.3
--- Hydraulique1dReseauPalette.java 8 Jun 2003 22:10:19 -0000 1.4
***************
*** 31,43 ****
BuGridLayout layout_;
- // String[] names={ "Bief", "Confluent", "Débit d'apport", "Perte de charge locale",
- // "Barrage/Seuil", "Déversoir latéral", "Barrage principal"};
String[] names={ "Bief", "Confluent", "Débit d'apport", "Perte de charge locale",
! "Barrage/Seuil", "Déversoir latéral"};
// String[] icons={ "bief", "confluent", "apport", "pertecharge",
// "seuil", "deversoir", "barrageprincipal"};
String[] icons={ "bief", "confluent", "apport", "pertecharge",
! "seuil", "deversoir"};
public Hydraulique1dReseauPalette(ActionListener _al)
--- 31,41 ----
BuGridLayout layout_;
String[] names={ "Bief", "Confluent", "Débit d'apport", "Perte de charge locale",
! "Barrage/Seuil", "Déversoir latéral", "Casier", "Liaison casier"};
// String[] icons={ "bief", "confluent", "apport", "pertecharge",
// "seuil", "deversoir", "barrageprincipal"};
String[] icons={ "bief", "confluent", "apport", "pertecharge",
! "seuil", "deversoir", "-casier", "-liaisoncasier"};
public Hydraulique1dReseauPalette(ActionListener _al)
|
|
From: <jm_...@us...> - 2003-06-08 22:10:21
|
Update of /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor In directory sc8-pr-cvs1:/tmp/cvs-serv21058/editor Modified Files: Hydraulique1dParametresTemporelsEditor.java Log Message: intégration casier Index: Hydraulique1dParametresTemporelsEditor.java =================================================================== RCS file: /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresTemporelsEditor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Hydraulique1dParametresTemporelsEditor.java 17 May 2003 21:30:20 -0000 1.4 --- Hydraulique1dParametresTemporelsEditor.java 8 Jun 2003 22:10:18 -0000 1.5 *************** *** 30,33 **** --- 30,34 ---- /** * @version $Revision$ $Date$ by $Author$ + * @version $Revision$ $Date$ by $Author$ * @author Jean-Marc Lacombe */ |
|
From: <jm_...@us...> - 2003-06-08 20:52:26
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d
In directory sc8-pr-cvs1:/tmp/cvs-serv24898/hydraulique1d
Added Files:
DCasier.java DLiaison.java DParametresGenerauxCasier.java
Log Message:
intégration casier
--- NEW FILE: DCasier.java ---
/*
* @file DCasier.java
* @creation
* @modification $Date: 2003/06/08 20:52:23 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.geometrie.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import org.fudaa.dodico.corba.hydraulique1d.loi.ILoiHydrogramme;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:52:23 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public class DCasier
extends DHydraulique1d
implements ICasierOperations
{
public void initialise(IObjet _o)
{
if(_o instanceof ICasier) {
ICasier q=(ICasier)_o;
if (q.geometrie()!=null) geometrie((IGeometrieCasier)q.geometrie().creeClone());
loiRattachee((ILoiHydrogramme)q.loiRattachee());
if (q.nom()!=null) {
nom(new String(q.nom()));
}
coteInitiale(q.coteInitiale());
}
}
final public IObjet creeClone()
{
ICasier p=CDodico.findUsine().creeHydraulique1dCasier();
p.initialise(tie());
return p;
}
final public String toString()
{
String s="Casier : "+nom_;
return s;
}
/*** ICasier ***/
// constructeurs
public DCasier()
{
super();
id_=Identifieur.IDENTIFIEUR.identificateurLibre(getClass().getName());
nom_="Casier"+id_;
coteInitiale_=0.;
geometrie_=CDodico.findUsine().creeHydraulique1dNuagePointsCasier();
loiRattachee_=null;
}
public void dispose()
{
id_=0;
nom_=null;
coteInitiale_=0.;
geometrie_=null;
loiRattachee_=null;
super.dispose();
}
// attributs
private int id_;
private String nom_;
public String nom()
{ return nom_; }
public void nom(String s)
{
nom_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "nom");
}
private double coteInitiale_;
public double coteInitiale()
{ return coteInitiale_; }
public void coteInitiale(double s)
{
coteInitiale_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "coteInitiale");
}
private ILoiHydrogramme loiRattachee_;
public ILoiHydrogramme loiRattachee() {
return loiRattachee_;
}
public void loiRattachee (ILoiHydrogramme s) {
loiRattachee_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "loiRattachee");
}
private IGeometrieCasier geometrie_;
public IGeometrieCasier geometrie() {
return geometrie_;
}
public void geometrie(IGeometrieCasier s) {
geometrie_ = s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "geometrie");
}
// les méthodes
public boolean isNuagePoints() {
return geometrie_.isNuagePoints();
}
public void toNuagePoints() {
if (isNuagePoints()) return;
IGeometrieCasier g=CDodico.findUsine().creeHydraulique1dNuagePointsCasier();
geometrie(g);
}
public boolean isPlanimetrage() {
return geometrie_.isPlanimetrage();
}
public void toPlanimetrage() {
if (isPlanimetrage()) return;
IGeometrieCasier g=CDodico.findUsine().creeHydraulique1dPlanimetrageCasier();
geometrie(g);
}
}
--- NEW FILE: DLiaison.java ---
/*
* @file DLiaison.java
* @creation
* @modification $Date: 2003/06/08 20:52:23 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.ICasier;
import org.fudaa.dodico.corba.hydraulique1d.ILiaison;
import org.fudaa.dodico.corba.hydraulique1d.ILiaisonOperations;
import org.fudaa.dodico.corba.hydraulique1d.casier.ITopologieLiaison;
import org.fudaa.dodico.corba.hydraulique1d.casier.ICaracteristiqueLiaison;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:52:23 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public class DLiaison
extends DHydraulique1d
implements ILiaisonOperations
{
public void initialise(IObjet _o)
{
if(_o instanceof ILiaison) {
ILiaison q=(ILiaison)_o;
if (q.topologie()!=null) topologie((ITopologieLiaison)q.topologie().creeClone());
if (q.caracteristiques()!=null) caracteristiques((ICaracteristiqueLiaison)q.caracteristiques().creeClone());
}
}
final public IObjet creeClone()
{
ILiaison p=CDodico.findUsine().creeHydraulique1dLiaison();
p.initialise(tie());
return p;
}
final public String toString()
{
return "Liaison"+id_;
}
/*** ILiaison ***/
// constructeurs
public DLiaison()
{
super();
id_=Identifieur.IDENTIFIEUR.identificateurLibre(getClass().getName());
topologie_=null;
caracteristiques_=null;
}
public void dispose()
{
id_=0;
topologie_=null;
caracteristiques_=null;
super.dispose();
}
// attributs
private int id_;
private ITopologieLiaison topologie_;
public ITopologieLiaison topologie() {
return topologie_;
}
public void topologie(ITopologieLiaison s) {
topologie_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "topologie");
}
private ICaracteristiqueLiaison caracteristiques_;
public ICaracteristiqueLiaison caracteristiques(){
return caracteristiques_;
}
public void caracteristiques (ICaracteristiqueLiaison s) {
caracteristiques_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "caracteristiques");
}
// méthodes
public boolean isRiviereCasier(){
return topologie_.isRiviereCasier();
}
public void toRiviereCasier(){
if (isRiviereCasier()) return;
ITopologieLiaison g=CDodico.findUsine().creeHydraulique1dTopologieRiviereCasier();
topologie(g);
}
public boolean isCasierCasier(){
return topologie_.isCasierCasier();
}
public void toCasierCasier(){
if (isCasierCasier()) return;
ITopologieLiaison g=CDodico.findUsine().creeHydraulique1dTopologieCasierCasier();
topologie(g);
}
public double getAbscisse(){
return topologie_.getAbscisse();
}
public void setAbscisse(double abscisse){
topologie_.setAbscisse(abscisse);
}
public ICasier getCasierRattache(){
return topologie_.getCasierRattache();
}
public void setCasierRattache(ICasier casierRattache){
topologie_.setCasierRattache(casierRattache);
}
public ICasier getCasierAmontRattache(){
return topologie_.getCasierAmontRattache();
}
public void setCasierAmontRattache(ICasier casierRattache){
topologie_.setCasierAmontRattache(casierRattache);
}
public ICasier getCasierAvalRattache(){
return topologie_.getCasierAvalRattache();
}
public void setCasierAvalRattache(ICasier casierRattache){
topologie_.setCasierAvalRattache(casierRattache);
}
public boolean isSeuil(){
return caracteristiques_.isSeuil();
}
public void toSeuil(){
if (isSeuil()) return;
ICaracteristiqueLiaison carac = CDodico.findUsine().creeHydraulique1dSeuilLiaison();
caracteristiques(carac);
}
public boolean isChenal(){
return caracteristiques_.isChenal();
}
public void toChenal(){
if (isChenal()) return;
ICaracteristiqueLiaison carac = CDodico.findUsine().creeHydraulique1dChenalLiaison();
caracteristiques(carac);
}
public boolean isSiphon(){
return caracteristiques_.isChenal();
}
public void toSiphon(){
if (isSiphon()) return;
ICaracteristiqueLiaison carac = CDodico.findUsine().creeHydraulique1dSiphonLiaison();
caracteristiques(carac);
}
public double getCote(){
return caracteristiques_.getCote();
}
public void setCote(double cote){
caracteristiques_.setCote(cote);
}
public double getLargeur(){
return caracteristiques_.getLargeur();
}
public void setLargeur(double largeur){
caracteristiques_.setLargeur(largeur);
}
public double getLongueur(){
return caracteristiques_.getLongueur();
}
public void setLongueur(double longueur){
caracteristiques_.setLongueur(longueur);
}
public double getCoefQ(){
return caracteristiques_.getCoefQ();
}
public void setCoefQ(double coefQ){
caracteristiques_.setCoefQ(coefQ);
}
public double getSection(){
return caracteristiques_.getSection();
}
public void setSection(double section){
caracteristiques_.setSection(section);
}
public double getCoefEnnoiment(){
return caracteristiques_.getCoefEnnoiment();
}
public void setCoefEnnoiment(double coefEnnoiment){
caracteristiques_.setCoefEnnoiment(coefEnnoiment);
}
public double getRugosite(){
return caracteristiques_.getRugosite();
}
public void setRugosite(double rugosite){
caracteristiques_.setRugosite(rugosite);
}
public double getCoefPerteCharge(){
return caracteristiques_.getCoefPerteCharge();
}
public void setCoefPerteCharge(double coefPerteCharge){
caracteristiques_.setCoefPerteCharge(coefPerteCharge);
}
}
--- NEW FILE: DParametresGenerauxCasier.java ---
/*
* @file DParametresGenerauxCasier.java
* @creation 2003-05-30
* @modification $Date: 2003/06/08 20:52:23 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:52:23 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public class DParametresGenerauxCasier
extends DHydraulique1d
implements IParametresGenerauxCasierOperations
{
/*** IObjet ***/
public void initialise(IObjet _o)
{
if(_o instanceof IParametresGenerauxCasier) {
IParametresGenerauxCasier q=(IParametresGenerauxCasier)_o;
coefImplicitationCasier(q.coefImplicitationCasier());
coefImplicitationCouplage(q.coefImplicitationCouplage());
nbMaxIterationCouplage(q.nbMaxIterationCouplage());
}
}
public IObjet creeClone()
{
IParametresGenerauxCasier p=CDodico.findUsine().creeHydraulique1dParametresGenerauxCasier();
p.initialise(tie());
return p;
}
public String toString()
{
String s="ParametresGenerauxCasier";
s+=": "+coefImplicitationCasier_+","+coefImplicitationCouplage_+","+nbMaxIterationCouplage_;
return s;
}
/*** IParametresGenerauxCasier ***/
// constructeurs
public DParametresGenerauxCasier()
{
super();
coefImplicitationCasier_=0.5;
coefImplicitationCouplage_=0.5;
nbMaxIterationCouplage_=1;
}
// destructeur
public void dispose()
{
coefImplicitationCasier_=0.;
coefImplicitationCouplage_=0;
nbMaxIterationCouplage_=0;
super.dispose();
}
// attributs
private double coefImplicitationCasier_;
public double coefImplicitationCasier()
{ return coefImplicitationCasier_; }
public void coefImplicitationCasier(double t)
{
coefImplicitationCasier_=t;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "coefImplicitationCasier");
}
private double coefImplicitationCouplage_;
public double coefImplicitationCouplage()
{ return coefImplicitationCouplage_; }
public void coefImplicitationCouplage(double t)
{
coefImplicitationCouplage_=t;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "coefImplicitationCouplage");
}
private int nbMaxIterationCouplage_;
public int nbMaxIterationCouplage()
{ return nbMaxIterationCouplage_; }
public void nbMaxIterationCouplage(int t)
{
nbMaxIterationCouplage_=t;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "nbMaxIterationCouplage");
}
}
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/casier
In directory sc8-pr-cvs1:/tmp/cvs-serv23483/hydraulique1d/casier
Added Files:
DCalageImage.java DCaracteristiqueLiaison.java
DChenalLiaison.java DGeometrieCasier.java
DNuagePointsCasier.java DPlanimetrageCasier.java
DSeuilLiaison.java DSiphonLiaison.java
DTopologieCasierCasier.java DTopologieLiaison.java
DTopologieRiviereCasier.java
Log Message:
intégration casier
--- NEW FILE: DCalageImage.java ---
/*
* @file DCalageImage.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.geometrie.SPoint2D;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import org.fudaa.dodico.hydraulique1d.DHydraulique1d;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public final class DCalageImage
extends DHydraulique1d
implements ICalageImageOperations
{
public void initialise(IObjet _o)
{
super.initialise(_o);
if(_o instanceof ICalageImage) {
ICalageImage q=(ICalageImage)_o;
pt1Pixel(clone(q.pt1Pixel()));
pt2Pixel(clone(q.pt2Pixel()));
pt3Pixel(clone(q.pt3Pixel()));
pt1Utilisateur(clone(q.pt1Utilisateur()));
pt2Utilisateur(clone(q.pt2Utilisateur()));
pt3Utilisateur(clone(q.pt3Utilisateur()));
}
}
final public IObjet creeClone()
{
ICalageImage p=CDodico.findUsine().creeHydraulique1dCalageImage();
p.initialise(tie());
return p;
}
/*** ILiaison ***/
// constructeurs
public DCalageImage()
{
super();
pt1Pixel_.x=0;
pt1Pixel_.y=0;
pt1Utilisateur_.x=0;
pt1Utilisateur_.y=0;
pt2Pixel_.x=10;
pt2Pixel_.y=0;
pt2Utilisateur_.x=10;
pt2Utilisateur_.y=0;
pt3Pixel_.x=0;
pt3Pixel_.y=10;
pt3Utilisateur_.x=0;
pt3Utilisateur_.y=10;
}
public void dispose()
{
pt1Pixel_.x=0;
pt1Pixel_.y=0;
pt1Utilisateur_.x=0;
pt1Utilisateur_.y=0;
pt2Pixel_.x=0;
pt2Pixel_.y=0;
pt2Utilisateur_.x=0;
pt2Utilisateur_.y=0;
pt3Pixel_.x=0;
pt3Pixel_.y=0;
pt3Utilisateur_.x=0;
pt3Utilisateur_.y=0;
super.dispose();
}
/*** ICalageImage ***/
// attributs
private SPoint2D pt1Pixel_;
public SPoint2D pt1Pixel() {
return pt1Pixel_;
}
public void pt1Pixel(SPoint2D s) {
pt1Pixel_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "pt1Pixel");
}
private SPoint2D pt1Utilisateur_;
public SPoint2D pt1Utilisateur() {
return pt1Utilisateur_;
}
public void pt1Utilisateur(SPoint2D s) {
pt1Utilisateur_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "pt1Utilisateur");
}
private SPoint2D pt2Pixel_;
public SPoint2D pt2Pixel() {
return pt2Pixel_;
}
public void pt2Pixel(SPoint2D s) {
pt2Pixel_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "pt2Pixel");
}
private SPoint2D pt2Utilisateur_;
public SPoint2D pt2Utilisateur() {
return pt2Utilisateur_;
}
public void pt2Utilisateur(SPoint2D s) {
pt2Utilisateur_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "pt2Utilisateur");
}
private SPoint2D pt3Pixel_;
public SPoint2D pt3Pixel() {
return pt3Pixel_;
}
public void pt3Pixel(SPoint2D s) {
pt3Pixel_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "pt3Pixel");
}
private SPoint2D pt3Utilisateur_;
public SPoint2D pt3Utilisateur() {
return pt3Utilisateur_;
}
public void pt3Utilisateur(SPoint2D s) {
pt3Utilisateur_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "pt3Utilisateur");
}
private static SPoint2D clone(SPoint2D pt) {
SPoint2D ptClone = new SPoint2D();
ptClone.x = pt.x;
ptClone.y = pt.y;
return ptClone;
}
}
--- NEW FILE: DCaracteristiqueLiaison.java ---
/*
* @file DCaracteristiqueLiaison.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import org.fudaa.dodico.hydraulique1d.DHydraulique1d;
import org.fudaa.dodico.hydraulique1d.Identifieur;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public abstract class DCaracteristiqueLiaison
extends DHydraulique1d
implements ICaracteristiqueLiaisonOperations
{
public void initialise(IObjet _o)
{
if(_o instanceof ICaracteristiqueLiaison) {
ICaracteristiqueLiaison q=(ICaracteristiqueLiaison)_o;
cote(q.cote());
}
}
final public String toString()
{
return "CaracteristiqueLiaison"+id_;
}
public DCaracteristiqueLiaison()
{
super();
id_=Identifieur.IDENTIFIEUR.identificateurLibre(getClass().getName());
}
public void dispose()
{
cote_=0;
super.dispose();
}
/*** ICaracteristiqueLiaison ***/
// attributs
protected int id_;
protected double cote_;
public double cote() {
return cote_;
}
public void cote(double s) {
cote_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "cote");
}
// méthodes
public boolean isSeuil(){
return false;
}
public boolean isChenal(){
return false;
}
public boolean isSiphon(){
return false;
}
public double getCote(){
throw new IllegalArgumentException("methode invalide : getCote()");
}
public void setCote(double cote){
throw new IllegalArgumentException("methode invalide : setCote()");
}
public double getLargeur(){
throw new IllegalArgumentException("methode invalide : getLargeur()");
}
public void setLargeur(double largeur){
throw new IllegalArgumentException("methode invalide : setLargeur()");
}
public double getLongueur(){
throw new IllegalArgumentException("methode invalide : getLongueur()");
}
public void setLongueur(double longueur){
throw new IllegalArgumentException("methode invalide : setLongueur()");
}
public double getCoefQ(){
throw new IllegalArgumentException("methode invalide : getCoefQ()");
}
public void setCoefQ(double coefQ){
throw new IllegalArgumentException("methode invalide : setCoefQ()");
}
public double getSection(){
throw new IllegalArgumentException("methode invalide : getSection()");
}
public void setSection(double section){
throw new IllegalArgumentException("methode invalide : setSection()");
}
public double getCoefEnnoiment(){
throw new IllegalArgumentException("methode invalide : getCoefEnnoiment()");
}
public void setCoefEnnoiment(double coefEnnoiment){
throw new IllegalArgumentException("methode invalide : setCoefEnnoiment()");
}
public double getRugosite(){
throw new IllegalArgumentException("methode invalide : getRugosite()");
}
public void setRugosite(double rugosite){
throw new IllegalArgumentException("methode invalide : setRugosite()");
}
public double getCoefPerteCharge(){
throw new IllegalArgumentException("methode invalide : getCoefPerteCharge()");
}
public void setCoefPerteCharge(double coefPerteCharge){
throw new IllegalArgumentException("methode invalide : setCoefPerteCharge()");
}
}
--- NEW FILE: DChenalLiaison.java ---
/*
* @file DSeuilLiaison.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public final class DChenalLiaison
extends DCaracteristiqueLiaison
implements IChenalLiaisonOperations
{
public void initialise(IObjet _o)
{
super.initialise(_o);
if(_o instanceof IChenalLiaison) {
IChenalLiaison q=(IChenalLiaison)_o;
largeur(q.largeur());
longueur(q.longueur());
rugosite(q.rugosite());
}
}
final public IObjet creeClone()
{
IChenalLiaison p=CDodico.findUsine().creeHydraulique1dChenalLiaison();
p.initialise(tie());
return p;
}
/*** ILiaison ***/
// constructeurs
public DChenalLiaison()
{
super();
largeur_=1;
longueur_=10;
rugosite_=30;
}
public void dispose()
{
id_=0;
largeur_=0;
longueur_=0;
rugosite_=0;
super.dispose();
}
/*** ISeuilLiaison ***/
// attributs
private double largeur_;
public double largeur() {
return largeur_;
}
public void largeur(double s) {
largeur_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "largeur");
}
private double longueur_;
public double longueur() {
return longueur_;
}
public void longueur(double s) {
longueur_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "longueur");
}
private double rugosite_;
public double rugosite() {
return rugosite_;
}
public void rugosite(double s) {
rugosite_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "rugosite");
}
// méthodes
public boolean isChenal(){
return true;
}
public double getLargeur(){
return largeur();
}
public void setLargeur(double largeur){
largeur(largeur);
}
public double getLongueur(){
return longueur();
}
public void setLongueur(double longueur){
longueur(longueur);
}
public double getRugosite(){
return rugosite();
}
public void setCoefEnnoiment(double rugosite){
rugosite(rugosite);
}
}
--- NEW FILE: DGeometrieCasier.java ---
/*
* @file DGeometrieCasier.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.geometrie.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import org.fudaa.dodico.corba.hydraulique1d.loi.ILoiHydrogramme;
import org.fudaa.dodico.hydraulique1d.DHydraulique1d;
import org.fudaa.dodico.hydraulique1d.Identifieur;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public abstract class DGeometrieCasier
extends DHydraulique1d
implements IGeometrieCasierOperations
{
public void initialise(IObjet _o)
{
super.initialise(_o);
if(_o instanceof IGeometrieCasier) {
IGeometrieCasier q=(IGeometrieCasier)_o;
pasPlanimetrage(q.pasPlanimetrage());
}
}
final public String toString()
{
String s="Geometrie casier"+id_;
return s;
}
/*** IGeometrieCasier ***/
// constructeurs
public DGeometrieCasier()
{
super();
id_=Identifieur.IDENTIFIEUR.identificateurLibre(getClass().getName());
pasPlanimetrage_ = 1;
}
public void dispose()
{
id_=0;
pasPlanimetrage_ = 0;
super.dispose();
}
// attributs
private int id_;
private double pasPlanimetrage_;
public double pasPlanimetrage() {
return pasPlanimetrage_;
}
public void pasPlanimetrage(double pasPlanimetrage) {
pasPlanimetrage_=pasPlanimetrage;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "pasPlanimetrage");
}
// les méthodes
public boolean isSurfaceDependCote() {
throw new IllegalArgumentException("methode invalide : isSurfaceDependCote()");
}
public void setSurfaceDependCote(boolean surfaceDependCote) {
throw new IllegalArgumentException("methode invalide : setSurfaceDependCote()");
}
public double getPasPlanimetrage() {
throw new IllegalArgumentException("methode invalide : getPasPlanimetrage()");
}
public void setPasPlanimetrage(double pasPlanimetrage) {
throw new IllegalArgumentException("methode invalide : setPasPlanimetrage()");
}
public SPoint[] getPointsFrontiere() {
throw new IllegalArgumentException("methode invalide : getPointsFrontiere()");
}
public void setPointsFrontiere(SPoint[] points) {
throw new IllegalArgumentException("methode invalide : setPointsFrontiere()");
}
public SPoint[] getPointsInterieur() {
throw new IllegalArgumentException("methode invalide : getPointsInterieur()");
}
public void setPointsInterieur(SPoint[] points) {
throw new IllegalArgumentException("methode invalide : setPointsInterieur()");
}
public int getNbCotePlanimetrage() {
throw new IllegalArgumentException("methode invalide : getNbCotePlanimetrage()");
}
public boolean isNuagePoints() {
throw new IllegalArgumentException("methode invalide : isNuagePoints()");
}
public boolean isPlanimetrage() {
throw new IllegalArgumentException("methode invalide : isPlanimetrage()");
}
public SPoint2D[] getPointsPlanimetrage() {
throw new IllegalArgumentException("methode invalide : getPointsPlanimetrage()");
}
public void setPointsPlanimetrage(SPoint2D[] points) {
throw new IllegalArgumentException("methode invalide : setPointsPlanimetrage()");
}
}
--- NEW FILE: DNuagePointsCasier.java ---
/*
* @file DNuagePointsCasier.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.geometrie.SPoint;
import org.fudaa.dodico.corba.hydraulique1d.loi.ILoiHydrogramme;
import org.fudaa.dodico.corba.hydraulique1d.casier.INuagePointsCasierOperations;
import org.fudaa.dodico.corba.hydraulique1d.casier.INuagePointsCasier;
import org.fudaa.dodico.corba.hydraulique1d.casier.ICalageImage;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public final class DNuagePointsCasier
extends DGeometrieCasier
implements INuagePointsCasierOperations
{
/*** INuagePointsCasier ***/
public void initialise(IObjet _o)
{
super.initialise(_o);
if(_o instanceof INuagePointsCasier) {
INuagePointsCasier q=(INuagePointsCasier)_o;
surfaceDependCote(q.surfaceDependCote());
pointsFrontiere((SPoint[])q.pointsFrontiere().clone());
pointsInterieur((SPoint[])q.pointsInterieur().clone());
image((byte[])q.image().clone());
if (q.calage()!=null) calage((ICalageImage)q.calage().creeClone());
}
}
final public IObjet creeClone()
{
INuagePointsCasier p=CDodico.findUsine().creeHydraulique1dNuagePointsCasier();
p.initialise(tie());
return p;
}
// constructeurs
public DNuagePointsCasier()
{
super();
surfaceDependCote_=false;
pointsFrontiere_=new SPoint[0];
pointsInterieur_=new SPoint[0];
image_=new byte[0];
calage_=null;
}
public void dispose()
{
surfaceDependCote_=false;
pointsFrontiere_=null;
pointsInterieur_=null;
image_=null;
calage_=null;
super.dispose();
}
// attributs
private boolean surfaceDependCote_;
public boolean surfaceDependCote() {
return surfaceDependCote_;
}
public void surfaceDependCote(boolean surfaceDependCote) {
surfaceDependCote_=surfaceDependCote;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "surfaceDependCote");
}
private SPoint[] pointsFrontiere_;
public SPoint[] pointsFrontiere() {
return pointsFrontiere_;
}
public void pointsFrontiere(SPoint[] points) {
pointsFrontiere_=points;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "pointsFrontiere");
}
private SPoint[] pointsInterieur_;
public SPoint[] pointsInterieur() {
return pointsInterieur_;
}
public void pointsInterieur(SPoint[] points) {
pointsInterieur_=points;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "pointsInterieur");
}
private byte[] image_;
public byte[] image() {
return image_;
}
public void image(byte[] image) {
image_=image;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "image");
}
private ICalageImage calage_;
public ICalageImage calage() {
return calage_;
}
public void calage(ICalageImage s) {
calage_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "calage");
}
// les méthodes
public boolean isSurfaceDependCote() {
return surfaceDependCote_;
}
public void setSurfaceDependCote(boolean surfaceDependCote) {
surfaceDependCote(surfaceDependCote);
}
public double getPasPlanimetrage() {
return pasPlanimetrage();
}
public void setPasPlanimetrage(double pasPlanimetrage) {
pasPlanimetrage(pasPlanimetrage);
}
public SPoint[] getPointsFrontiere() {
return pointsFrontiere_;
}
public void setPointsFrontiere(SPoint[] points) {
pointsFrontiere(points);
}
public SPoint[] getPointsInterieur() {
return pointsInterieur_;
}
public void setPointsInterieur(SPoint[] points) {
pointsInterieur(points);
}
public int getNbCotePlanimetrage() {
double min1 = coteMin(pointsFrontiere_);
double min2 = coteMin(pointsInterieur_);
double min = Math.min(min1,min2);
double max1 = coteMax(pointsFrontiere_);
double max2 = coteMax(pointsInterieur_);
double max = Math.max(max1,max2);
double diff = max - min;
return (int)(diff/pasPlanimetrage());
}
public boolean isNuagePoints() {
return true;
}
private final double coteMin(SPoint[] pts) {
double res = Double.MAX_VALUE;
for (int i=0; i<pts.length; i++) {
res = Math.min(res,pts[i].z);
}
return res;
}
private final double coteMax(SPoint[] pts) {
double res = Double.MIN_VALUE;
for (int i=0; i<pts.length; i++) {
res = Math.max(res,pts[i].z);
}
return res;
}
}
--- NEW FILE: DPlanimetrageCasier.java ---
/*
* @file DPlanimetrageCasier.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.geometrie.SPoint2D;
import org.fudaa.dodico.corba.hydraulique1d.loi.ILoiHydrogramme;
import org.fudaa.dodico.corba.hydraulique1d.casier.IPlanimetrageCasierOperations;
import org.fudaa.dodico.corba.hydraulique1d.casier.IPlanimetrageCasier;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public final class DPlanimetrageCasier
extends DGeometrieCasier
implements IPlanimetrageCasierOperations
{
/*** IPlanimetrageCasier ***/
public void initialise(IObjet _o)
{
super.initialise(_o);
if(_o instanceof IPlanimetrageCasier) {
IPlanimetrageCasier q=(IPlanimetrageCasier)_o;
coteInitiale(q.coteInitiale());
points((SPoint2D[])q.points().clone());
}
}
final public IObjet creeClone()
{
IPlanimetrageCasier p=CDodico.findUsine().creeHydraulique1dPlanimetrageCasier();
p.initialise(tie());
return p;
}
// constructeurs
public DPlanimetrageCasier()
{
super();
coteInitiale_=0;
points_=new SPoint2D[0];
}
public void dispose()
{
coteInitiale_= -1;
points_=null;
super.dispose();
}
// attributs
private double coteInitiale_;
public double coteInitiale() {
return coteInitiale_;
}
public void coteInitiale(double coteInitiale) {
coteInitiale_=coteInitiale;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "coteInitiale");
}
private SPoint2D[] points_;
public SPoint2D[] points() {
return points_;
}
public void points(SPoint2D[] points) {
points_=points;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "points");
}
// les méthodes
public SPoint2D[] getPointsPlanimetrage() {
return points_;
}
public void setPointsPlanimetrage(SPoint2D[] points) {
points(points);
}
public boolean isPlanimetrage() {
return true;
}
}
--- NEW FILE: DSeuilLiaison.java ---
/*
* @file DSeuilLiaison.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public final class DSeuilLiaison
extends DCaracteristiqueLiaison
implements ISeuilLiaisonOperations
{
public void initialise(IObjet _o)
{
super.initialise(_o);
if(_o instanceof ISeuilLiaison) {
ISeuilLiaison q=(ISeuilLiaison)_o;
largeur(q.largeur());
coefQ(q.coefQ());
coefEnnoiment(q.coefEnnoiment());
}
}
final public IObjet creeClone()
{
ISeuilLiaison p=CDodico.findUsine().creeHydraulique1dSeuilLiaison();
p.initialise(tie());
return p;
}
/*** ILiaison ***/
// constructeurs
public DSeuilLiaison()
{
super();
largeur_=1;
coefQ_=0.40;
coefEnnoiment_=0.40;
}
public void dispose()
{
id_=0;
largeur_=0;
coefQ_=0;
coefEnnoiment_=0;
super.dispose();
}
/*** ISeuilLiaison ***/
// attributs
private double largeur_;
public double largeur() {
return largeur_;
}
public void largeur(double s) {
largeur_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "largeur");
}
private double coefQ_;
public double coefQ() {
return coefQ_;
}
public void coefQ(double s) {
coefQ_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "coefQ");
}
private double coefEnnoiment_;
public double coefEnnoiment() {
return coefEnnoiment_;
}
public void coefEnnoiment(double s) {
coefEnnoiment_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "coefEnnoiment");
}
// méthodes
public boolean isSeuil(){
return true;
}
public double getLargeur(){
return largeur();
}
public void setLargeur(double largeur){
largeur(largeur);
}
public double getCoefQ(){
return coefQ();
}
public void setCoefQ(double coefQ){
coefQ(coefQ);
}
public double getCoefEnnoiment(){
return coefEnnoiment();
}
public void setCoefEnnoiment(double coefEnnoiment){
coefEnnoiment(coefEnnoiment);
}
}
--- NEW FILE: DSiphonLiaison.java ---
/*
* @file DSiphonLiaison.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public final class DSiphonLiaison
extends DCaracteristiqueLiaison
implements ISiphonLiaisonOperations
{
public void initialise(IObjet _o)
{
super.initialise(_o);
if(_o instanceof ISiphonLiaison) {
ISiphonLiaison q=(ISiphonLiaison)_o;
longueur(q.longueur());
section(q.section());
coefPerteCharge(q.coefPerteCharge());
}
}
final public IObjet creeClone()
{
ISiphonLiaison p=CDodico.findUsine().creeHydraulique1dSiphonLiaison();
p.initialise(tie());
return p;
}
/*** ILiaison ***/
// constructeurs
public DSiphonLiaison()
{
super();
longueur_=1;
section_=0.40;
coefPerteCharge_=0.40;
}
public void dispose()
{
id_=0;
longueur_=0;
section_=0;
coefPerteCharge_=0;
super.dispose();
}
/*** ISiphonLiaison ***/
// attributs
private double longueur_;
public double longueur() {
return longueur_;
}
public void longueur(double s) {
longueur_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "longueur");
}
private double section_;
public double section() {
return section_;
}
public void section(double s) {
section_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "section");
}
private double coefPerteCharge_;
public double coefPerteCharge() {
return coefPerteCharge_;
}
public void coefPerteCharge(double s) {
coefPerteCharge_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "coefPerteCharge");
}
// méthodes
public boolean isSiphon(){
return true;
}
public double getLongueur(){
return longueur();
}
public void setLongueur(double longueur){
longueur(longueur);
}
public double getSection(){
return section();
}
public void setSection(double section){
section(section);
}
public double getCoefPerteCharge(){
return coefPerteCharge();
}
public void setCoefPerteCharge(double coefPerteCharge){
coefPerteCharge(coefPerteCharge);
}
}
--- NEW FILE: DTopologieCasierCasier.java ---
/*
* @file DTopologieCasierCasier.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import org.fudaa.dodico.hydraulique1d.DHydraulique1d;
import org.fudaa.dodico.hydraulique1d.Identifieur;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public final class DTopologieCasierCasier
extends DTopologieLiaison
implements ITopologieCasierCasierOperations
{
public void initialise(IObjet _o)
{
super.initialise(_o);
if(_o instanceof ITopologieCasierCasier) {
ITopologieCasierCasier q=(ITopologieCasierCasier)_o;
casierAmontRattache(q.casierAmontRattache());
casierAvalRattache(q.casierAvalRattache());
}
}
final public IObjet creeClone()
{
ITopologieCasierCasier p=CDodico.findUsine().creeHydraulique1dTopologieCasierCasier();
p.initialise(tie());
return p;
}
public DTopologieCasierCasier()
{
super();
casierAmontRattache_=null;
casierAvalRattache_=null;
}
public void dispose()
{
casierAmontRattache_=null;
casierAvalRattache_=null;
super.dispose();
}
/*** ITopologieCasierCasier ***/
// attributs
private ICasier casierAmontRattache_;
public ICasier casierAmontRattache() {
return casierAmontRattache_;
}
public void casierAmontRattache(ICasier s) {
casierAmontRattache_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "casierAmontRattache");
}
private ICasier casierAvalRattache_;
public ICasier casierAvalRattache() {
return casierAvalRattache_;
}
public void casierAvalRattache(ICasier s) {
casierAvalRattache_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "casierAvalRattache");
}
// méthodes
public boolean isCasierCasier(){
return true;
}
public ICasier getCasierAmontRattache(){
return casierAmontRattache();
}
public void setCasierAmontRattache(ICasier casierRattache){
casierAmontRattache(casierRattache);
}
public ICasier getCasierAvalRattache(){
return casierAvalRattache();
}
public void setCasierAvalRattache(ICasier casierRattache){
casierAvalRattache(casierRattache);
}
}
--- NEW FILE: DTopologieLiaison.java ---
/*
* @file DTopologieLiaison.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import org.fudaa.dodico.hydraulique1d.DHydraulique1d;
import org.fudaa.dodico.hydraulique1d.Identifieur;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public abstract class DTopologieLiaison
extends DHydraulique1d
implements ITopologieLiaisonOperations
{
public void initialise(IObjet _o)
{
if(_o instanceof ITopologieLiaison) {
ITopologieLiaison q=(ITopologieLiaison)_o;
}
}
final public String toString()
{
return "TopologieLiaison"+id_;
}
public DTopologieLiaison()
{
super();
id_=Identifieur.IDENTIFIEUR.identificateurLibre(getClass().getName());
}
public void dispose()
{
super.dispose();
}
/*** ITopologieLiaison ***/
// attributs
protected int id_;
// méthodes
public boolean isRiviereCasier(){
return false;
}
public boolean isCasierCasier(){
return false;
}
public double getAbscisse(){
throw new IllegalArgumentException("methode invalide : getAbscisse()");
}
public void setAbscisse(double abscisse){
throw new IllegalArgumentException("methode invalide : setAbscisse()");
}
public ICasier getCasierRattache(){
throw new IllegalArgumentException("methode invalide : getCasierRattache()");
}
public void setCasierRattache(ICasier casierRattache){
throw new IllegalArgumentException("methode invalide : setCasierRattache()");
}
public IBief getBiefRattache(){
throw new IllegalArgumentException("methode invalide : getBiefRattache()");
}
public void setBiefRattache(IBief biefRattache){
throw new IllegalArgumentException("methode invalide : setBiefRattache()");
}
public ICasier getCasierAmontRattache(){
throw new IllegalArgumentException("methode invalide : getCasierAmontRattache()");
}
public void setCasierAmontRattache(ICasier casierRattache){
throw new IllegalArgumentException("methode invalide : setCasierAmontRattache()");
}
public ICasier getCasierAvalRattache(){
throw new IllegalArgumentException("methode invalide : getCasierAvalRattache()");
}
public void setCasierAvalRattache(ICasier casierRattache){
throw new IllegalArgumentException("methode invalide : setCasierAvalRattache()");
}
}
--- NEW FILE: DTopologieRiviereCasier.java ---
/*
* @file DTopologieRiviereCasier.java
* @creation
* @modification $Date: 2003/06/08 20:49:08 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import org.fudaa.dodico.hydraulique1d.DHydraulique1d;
import org.fudaa.dodico.hydraulique1d.Identifieur;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/06/08 20:49:08 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public final class DTopologieRiviereCasier
extends DTopologieLiaison
implements ITopologieRiviereCasierOperations
{
public void initialise(IObjet _o)
{
super.initialise(_o);
if(_o instanceof ITopologieRiviereCasier) {
ITopologieRiviereCasier q=(ITopologieRiviereCasier)_o;
abscisse(q.abscisse());
biefRattache(q.biefRattache());
casierRattache(q.casierRattache());
}
}
final public IObjet creeClone()
{
ITopologieRiviereCasier p=CDodico.findUsine().creeHydraulique1dTopologieRiviereCasier();
p.initialise(tie());
return p;
}
public DTopologieRiviereCasier()
{
super();
abscisse_=0;
casierRattache_=null;
biefRattache_=null;
}
public void dispose()
{
abscisse_=0;
casierRattache_=null;
biefRattache_=null;
super.dispose();
}
/*** ITopologieRiviereCasier ***/
// attributs
private double abscisse_;
public double abscisse() {
return abscisse_;
}
public void abscisse(double s) {
abscisse_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "abscisse");
}
private ICasier casierRattache_;
public ICasier casierRattache() {
return casierRattache_;
}
public void casierRattache(ICasier s) {
casierRattache_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "casierRattache");
}
private IBief biefRattache_;
public IBief biefRattache() {
return biefRattache_;
}
public void biefRattache(IBief s) {
biefRattache_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "biefRattache");
}
// méthodes
public boolean isRiviereCasier(){
return true;
}
public double getAbscisse(){
return abscisse();
}
public void setAbscisse(double abscisse){
abscisse(abscisse);
}
public ICasier getCasierRattache(){
return casierRattache();
}
public void setCasierRattache(ICasier casierRattache){
casierRattache(casierRattache);
}
public IBief getBiefRattache(){
return biefRattache();
}
public void setBiefRattache(IBief biefRattache){
biefRattache(biefRattache);
}
}
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/mascaret
In directory sc8-pr-cvs1:/tmp/cvs-serv23483/mascaret
Modified Files:
CConversionHydraulique1d.java DCalculMascaret.java
DParametresMascaret.java DResultatsMascaret.java
MascaretClient.java
Log Message:
intégration casier
Index: CConversionHydraulique1d.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/CConversionHydraulique1d.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CConversionHydraulique1d.java 17 May 2003 21:28:29 -0000 1.3
--- CConversionHydraulique1d.java 8 Jun 2003 20:49:08 -0000 1.4
***************
*** 74,80 ****
public static final SParametresCAS convertirParametresCas(IEtude1d etude, String nomFichierSansExtension){
SParametresCAS paramCas = new SParametresCAS();
! paramCas.parametresGen = convertirParametresGen(etude.paramGeneraux().regime(), nomFichierSansExtension);
paramCas.parametresModelPhy = convertirParametresModelPhy(etude.paramGeneraux());
! paramCas.parametresNum = convertirParametresNum(etude.paramGeneraux());
paramCas.parametresTemp = convertirParametresTemp(etude.paramTemps());
paramCas.parametresGeoReseau = convertirParametresGeoReseau(etude.reseau(), etude.donneesHydro() ,etude.paramGeneraux().profilsAbscAbsolu(), nomFichierSansExtension);
--- 74,81 ----
public static final SParametresCAS convertirParametresCas(IEtude1d etude, String nomFichierSansExtension){
SParametresCAS paramCas = new SParametresCAS();
! boolean presenceCasier = (etude.reseau().casiers().length > 0);
! paramCas.parametresGen = convertirParametresGen(etude.paramGeneraux().regime(), presenceCasier, nomFichierSansExtension);
paramCas.parametresModelPhy = convertirParametresModelPhy(etude.paramGeneraux());
! paramCas.parametresNum = convertirParametresNum(etude.paramGeneraux(), presenceCasier);
paramCas.parametresTemp = convertirParametresTemp(etude.paramTemps());
paramCas.parametresGeoReseau = convertirParametresGeoReseau(etude.reseau(), etude.donneesHydro() ,etude.paramGeneraux().profilsAbscAbsolu(), nomFichierSansExtension);
***************
*** 96,102 ****
SParametresCAS paramCas = new SParametresCAS();
String nomFichierSansExtension = "mascaret"+connexion_.numero();
! paramCas.parametresGen = convertirParametresGen(etude.paramGeneraux().regime(), nomFichierSansExtension);
paramCas.parametresModelPhy = convertirParametresModelPhy(etude.paramGeneraux());
! paramCas.parametresNum = convertirParametresNum(etude.paramGeneraux());
paramCas.parametresTemp = convertirParametresTemp(etude.paramTemps());
paramCas.parametresGeoReseau = convertirParametresGeoReseau(etude.reseau(), etude.donneesHydro(), etude.paramGeneraux().profilsAbscAbsolu(), nomFichierSansExtension);
--- 97,104 ----
SParametresCAS paramCas = new SParametresCAS();
String nomFichierSansExtension = "mascaret"+connexion_.numero();
! boolean presenceCasier = (etude.reseau().casiers().length > 0);
! paramCas.parametresGen = convertirParametresGen(etude.paramGeneraux().regime(), presenceCasier, nomFichierSansExtension);
paramCas.parametresModelPhy = convertirParametresModelPhy(etude.paramGeneraux());
! paramCas.parametresNum = convertirParametresNum(etude.paramGeneraux(), presenceCasier);
paramCas.parametresTemp = convertirParametresTemp(etude.paramTemps());
paramCas.parametresGeoReseau = convertirParametresGeoReseau(etude.reseau(), etude.donneesHydro(), etude.paramGeneraux().profilsAbscAbsolu(), nomFichierSansExtension);
***************
*** 115,119 ****
}
! private final static SParametresGen convertirParametresGen(LRegime regime, String nomFichierSansExtension){
SParametresGen paramMas=new SParametresGen();
--- 117,121 ----
}
! private final static SParametresGen convertirParametresGen(LRegime regime, boolean presenceCasier, String nomFichierSansExtension){
SParametresGen paramMas=new SParametresGen();
***************
*** 137,141 ****
paramMas.typeValidation=1;
// presence de casiers
! paramMas.presenceCasiers=false;
// bibliotheques utilisées
String os=System.getProperty("os.name");
--- 139,143 ----
paramMas.typeValidation=1;
// presence de casiers
! paramMas.presenceCasiers=presenceCasier;
// bibliotheques utilisées
String os=System.getProperty("os.name");
***************
*** 166,170 ****
}
! private final static SParametresNum convertirParametresNum(IParametresGeneraux iparamGen){
SParametresNum paramMas=new SParametresNum();
--- 168,172 ----
}
! private final static SParametresNum convertirParametresNum(IParametresGeneraux iparamGen, boolean presenceCasier){
SParametresNum paramMas=new SParametresNum();
***************
*** 180,183 ****
--- 182,194 ----
paramMas.implicitNoyauTrans=iparamGen.implicitationNoyauTrans();
+ // Casier
+ if (presenceCasier) {
+ IParametresGenerauxCasier iparamCasier = iparamGen.parametresCasier();
+ if (iparamCasier != null) {
+ paramMas.parametresNumeriqueCasier = new SParametresNumCasier(iparamCasier.coefImplicitationCasier(),
+ iparamCasier.coefImplicitationCouplage(), iparamCasier.nbMaxIterationCouplage());
+ }
+ }
+
return paramMas;
}
***************
*** 867,871 ****
new SParametresFichReprise(),
new SParametresRubens(),
! new SParametresStockage() ) ;
impressResultMas.titreCalcul = description;
--- 878,883 ----
new SParametresFichReprise(),
new SParametresRubens(),
! new SParametresStockage(),
! new SParametresFichResCasier() ) ;
impressResultMas.titreCalcul = description;
Index: DCalculMascaret.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DCalculMascaret.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DCalculMascaret.java 17 May 2003 21:28:29 -0000 1.3
--- DCalculMascaret.java 8 Jun 2003 20:49:08 -0000 1.4
***************
*** 169,172 ****
--- 169,200 ----
File ficEcrREP=getFichier(c, "_ecr.rep");
if (ficEcrREP.exists())ficEcrREP.delete();
+
+ // Pour les casiers
+ boolean casier = params.parametresCAS().parametresGen.presenceCasiers;
+
+ File ficCasierGEO=getFichier(c, "_casier.geo");
+ File ficCasierOPT=getFichier(c, "_casier.opt");
+ File ficCasierRUB=getFichier(c, "_casier.rub");
+ File ficLiaisonOPT=getFichier(c, "_liaison.opt");
+ File ficLiaisonRUB=getFichier(c, "_liaison.rub");
+ File ficCasierLIS=getFichier(c, "_casier.lis");
+ File ficLiaisonLIS=getFichier(c, "_liaison.lis");
+ if (casier) {
+ if (ficCasierGEO.exists())ficCasierGEO.delete();
+
+ if (ficCasierOPT.exists())ficCasierOPT.delete();
+
+ if (ficCasierRUB.exists())ficCasierRUB.delete();
+
+ if (ficLiaisonOPT.exists())ficLiaisonOPT.delete();
+
+ if (ficLiaisonRUB.exists())ficLiaisonRUB.delete();
+
+ if (ficCasierLIS.exists())ficCasierLIS.delete();
+
+ if (ficLiaisonLIS.exists())ficLiaisonLIS.delete();
+ }
+ // fin des fichier casiers
+
try {
setProgression("Ecriture des fichiers paramètres", 0);
***************
*** 176,179 ****
--- 204,211 ----
setProgression("Ecriture des fichiers paramètres", 70);
DParametresMascaret.ecritParametresGEO(ficGEO, params.parametresGEO());
+ if (casier) {
+ setProgression("Ecriture des fichiers paramètres", 95);
+ DParametresMascaret.ecritCasierGEO(ficCasierGEO,params.casierGEO());
+ }
setProgression("Ecriture des fichiers paramètres", 100);
if (params.parametresCAS().parametresCondInit.repriseEtude.repriseCalcul)
***************
*** 288,291 ****
--- 320,353 ----
}
}
+
+ // pour les casier
+
+ if (casier) {
+ setProgression("Lecture des resultats", 85);
+ if (ficCasierOPT.exists()) {
+ results.resultatsCasierOPT(DResultatsMascaret.litResultatsOPT(ficCasierOPT, Double.MAX_VALUE));
+ }
+ if (ficCasierRUB.exists()) {
+ results.resultatsCasierRUB(DResultatsMascaret.litResultatsRUB(ficCasierRUB, Double.MAX_VALUE));
+ }
+ setProgression("Lecture des resultats", 90);
+ if (ficLiaisonOPT.exists()) {
+ results.resultatsLiaisonOPT(DResultatsMascaret.litResultatsOPT(ficLiaisonOPT, Double.MAX_VALUE));
+ }
+
+ if (ficLiaisonRUB.exists()) {
+ results.resultatsLiaisonRUB(DResultatsMascaret.litResultatsRUB(ficLiaisonRUB, Double.MAX_VALUE));
+ }
+ setProgression("Lecture des resultats", 95);
+ if (ficCasierLIS.exists()) {
+ results.casierLIS(DResultatsMascaret.litResultatsLIS(ficCasierLIS, Double.MAX_VALUE));
+ }
+ setProgression("Lecture des resultats", 97);
+ if (ficLiaisonLIS.exists()) {
+ results.liaisonLIS(DResultatsMascaret.litResultatsLIS(ficLiaisonLIS, Double.MAX_VALUE));
+ }
+ }
+ // fin des fichier casiers
+
setProgression("Lecture des resultats", 100);
System.out.println("Lecture des resultats terminee.");
Index: DParametresMascaret.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DParametresMascaret.java 18 Mar 2003 13:01:27 -0000 1.2
--- DParametresMascaret.java 8 Jun 2003 20:49:08 -0000 1.3
***************
*** 34,40 ****
{
private final static boolean DEBUG="yes".equals(System.getProperty("fudaa.debug"));
! private SParametresCAS paramsCAS_; // le fichier cas (parametres) de mascaret sans le module casier
! private SParametresCasCASIER paramsCasCASIER_;// le fichier cas (parametres) du module casier
private SParametresGEO paramsGEO_; // Fichier geometrie contenant les profils en travers
private SParametresREP paramsREP_; // Fichier de reprise en lecture
private SParametresNCA paramsNCA_; // Fichier Fichiercas.txt
--- 34,40 ----
{
private final static boolean DEBUG="yes".equals(System.getProperty("fudaa.debug"));
! private SParametresCAS paramsCAS_; // le fichier cas (parametres) de mascaret
private SParametresGEO paramsGEO_; // Fichier geometrie contenant les profils en travers
+ private SGeoCasiers casierGEO_; // Fichier geometrie contenant la géométrie des casiers
private SParametresREP paramsREP_; // Fichier de reprise en lecture
private SParametresNCA paramsNCA_; // Fichier Fichiercas.txt
***************
*** 95,98 ****
--- 95,99 ----
if (params.parametresPlanimMaillage != null) ecritParametresPlanimMaillage(fcas, params.parametresPlanimMaillage);
if (params.parametresSingularite != null) ecritParametresSingularite(fcas, params.parametresSingularite);
+ if (params.parametresCasier != null) ecritParametresCasier(fcas, params.parametresCasier);
if (params.parametresApporDeversoirs != null) ecritParametresApportDeversoirs(fcas, params.parametresApporDeversoirs);
if (params.parametresCalage != null) ecritParametresCalage(fcas, params.parametresCalage);
***************
*** 175,179 ****
ecritureParametres.setParam(params);
ecritureParametres.setNomRubrique("PARAMETRES NUMERIQUES (1)");
! Object[] descriptionChamp = new Object[5];
descriptionChamp[0] = "CALCUL D'UNE ONDE DE SUBMERSION";
descriptionChamp[1] = "FROUDE LIMITE POUR LES CONDITIONS LIMITES";
--- 176,180 ----
ecritureParametres.setParam(params);
ecritureParametres.setNomRubrique("PARAMETRES NUMERIQUES (1)");
! Object[] descriptionChamp = new Object[6];
descriptionChamp[0] = "CALCUL D'UNE ONDE DE SUBMERSION";
descriptionChamp[1] = "FROUDE LIMITE POUR LES CONDITIONS LIMITES";
***************
*** 182,185 ****
--- 183,198 ----
descriptionChamp[4] = "IMPLICITATION DU NOYAU TRANSCRITIQUE";
+ // description sous rubrique casier
+ Object[] descriptionCasier = new Object[2];
+ if (params.parametresNumeriqueCasier != null) {
+ descriptionCasier[0] = "CASIER (2)";
+ Object[] descriptionChampCasier = new Object[3];
+ descriptionChampCasier[0] = "COEFFICIENT D'IMPLICITATION DU SYSTEME DES CASIERS";
+ descriptionChampCasier[1] = "COEFFICIENT D'IMPLICITATION DANS LE COUPLAGE";
+ descriptionChampCasier[2] = "NOMBRE MAXIMUM D'ITERATIONS DANS LE COUPLAGE";
+ descriptionCasier[1] = descriptionChampCasier;
+ }
+ descriptionChamp[5] = descriptionCasier;
+
ecritureParametres.setDescriptionChamp(descriptionChamp);
ecritureParametres.writeRubrique();
***************
*** 445,448 ****
--- 458,504 ----
}
+ private final static void ecritParametresCasier(Writer fcas, SParametresCasier params)
+ throws Exception
+ {
+ EdamoxWriter ecritureParametres = new EdamoxWriter(fcas);
+ ecritureParametres.setParam(params);
+ ecritureParametres.setNomRubrique("PARAMETRES CASIER (1)");
+ Object[] descriptionChamp = new Object[8];
+ descriptionChamp[0] = "NOMBRE DE CASIERS";
+ descriptionChamp[1] = "OPTION DE PLANIMETRAGE";
+ descriptionChamp[2] = "OPTION DE CALCUL";
+ descriptionChamp[3] = "FICHIER GEOMETRIE CASIER";
+ descriptionChamp[4] = "CASIERS COTE INITIALE";
+ descriptionChamp[5] = "CASIERS PAS DE PLANIMETRAGE";
+ descriptionChamp[6] = "CASIERS NOMBRE DE COTES DE PLANIMETRAGE";
+
+ // description sous rubrique liaison
+ Object[] descriptionLiaison = new Object[2];
+ if (params.liaisons != null) {
+ descriptionLiaison[0] = "LIAISONS (2)";
+ Object[] descriptionChampLiaison = new Object[15];
+ descriptionChampLiaison[0] = "NOMBRE DE LIAISONS";
+ descriptionChampLiaison[1] = "LIAISON TYPE";
+ descriptionChampLiaison[2] = "LIAISON NATURE";
+ descriptionChampLiaison[3] = "LIAISON COTE";
+ descriptionChampLiaison[4] = "LIAISON LARGEUR";
+ descriptionChampLiaison[5] = "LIAISON LONGUEUR";
+ descriptionChampLiaison[6] = "LIAISON RUGOSITE";
+ descriptionChampLiaison[7] = "LIAISON SECTION";
+ descriptionChampLiaison[8] = "LIAISON COEFFICIENT PERTE DE CHARGE";
+ descriptionChampLiaison[9] = "LIAISON COEFFICIENT DE DEBIT";
+ descriptionChampLiaison[10] = "LIAISON COEFFICIENT D'ENNOIEMENT";
+ descriptionChampLiaison[11] = "LIAISON NUMERO DU CASIER ORIGINE";
+ descriptionChampLiaison[12] = "LIAISON NUMERO DU CASIER FIN";
+ descriptionChampLiaison[13] = "LIAISON ABSCISSE CORRESPONDANTE";
+ descriptionChampLiaison[14] = "LIAISON DU BIEF ASSOCIE";
+ descriptionLiaison[1] = descriptionChampLiaison;
+ }
+ descriptionChamp[7] = descriptionLiaison;
+
+ ecritureParametres.setDescriptionChamp(descriptionChamp);
+ ecritureParametres.writeRubrique();
+ }
+
private final static void ecritParametresApportDeversoirs(Writer fcas, SParametresApporDeversoirs params)
throws Exception
***************
*** 451,455 ****
ecritureParametres.setParam(params);
ecritureParametres.setNomRubrique("APPORTS ET DEVERSOIRS (1)");
! Object[] descriptionChamp = new Object[2];
// description sous rubrique debit d'apports
--- 507,511 ----
ecritureParametres.setParam(params);
ecritureParametres.setNomRubrique("APPORTS ET DEVERSOIRS (1)");
! Object[] descriptionChamp = new Object[3];
// description sous rubrique debit d'apports
***************
*** 500,503 ****
--- 556,571 ----
descriptionChamp[1] = descriptionDeversLat;
+ // description sous rubrique Casier
+ Object[] descriptionCasier = new Object[2];
+ if (params.apportCasier != null) {
+ descriptionCasier[0] = "APPORT CASIER (2)";
+ Object[] descriptionChampCasier = new Object[3];
+ descriptionChampCasier[0] = "NOMBRE D'APPORTS DE PLUIE";
+ descriptionChampCasier[1] = "NUMERO DU CASIER ASSOCIE";
+ descriptionChampCasier[2] = "NUMERO DE LA LOI ASSOCIEE";
+ descriptionCasier[1] = descriptionChampCasier;
+ }
+ descriptionChamp[2] = descriptionCasier;
+
ecritureParametres.setDescriptionChamp(descriptionChamp);
ecritureParametres.writeRubrique();
***************
*** 654,658 ****
ecritureParametres.setParam(params);
ecritureParametres.setNomRubrique("IMPRESSIONS - RESULTATS (1)");
! Object[] descriptionChamp = new Object[8];
descriptionChamp[0] = "TITRE DU CALCUL";
--- 722,726 ----
ecritureParametres.setParam(params);
ecritureParametres.setNomRubrique("IMPRESSIONS - RESULTATS (1)");
! Object[] descriptionChamp = new Object[9];
descriptionChamp[0] = "TITRE DU CALCUL";
***************
*** 742,745 ****
--- 810,826 ----
descriptionChamp[7] = descriptionStockage;
+ // description sous rubrique casier
+ Object[] descriptionCasier = new Object[2];
+ if (params.casier != null) {
+ descriptionCasier[0] = "CASIER (2)";
+ Object[] descriptionChampCasier = new Object[4];
+ descriptionChampCasier[0] = "FICHIER RESULTATS CASIERS";
+ descriptionChampCasier[1] = "FICHIER LISTING CASIERS";
+ descriptionChampCasier[2] = "FICHIER RESULTATS LIAISONS";
+ descriptionChampCasier[3] = "FICHIER LISTING LIAISONS";
+ descriptionCasier[1] = descriptionChampCasier;
+ }
+ descriptionChamp[8] = descriptionCasier;
+
ecritureParametres.setDescriptionChamp(descriptionChamp);
ecritureParametres.writeRubrique();
***************
*** 774,788 ****
}
- //******************* .CasCasier ***********************
- public SParametresCasCASIER parametresCasCASIER()
- {
- return paramsCasCASIER_;
- }
-
- public void parametresCasCASIER(SParametresCasCASIER _paramsCasCASIER)
- {
- paramsCasCASIER_ = _paramsCasCASIER;
- }
-
//******************* .opt ***********************
/*
--- 855,858 ----
***************
*** 988,991 ****
--- 1058,1100 ----
for(int i=0; i<params.biefs.length; i++) {
ecritParametresBief(fgeo, params.biefs[i], i);
+ }
+ fgeo.close();
+ }catch(Exception ex){
+ ex.printStackTrace(System.err);
+ System.err.println("IT: "+ ex);
+ }
+ }
+
+
+ //******************* Géométrie casier ***********************
+
+ // Fichier geometrie contenant la gémétrie des casiers
+ public SGeoCasiers casierGEO ()
+ { return casierGEO_; }
+
+ // Fichier geometrie contenant lla gémétrie des casiers
+ public void casierGEO (SGeoCasiers _casierGEO)
+ {
+ casierGEO_ = _casierGEO;
+ }
+
+ private final static void ecritParametresCasier(FortranWriter fgeo, SGeoCasier casier, int indCasier) throws IOException
+ {
+ String nomCasier = casier.nom;
+ if (nomCasier==null) nomCasier="casier"+(indCasier+1);
+ else if (nomCasier.equals("")) nomCasier="casier"+(indCasier+1);
+ fgeo.println("CASIER "+nomCasier);
+ for(int i=0; i<casier.pts.length; i++) {
+ fgeo.println(casier.pts[i].x+" "+casier.pts[i].y+casier.pts[i].z+" "+casier.pts[i].typePoint);
+ }
+ }
+
+ public final static void ecritCasierGEO(File fichier, SGeoCasiers params)
+ {
+ try {
+ FortranWriter fgeo = new FortranWriter(new FileWriter(fichier));
+ System.out.println("Creation du fichier "+fichier.getName());
+ for(int i=0; i<params.casiers.length; i++) {
+ ecritParametresCasier(fgeo, params.casiers[i], i);
}
fgeo.close();
Index: DResultatsMascaret.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DResultatsMascaret.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DResultatsMascaret.java 18 Mar 2003 13:01:27 -0000 1.2
--- DResultatsMascaret.java 8 Jun 2003 20:49:08 -0000 1.3
***************
*** 42,45 ****
--- 42,55 ----
private SParametresREP resultsREP_;
+ // pour casier
+ private SResultatsOPT resultsCasierOPT_;
+ private SResultatsRUB resultsCasierRUB_;
+ private SResultatsOPT resultsLiaisonOPT_;
+ private SResultatsRUB resultsLiaisonRUB_;
+ private SResultatsLIS listingCasier_;
+ private SResultatsLIS listingLiaison_;
+
+
+
public DResultatsMascaret()
{
***************
*** 395,398 ****
--- 405,480 ----
{
DParametresMascaret.ecritFichier(fichier, res.contenu);
+ }
+
+
+
+
+ // Pour le module casier
+ //
+ // résultat casier au format optyca
+ public SResultatsOPT resultatsCasierOPT()
+ {
+ return resultsCasierOPT_;
+ }
+
+ public void resultatsCasierOPT(SResultatsOPT _resultsCasierOPT)
+ {
+ resultsCasierOPT_ = _resultsCasierOPT;
+ }
+
+ // résultat casier au format Rubens
+ public SResultatsRUB resultatsCasierRUB()
+ {
+ return resultsCasierRUB_;
+ }
+
+ public void resultatsCasierRUB(SResultatsRUB _resultsCasierRUB)
+ {
+ resultsCasierRUB_ = _resultsCasierRUB;
+ }
+
+
+ // résultat liaisons au format optyca
+ public SResultatsOPT resultatsLiaisonOPT()
+ {
+ return resultsLiaisonOPT_;
+ }
+
+ public void resultatsLiaisonOPT(SResultatsOPT _resultsLiaisonOPT)
+ {
+ resultsLiaisonOPT_ = _resultsLiaisonOPT;
+ }
+
+ // résultat liaisons au format Rubens
+ public SResultatsRUB resultatsLiaisonRUB()
+ {
+ return resultsLiaisonRUB_;
+ }
+
+ public void resultatsLiaisonRUB(SResultatsRUB _resultsLiaisonRUB)
+ {
+ resultsLiaisonRUB_ = _resultsLiaisonRUB;
+ }
+
+ // listing casier
+ public SResultatsLIS casierLIS()
+ {
+ return listingCasier_;
+ }
+
+ public void casierLIS(SResultatsLIS _listingCasier)
+ {
+ listingCasier_ = _listingCasier;
+ }
+
+ // listing liaison
+ public SResultatsLIS liaisonLIS()
+ {
+ return listingLiaison_;
+ }
+
+ public void liaisonLIS(SResultatsLIS _listingLiaison)
+ {
+ listingLiaison_ = _listingLiaison;
}
Index: MascaretClient.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/MascaretClient.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MascaretClient.java 18 Mar 2003 13:01:27 -0000 1.2
--- MascaretClient.java 8 Jun 2003 20:49:08 -0000 1.3
***************
*** 170,174 ****
parametresCas.parametresModelPhy = parametresModelPhy;
! parametresCas.parametresNum = new SParametresNum(false, 1, true,0.005,false);
parametresCas.parametresTemp = new SParametresTemp(10,0,1,2,1000,false,1);
--- 170,174 ----
parametresCas.parametresModelPhy = parametresModelPhy;
! parametresCas.parametresNum = new SParametresNum(false, 1, true,0.005,false,new SParametresNumCasier());
parametresCas.parametresTemp = new SParametresTemp(10,0,1,2,1000,false,1);
***************
*** 256,261 ****
SParametresRubens rubens = new SParametresRubens(1);
SParametresStockage stock = new SParametresStockage(1,0,vInt1,vDouble0);
parametresCas.parametresImpressResult = new SParametresImpressResult(" toto", impress,
! pasStock, resultat, listing, fichRep, rubens,stock);
boolean [] varCalcule = {false,false,false,false,false,false,false,true,false,false,true,false,false};
--- 256,262 ----
SParametresRubens rubens = new SParametresRubens(1);
SParametresStockage stock = new SParametresStockage(1,0,vInt1,vDouble0);
+ SParametresFichResCasier fichResCasier = new SParametresFichResCasier();
parametresCas.parametresImpressResult = new SParametresImpressResult(" toto", impress,
! pasStock, resultat, listing, fichRep, rubens,stock,fichResCasier);
boolean [] varCalcule = {false,false,false,false,false,false,false,true,false,false,true,false,false};
|
|
From: <jm_...@us...> - 2003-06-08 20:49:12
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/test
In directory sc8-pr-cvs1:/tmp/cvs-serv23483/test
Modified Files:
TestCParametresMascaret.java
Log Message:
intégration casier
Index: TestCParametresMascaret.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/test/TestCParametresMascaret.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestCParametresMascaret.java 18 Mar 2003 15:36:08 -0000 1.2
--- TestCParametresMascaret.java 8 Jun 2003 20:49:09 -0000 1.3
***************
*** 40,44 ****
parametresCas.parametresModelPhy = parametresModelPhy;
! parametresCas.parametresNum = new SParametresNum(false, 1, true, 0.005, false);
parametresCas.parametresTemp = new SParametresTemp(10,0,1,2,1000,false,1);
--- 40,44 ----
parametresCas.parametresModelPhy = parametresModelPhy;
! parametresCas.parametresNum = new SParametresNum(false, 1, true, 0.005, false, null);
parametresCas.parametresTemp = new SParametresTemp(10,0,1,2,1000,false,1);
***************
*** 127,131 ****
SParametresStockage stock = new SParametresStockage(1,0,vInt1,vDouble0);
parametresCas.parametresImpressResult = new SParametresImpressResult(" toto", impress,
! pasStock, resultat, listing, fichRep, rubens,stock);
boolean [] varCalcule = {false,false,false,false,false,false,false,true,false,false,true,false,false};
--- 127,131 ----
SParametresStockage stock = new SParametresStockage(1,0,vInt1,vDouble0);
parametresCas.parametresImpressResult = new SParametresImpressResult(" toto", impress,
! pasStock, resultat, listing, fichRep, rubens,stock,null);
boolean [] varCalcule = {false,false,false,false,false,false,false,true,false,false,true,false,false};
|
|
From: <jm_...@us...> - 2003-06-08 20:49:11
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d
In directory sc8-pr-cvs1:/tmp/cvs-serv23483/hydraulique1d
Modified Files:
DBief.java DParametresGeneraux.java DReseau.java
Log Message:
intégration casier
Index: DBief.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/DBief.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DBief.java 17 May 2003 21:28:29 -0000 1.3
--- DBief.java 8 Jun 2003 20:49:08 -0000 1.4
***************
*** 3,6 ****
--- 3,7 ----
* @creation 2000-07-24
* @modification $Date$
+ * @modification $Date$
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
Index: DParametresGeneraux.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/DParametresGeneraux.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DParametresGeneraux.java 18 Mar 2003 12:50:55 -0000 1.2
--- DParametresGeneraux.java 8 Jun 2003 20:49:08 -0000 1.3
***************
*** 44,47 ****
--- 44,48 ----
if (q.maillage()!=null) maillage((IMaillage)q.maillage().creeClone());
if (q.zoneEtude()!=null) zoneEtude((IZone)q.zoneEtude().creeClone());
+ if (q.parametresCasier()!=null) parametresCasier((IParametresGenerauxCasier)q.parametresCasier().creeClone());
}
}
***************
*** 107,110 ****
--- 108,112 ----
// CDodico.findUsine().supprimeHydraulique1dZone(zoneEtude_);
zoneEtude_=null;
+ parametresCasier_=null;
super.dispose();
}
***************
*** 273,276 ****
--- 275,288 ----
CDodico.findUsine().fireObjetModifie(toString(), tie(), "zoneEtude");
}
+
+ private IParametresGenerauxCasier parametresCasier_;
+ public IParametresGenerauxCasier parametresCasier()
+ { return parametresCasier_; }
+ public void parametresCasier(IParametresGenerauxCasier s)
+ {
+ parametresCasier_=s;
+ CDodico.findUsine().fireObjetModifie(toString(), tie(), "parametresCasier");
+ }
+
// methodes
Index: DReseau.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/DReseau.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DReseau.java 18 Mar 2003 12:50:55 -0000 1.2
--- DReseau.java 8 Jun 2003 20:49:08 -0000 1.3
***************
*** 35,38 ****
--- 35,50 ----
biefs(ip);
}
+
+ if (q.casiers()!=null) {
+ ICasier[] ip = new ICasier[q.casiers().length];
+ for (int i=0 ; i < ip.length ; i++) ip[i] = (ICasier)q.casiers()[i].creeClone();
+ casiers(ip);
+ }
+
+ if (q.liaisons()!=null) {
+ ILiaison[] ip = new ILiaison[q.liaisons().length];
+ for (int i=0 ; i < ip.length ; i++) ip[i] = (ILiaison)q.liaisons()[i].creeClone();
+ liaisons(ip);
+ }
}
}
***************
*** 59,62 ****
--- 71,76 ----
super();
biefs_=new IBief[0];
+ casiers_=new ICasier[0];
+ liaisons_=new ILiaison[0];
}
***************
*** 64,67 ****
--- 78,83 ----
{
biefs_=null;
+ casiers_=null;
+ casiers_=null;
super.dispose();
}
***************
*** 79,83 ****
--- 95,172 ----
}
+ private ICasier[] casiers_;
+ public ICasier[] casiers() {
+ return casiers_;
+ }
+ public void casiers(ICasier[] s)
+ {
+ casiers_=s;
+ CDodico.findUsine().fireObjetModifie(toString(), tie(), "casiers");
+ }
+
+ private ILiaison[] liaisons_;
+ public ILiaison[] liaisons() {
+ return liaisons_;
+ }
+ public void liaisons(ILiaison[] s)
+ {
+ liaisons_=s;
+ CDodico.findUsine().fireObjetModifie(toString(), tie(), "liaisons");
+ }
+
+
// methodes
+
+ public ICasier ajouterCasier()
+ {
+ ICasier casier=CDodico.findUsine().creeHydraulique1dCasier();
+ ICasier casiers[]=new ICasier[casiers_.length+1];
+ for(int i=0; i<casiers_.length; i++) casiers[i]=casiers_[i];
+ casiers[casiers.length-1]=casier;
+ casiers(casiers);
+ return casier;
+ }
+
+ public void supprimeCasiers(ICasier[] _casiers)
+ {
+ if( casiers_==null ) return;
+ Vector newcasiers=new Vector();
+ for(int i=0; i<casiers_.length; i++) {
+ for(int j=0; j<_casiers.length; j++) {
+ if( casiers_[i]==_casiers[j] ) {
+ CDodico.findUsine().supprimeHydraulique1dCasier((ICasier)casiers_[i]);
+ } else newcasiers.add(casiers_[i]);
+ }
+ }
+ casiers_=new ICasier[newcasiers.size()];
+ for(int i=0; i<casiers_.length; i++)
+ casiers_[i]=(ICasier)newcasiers.get(i);
+ }
+
+ public ILiaison ajouterLiaison()
+ {
+ ILiaison liaison=CDodico.findUsine().creeHydraulique1dLiaison();
+ ILiaison liaisons[]=new ILiaison[liaisons_.length+1];
+ for(int i=0; i<liaisons_.length; i++) liaisons[i]=liaisons_[i];
+ liaisons[liaisons.length-1]=liaison;
+ liaisons(liaisons);
+ return liaison;
+ }
+
+ public void supprimeLiaisons(ILiaison[] _liaisons)
+ {
+ if( liaisons_==null ) return;
+ Vector newliaisons=new Vector();
+ for(int i=0; i<liaisons_.length; i++) {
+ for(int j=0; j<_liaisons.length; j++) {
+ if( liaisons_[i]==_liaisons[j] ) {
+ CDodico.findUsine().supprimeHydraulique1dCasier((ICasier)liaisons_[i]);
+ } else newliaisons.add(liaisons_[i]);
+ }
+ }
+ liaisons_=new ILiaison[newliaisons.size()];
+ for(int i=0; i<liaisons_.length; i++)
+ liaisons_[i]=(ILiaison)newliaisons.get(i);
+ }
public IBief creeBief()
|