libsim Versione 7.2.6
|
◆ vol7d_network_delete()
Distrugge l'oggetto in maniera pulita, assegnandogli un valore mancante.
Definizione alla linea 397 del file vol7d_network_class.F90. 398! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
399! authors:
400! Davide Cesari <dcesari@arpa.emr.it>
401! Paolo Patruno <ppatruno@arpa.emr.it>
402
403! This program is free software; you can redistribute it and/or
404! modify it under the terms of the GNU General Public License as
405! published by the Free Software Foundation; either version 2 of
406! the License, or (at your option) any later version.
407
408! This program is distributed in the hope that it will be useful,
409! but WITHOUT ANY WARRANTY; without even the implied warranty of
410! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
411! GNU General Public License for more details.
412
413! You should have received a copy of the GNU General Public License
414! along with this program. If not, see <http://www.gnu.org/licenses/>.
415#include "config.h"
416
417!> Classe per la gestione delle reti di stazioni per osservazioni meteo e affini.
418!! Questo modulo definisce una classe per identificare la rete
419!! a cui appartiene una stazione. Per rete si intende un insieme di stazioni
420!! omogenee per tipo di sensori, tipo di variabili osservate,
421!! frequenza delle osservazioni, formato dei dati.
422!! \ingroup vol7d
427IMPLICIT NONE
428
429integer, parameter :: network_name_len=20
430
431!> Definisce la rete a cui appartiene una stazione.
432!! I membri di \a vol7d_network sono pubblici e quindi liberamente
433!! accessibili e scrivibili, ma è comunque consigliato assegnarli tramite
434!! il costruttore ::init.
436 character(len=network_name_len) :: name !< Mnemonic alias for type of report
438
439!> Valore mancante per vol7d_network.
441
442!> Costruttore per la classe vol7d_network.
443!! Deve essere richiamato
444!! per tutti gli oggetti di questo tipo definiti in un programma.
446 MODULE PROCEDURE vol7d_network_init
447END INTERFACE
448
449!> Distruttore per la classe vol7d_network.
450!! Distrugge l'oggetto in maniera pulita, assegnandogli un valore mancante.
452 MODULE PROCEDURE vol7d_network_delete
453END INTERFACE
454
455!> Logical equality operator for objects of \a vol7d_network class.
456!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
457!! of any shape.
458INTERFACE OPERATOR (==)
459 MODULE PROCEDURE vol7d_network_eq
460END INTERFACE
461
462!> Logical inequality operator for objects of \a vol7d_network class.
463!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
464!! of any shape.
465INTERFACE OPERATOR (/=)
466 MODULE PROCEDURE vol7d_network_ne
467END INTERFACE
468
469!> Logical greater-than operator for objects of \a vol7d_network class.
470!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
471!! of any shape.
472INTERFACE OPERATOR (>)
473 MODULE PROCEDURE vol7d_network_gt
474END INTERFACE
475
476!> Logical less-than operator for objects of \a vol7d_network class.
477!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
478!! of any shape.
479INTERFACE OPERATOR (<)
480 MODULE PROCEDURE vol7d_network_lt
481END INTERFACE
482
483!> Logical greater-equal operator for objects of \a vol7d_network class.
484!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
485!! of any shape.
486INTERFACE OPERATOR (>=)
487 MODULE PROCEDURE vol7d_network_ge
488END INTERFACE
489
490!> Logical less-equal operator for objects of \a vol7d_network class.
491!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
492!! of any shape.
493INTERFACE OPERATOR (<=)
494 MODULE PROCEDURE vol7d_network_le
495END INTERFACE
496
497#define VOL7D_POLY_TYPE TYPE(vol7d_network)
498#define VOL7D_POLY_TYPES _network
499#define ENABLE_SORT
500#include "array_utilities_pre.F90"
501
502!>Print object
504 MODULE PROCEDURE display_network
505END INTERFACE
506
507!>Check object presence
509 MODULE PROCEDURE c_e_network
510END INTERFACE
511
512!>return network object in a pretty string
514 MODULE PROCEDURE to_char_network
515END INTERFACE
516
517CONTAINS
518
519!> Inizializza un oggetto \a vol7d_network con i parametri opzionali forniti.
520!! Questa è la versione \c FUNCTION, in stile F2003, del costruttore, da preferire
521!! rispetto alla versione \c SUBROUTINE \c init.
522!! Se non viene passato nessun parametro opzionale l'oggetto è
523!! inizializzato a valore mancante.
524FUNCTION vol7d_network_new(name) RESULT(this)
525CHARACTER(len=*),INTENT(in),OPTIONAL :: name !< Mnemonic alias for type of report
526
527TYPE(vol7d_network) :: this !< oggetto da inizializzare
528
530
531END FUNCTION vol7d_network_new
532
533
534!> Inizializza un oggetto \a vol7d_network con i parametri opzionali forniti.
535!! Se non viene passato nessun parametro opzionale l'oggetto è
536!! inizializzato a valore mancante.
537SUBROUTINE vol7d_network_init(this, name)
538TYPE(vol7d_network),INTENT(INOUT) :: this !< oggetto da inizializzare
539CHARACTER(len=*),INTENT(in),OPTIONAL :: name !< Mnemonic alias for type of report
540
541IF (PRESENT(name)) THEN
542 this%name = lowercase(name)
543ELSE
544 this%name = cmiss
545END IF
546
547END SUBROUTINE vol7d_network_init
548
549
550!> Distrugge l'oggetto in maniera pulita, assegnandogli un valore mancante.
551SUBROUTINE vol7d_network_delete(this)
552TYPE(vol7d_network),INTENT(INOUT) :: this !< oggetto da distruggre
553
554this%name = cmiss
555
556END SUBROUTINE vol7d_network_delete
557
558
559subroutine display_network(this)
560
561TYPE(vol7d_network),INTENT(in) :: this
562
563print*,to_char_network(this)
564
565end subroutine display_network
566
567
568elemental function c_e_network(this) result(res)
569
570TYPE(vol7d_network),INTENT(in) :: this
571logical :: res
572
573res = .not. this == vol7d_network_miss
574
575end function c_e_network
576
577
578elemental character(len=20) function to_char_network(this)
579
580TYPE(vol7d_network),INTENT(in) :: this
581
582to_char_network="Network: "//trim(this%name)
583
584return
585
586end function to_char_network
587
588
589ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
590TYPE(vol7d_network),INTENT(IN) :: this, that
591LOGICAL :: res
592
593res = (this%name == that%name)
594
595END FUNCTION vol7d_network_eq
596
597
598ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
599TYPE(vol7d_network),INTENT(IN) :: this, that
600LOGICAL :: res
601
602res = .NOT.(this == that)
603
604END FUNCTION vol7d_network_ne
605
606
607ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
608TYPE(vol7d_network),INTENT(IN) :: this, that
609LOGICAL :: res
610
611res = this%name > that%name
612
613END FUNCTION vol7d_network_gt
614
615ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
616TYPE(vol7d_network),INTENT(IN) :: this, that
617LOGICAL :: res
618
619res = this%name < that%name
620
621END FUNCTION vol7d_network_lt
622
623
624ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
625TYPE(vol7d_network),INTENT(IN) :: this, that
626LOGICAL :: res
627
628res = this%name >= that%name
629
630END FUNCTION vol7d_network_ge
631
632ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
633TYPE(vol7d_network),INTENT(IN) :: this, that
634LOGICAL :: res
635
636res = this%name <= that%name
637
638END FUNCTION vol7d_network_le
639
640
641#include "array_utilities_inc.F90"
642
643
Distruttore per la classe vol7d_network. Definition vol7d_network_class.F90:242 Costruttore per la classe vol7d_network. Definition vol7d_network_class.F90:236 return network object in a pretty string Definition vol7d_network_class.F90:359 Definition of constants to be used for declaring variables of a desired type. Definition kinds.F90:245 Definitions of constants and functions for working with missing values. Definition missing_values.f90:50 Classe per la gestione delle reti di stazioni per osservazioni meteo e affini. Definition vol7d_network_class.F90:214 Definisce la rete a cui appartiene una stazione. Definition vol7d_network_class.F90:226 |