source: trunk/gui/scripts/nanovisserver.tcl @ 893

Last change on this file since 893 was 841, checked in by gah, 17 years ago

changes for surface plots

File size: 1.3 KB
Line 
1
2# ----------------------------------------------------------------------
3#  NanovisServer -
4#
5#  This class is used to share the nanovis hosts variable between the
6#  Field2D and Field3D components.  Formerly the _nanovisHosts variable
7#  was included in the Field3D class. 
8#
9#  My plan is to make this class the parent of the NanovisViewer and
10#  HeightmapViewer classes. I'm going to move out all the server-related
11#  methods like _send*, _receive*, connect, disconnect, etc. from those
12#  classes into this one.
13#
14# ======================================================================
15#  AUTHOR:  Michael McLennan, Purdue University
16#  Copyright (c) 2004-2005  Purdue Research Foundation
17#
18#  See the file "license.terms" for information on usage and
19#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
20# ======================================================================
21
22itcl::class Rappture::NanovisServer {
23    public common _nanovisHosts ""
24    public proc setServer {namelist} {
25        if {[regexp {^[a-zA-Z0-9\.]+:[0-9]+(,[a-zA-Z0-9\.]+:[0-9]+)*$} $namelist match]} {
26            set _nanovisHosts $namelist
27        } else {
28            error "bad nanovis server address \"$namelist\": should be host:port,host:port,..."
29        }
30    }
31    public proc getServer {} {
32        return $_nanovisHosts
33    }
34}
35
Note: See TracBrowser for help on using the repository browser.