Changeset 5609 for trunk


Ignore:
Timestamp:
May 27, 2015 12:24:37 PM (9 years ago)
Author:
ldelgass
Message:

Remove unused/redundant size method from mesh/cloud. numpoints/numcells should
be used instead.

Location:
trunk/gui/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/cloud.tcl

    r5605 r5609  
    1818
    1919itcl::class Rappture::Cloud {
     20    constructor {xmlobj path} {
     21        # defined below
     22    }
     23    destructor {
     24        # defined below
     25    }
     26    public method points {}
     27    public method mesh {}
     28    public method units { axis }
     29    public method label { axis }
     30    public method vtkdata {}
     31    public method dimensions {}
     32    public method limits {which}
     33    public method hints {{key ""}}
     34    public method numpoints {} {
     35        return $_numPoints
     36    }
     37    public method isvalid {} {
     38        return $_isValid
     39    }
     40
     41    public proc fetch {xmlobj path}
     42    public proc release {obj}
     43
    2044    private variable _xmlobj "";        # ref to XML obj with device data
    2145    private variable _cloud "";         # lib obj representing this cloud
     
    2448    private variable _axis2units;       #
    2549    private variable _limits;           # limits x, y, z
    26     private common _xp2obj ;            # Used for fetch/release ref counting
    27     private common _obj2ref ;           # Used for fetch/release ref counting
    2850    private variable _numPoints 0
    2951    private variable _vtkdata ""
     
    3254    private variable _isValid 0;        # Indicates if the data is valid.
    3355
    34     constructor {xmlobj path} {
    35         # defined below
    36     }
    37     destructor {
    38         # defined below
    39     }
    40     public method points {}
    41     public method mesh {}
    42     public method units { axis }
    43     public method label { axis }
    44     public method vtkdata {}
    45     public method size {}
    46     public method dimensions {}
    47     public method limits {which}
    48     public method hints {{key ""}}
    49     public method numpoints {} {
    50         return $_numPoints
    51     }
    52     public method isvalid {} {
    53         return $_isValid
    54     }
    55     public proc fetch {xmlobj path}
    56     public proc release {obj}
     56    private common _xp2obj ;            # Used for fetch/release ref counting
     57    private common _obj2ref ;           # Used for fetch/release ref counting
    5758}
    5859
     
    224225
    225226# ----------------------------------------------------------------------
    226 # USAGE: size
    227 #
    228 # Returns the number of points in this cloud.
    229 # ----------------------------------------------------------------------
    230 itcl::body Rappture::Cloud::size {} {
    231     return $_numPoints
    232 }
    233 
    234 # ----------------------------------------------------------------------
    235227# USAGE: dimensions
    236228#
  • trunk/gui/scripts/mesh.tcl

    r5320 r5609  
    4545    public method elements {}
    4646    public method mesh {{-type "vtk"}}
    47     public method size {{what -points}}
    4847    public method dimensions {}
    4948    public method limits {which}
     
    333332        default {
    334333            error "Requested mesh type \"$type\" is unknown."
    335         }
    336     }
    337 }
    338 
    339 # ----------------------------------------------------------------------
    340 # USAGE: size ?-points|-elements?
    341 #
    342 # Returns the number of points in this mesh.
    343 # ----------------------------------------------------------------------
    344 itcl::body Rappture::Mesh::size {{what -points}} {
    345     switch -- $what {
    346         -points {
    347             return $_numPoints
    348         }
    349         -elements {
    350             return $_numCells
    351         }
    352         default {
    353             error "bad option \"$what\": should be -points or -elements"
    354334        }
    355335    }
Note: See TracChangeset for help on using the changeset viewer.