Changeset 4056


Ignore:
Timestamp:
Nov 14, 2013, 8:39:19 PM (6 years ago)
Author:
ldelgass
Message:

Use nv namespace for internal classes (not Rappture) to make it easier to find
dependencies on the Rappture libraries.

Location:
trunk/packages/vizservers/nanovis
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/CmdProc.cpp

    r3713 r4056  
    1010#include "CmdProc.h"
    1111
    12 using namespace Rappture;
     12using namespace nv;
    1313
    1414/**
     
    115115 */
    116116Tcl_ObjCmdProc *
    117 Rappture::GetOpFromObj(Tcl_Interp *interp,      /* Interpreter to report errors to */
    118                        int nSpecs,              /* Number of specifications in array */
    119                        CmdSpec *specs,          /* Op specification array */
    120                        int operPos,             /* Position of operation in argument
    121                                                  * list. */
    122                        int objc,                /* Number of arguments in the argument
    123                                                  * vector.  This includes any prefixed
    124                                                  * arguments */
    125                        Tcl_Obj *const *objv,    /* Argument vector */
    126                        int flags)
     117nv::GetOpFromObj(Tcl_Interp *interp,    /* Interpreter to report errors to */
     118                 int nSpecs,            /* Number of specifications in array */
     119                 CmdSpec *specs,                /* Op specification array */
     120                 int operPos,           /* Position of operation in argument
     121                                         * list. */
     122                 int objc,              /* Number of arguments in the argument
     123                                         * vector.  This includes any prefixed
     124                                         * arguments */
     125                 Tcl_Obj *const *objv,  /* Argument vector */
     126                 int flags)
    127127{
    128128    CmdSpec *specPtr;
  • trunk/packages/vizservers/nanovis/CmdProc.h

    r3613 r4056  
    44 *
    55 */
    6 #ifndef RAPPTURE_CMDPROC_H
    7 #define RAPPTURE_CMDPROC_H
     6#ifndef NV_CMDPROC_H
     7#define NV_CMDPROC_H
    88
    9 namespace Rappture {
     9namespace nv {
    1010
    1111/**
     
    3838             CmdSpec *specs, int operPos, int objc, Tcl_Obj *const *objv, int flags);
    3939
    40 #define NumCmdSpecs(s) (sizeof(s) / sizeof(Rappture::CmdSpec))
     40#define NumCmdSpecs(s) (sizeof(s) / sizeof(nv::CmdSpec))
    4141
    4242}
  • trunk/packages/vizservers/nanovis/Command.cpp

    r3884 r4056  
    288288        return NULL;
    289289    }
    290     if ((nv::GetFloatFromObj(interp, objv[0], &xMin) != TCL_OK) ||
    291         (nv::GetFloatFromObj(interp, objv[1], &yMin) != TCL_OK) ||
    292         (nv::GetFloatFromObj(interp, objv[2], &xMax) != TCL_OK) ||
    293         (nv::GetFloatFromObj(interp, objv[3], &yMax) != TCL_OK) ||
     290    if ((GetFloatFromObj(interp, objv[0], &xMin) != TCL_OK) ||
     291        (GetFloatFromObj(interp, objv[1], &yMin) != TCL_OK) ||
     292        (GetFloatFromObj(interp, objv[2], &xMax) != TCL_OK) ||
     293        (GetFloatFromObj(interp, objv[3], &yMax) != TCL_OK) ||
    294294        (Tcl_GetIntFromObj(interp, objv[4], &xNum) != TCL_OK) ||
    295295        (Tcl_GetIntFromObj(interp, objv[5], &yNum) != TCL_OK)) {
     
    320320    int i;
    321321    for (i = 0; i < nValues; i++) {
    322         if (nv::GetFloatFromObj(interp, elem[i], heights + i) != TCL_OK) {
     322        if (GetFloatFromObj(interp, elem[i], heights + i) != TCL_OK) {
    323323            delete [] heights;
    324324            return NULL;
     
    651651}
    652652
    653 static Rappture::CmdSpec cameraOps[] = {
     653static CmdSpec cameraOps[] = {
    654654    {"angle",   2, CameraAngleOp,    5, 5, "xAngle yAngle zAngle",},
    655655    {"orient",  1, CameraOrientOp,   6, 6, "qw qx qy qz",},
     
    667667    Tcl_ObjCmdProc *proc;
    668668
    669     proc = Rappture::GetOpFromObj(interp, nCameraOps, cameraOps,
    670                                   Rappture::CMDSPEC_ARG1, objc, objv, 0);
     669    proc = GetOpFromObj(interp, nCameraOps, cameraOps,
     670                        CMDSPEC_ARG1, objc, objv, 0);
    671671    if (proc == NULL) {
    672672        return TCL_ERROR;
     
    786786}
    787787
    788 static Rappture::CmdSpec cutplaneOps[] = {
     788static CmdSpec cutplaneOps[] = {
    789789    {"position", 1, CutplanePositionOp, 4, 0, "relval axis ?indices?",},
    790790    {"state",    1, CutplaneStateOp,    4, 0, "bool axis ?indices?",},
     
    814814    Tcl_ObjCmdProc *proc;
    815815
    816     proc = Rappture::GetOpFromObj(interp, nCutplaneOps, cutplaneOps,
    817                                   Rappture::CMDSPEC_ARG1, objc, objv, 0);
     816    proc = GetOpFromObj(interp, nCutplaneOps, cutplaneOps,
     817                        CMDSPEC_ARG1, objc, objv, 0);
    818818    if (proc == NULL) {
    819819        return TCL_ERROR;
     
    851851    /* Use the initial client key value pairs as the parts for a generating
    852852     * a unique file name. */
    853     int f = nv::getStatsFile(interp, objv[1]);
     853    int f = getStatsFile(interp, objv[1]);
    854854    if (f < 0) {
    855855        Tcl_AppendResult(interp, "can't open stats file: ",
     
    887887    /* date */
    888888    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("date", 4));
    889     strcpy(buf, ctime(&nv::g_stats.start.tv_sec));
     889    strcpy(buf, ctime(&g_stats.start.tv_sec));
    890890    buf[strlen(buf) - 1] = '\0';
    891891    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(buf, -1));
     
    894894                Tcl_NewStringObj("date_secs", 9));
    895895    Tcl_ListObjAppendElement(interp, listObjPtr,
    896                 Tcl_NewLongObj(nv::g_stats.start.tv_sec));
     896                Tcl_NewLongObj(g_stats.start.tv_sec));
    897897    /* Client arguments. */
    898898    if (Tcl_ListObjGetElements(interp, objv[1], &numItems, &items) != TCL_OK) {
     
    907907    Tcl_DStringAppend(&ds, "\n", 1);
    908908#ifdef KEEPSTATS
    909     result = nv::writeToStatsFile(f, Tcl_DStringValue(&ds),
    910                                   Tcl_DStringLength(&ds));
     909    result = writeToStatsFile(f, Tcl_DStringValue(&ds),
     910                              Tcl_DStringLength(&ds));
    911911#else
    912912    TRACE("clientinfo: %s", Tcl_DStringValue(&ds));
     
    993993}
    994994
    995 static Rappture::CmdSpec screenOps[] = {
     995static CmdSpec screenOps[] = {
    996996    {"bgcolor",  1, ScreenBgColorOp,  5, 5, "r g b",},
    997997    {"size",     1, ScreenSizeOp, 4, 4, "width height",},
     
    10051005    Tcl_ObjCmdProc *proc;
    10061006
    1007     proc = Rappture::GetOpFromObj(interp, nScreenOps, screenOps,
    1008                                   Rappture::CMDSPEC_ARG1, objc, objv, 0);
     1007    proc = GetOpFromObj(interp, nScreenOps, screenOps,
     1008                        CMDSPEC_ARG1, objc, objv, 0);
    10091009    if (proc == NULL) {
    10101010        return TCL_ERROR;
     
    11821182             * but screen buffer is now 1 byte aligned for PPM images.
    11831183             */
    1184             nv::writeBMPFile(frameNum, dirName,
    1185                              NanoVis::screenBuffer,
    1186                              NanoVis::winWidth, NanoVis::winHeight);
     1184            writeBMPFile(frameNum, dirName,
     1185                         NanoVis::screenBuffer,
     1186                         NanoVis::winWidth, NanoVis::winHeight);
    11871187        }
    11881188    }
     
    12311231}
    12321232
    1233 static Rappture::CmdSpec volumeAnimationOps[] = {
     1233static CmdSpec volumeAnimationOps[] = {
    12341234    {"capture",   2, VolumeAnimationCaptureOp,  4, 5, "numframes ?filename?",},
    12351235    {"clear",     2, VolumeAnimationClearOp,    3, 3, "",},
     
    12471247    Tcl_ObjCmdProc *proc;
    12481248
    1249     proc = Rappture::GetOpFromObj(interp, nVolumeAnimationOps,
    1250                 volumeAnimationOps, Rappture::CMDSPEC_ARG2, objc, objv, 0);
     1249    proc = GetOpFromObj(interp, nVolumeAnimationOps,
     1250                        volumeAnimationOps, CMDSPEC_ARG2, objc, objv, 0);
    12511251    if (proc == NULL) {
    12521252        return TCL_ERROR;
     
    13831383}
    13841384
    1385 static Rappture::CmdSpec volumeDataOps[] = {
     1385static CmdSpec volumeDataOps[] = {
    13861386    {"follows",   1, VolumeDataFollowsOp, 5, 5, "nbytes tag",},
    13871387    {"state",     1, VolumeDataStateOp,   4, 0, "bool ?indices?",},
     
    13951395    Tcl_ObjCmdProc *proc;
    13961396
    1397     proc = Rappture::GetOpFromObj(interp, nVolumeDataOps, volumeDataOps,
    1398                                   Rappture::CMDSPEC_ARG2, objc, objv, 0);
     1397    proc = GetOpFromObj(interp, nVolumeDataOps, volumeDataOps,
     1398                        CMDSPEC_ARG2, objc, objv, 0);
    13991399    if (proc == NULL) {
    14001400        return TCL_ERROR;
     
    14871487}
    14881488
    1489 static Rappture::CmdSpec volumeOutlineOps[] = {
     1489static CmdSpec volumeOutlineOps[] = {
    14901490    {"color",     1, VolumeOutlineColorOp,  6, 0, "r g b ?indices?",},
    14911491    {"state",     1, VolumeOutlineStateOp,  4, 0, "bool ?indices?",},
     
    15001500    Tcl_ObjCmdProc *proc;
    15011501
    1502     proc = Rappture::GetOpFromObj(interp, nVolumeOutlineOps, volumeOutlineOps,
    1503         Rappture::CMDSPEC_ARG2, objc, objv, 0);
     1502    proc = GetOpFromObj(interp, nVolumeOutlineOps, volumeOutlineOps,
     1503                        CMDSPEC_ARG2, objc, objv, 0);
    15041504    if (proc == NULL) {
    15051505        return TCL_ERROR;
     
    16791679}
    16801680
    1681 static Rappture::CmdSpec volumeShadingOps[] = {
     1681static CmdSpec volumeShadingOps[] = {
    16821682    {"ambient",       1, VolumeShadingAmbientOp,     4, 0, "value ?indices?",},
    16831683    {"diffuse",       1, VolumeShadingDiffuseOp,     4, 0, "value ?indices?",},
     
    16971697    Tcl_ObjCmdProc *proc;
    16981698
    1699     proc = Rappture::GetOpFromObj(interp, nVolumeShadingOps, volumeShadingOps,
    1700         Rappture::CMDSPEC_ARG2, objc, objv, 0);
     1699    proc = GetOpFromObj(interp, nVolumeShadingOps, volumeShadingOps,
     1700                        CMDSPEC_ARG2, objc, objv, 0);
    17011701    if (proc == NULL) {
    17021702        return TCL_ERROR;
     
    17241724}
    17251725
    1726 static Rappture::CmdSpec volumeOps[] = {
     1726static CmdSpec volumeOps[] = {
    17271727    {"animation", 2, VolumeAnimationOp,   3, 0, "oper ?args?",},
    17281728    {"data",      2, VolumeDataOp,        3, 0, "oper ?args?",},
     
    17421742    Tcl_ObjCmdProc *proc;
    17431743
    1744     proc = Rappture::GetOpFromObj(interp, nVolumeOps, volumeOps,
    1745         Rappture::CMDSPEC_ARG1, objc, objv, 0);
     1744    proc = GetOpFromObj(interp, nVolumeOps, volumeOps,
     1745                        CMDSPEC_ARG1, objc, objv, 0);
    17461746    if (proc == NULL) {
    17471747        return TCL_ERROR;
     
    17641764        return TCL_ERROR;
    17651765    }
    1766     Rappture::Unirect2d data(1);
     1766    Unirect2d data(1);
    17671767    if (data.parseBuffer(interp, buf) != TCL_OK) {
    17681768        return TCL_ERROR;
     
    18181818}
    18191819
    1820 static Rappture::CmdSpec heightMapDataOps[] = {
     1820static CmdSpec heightMapDataOps[] = {
    18211821    {"follows",  1, HeightMapDataFollowsOp, 5, 5, "size heightmapName",},
    18221822    {"visible",  1, HeightMapDataVisibleOp, 4, 0, "bool ?heightmapNames...?",},
     
    18301830    Tcl_ObjCmdProc *proc;
    18311831
    1832     proc = Rappture::GetOpFromObj(interp, nHeightMapDataOps, heightMapDataOps,
    1833                                   Rappture::CMDSPEC_ARG2, objc, objv, 0);
     1832    proc = GetOpFromObj(interp, nHeightMapDataOps, heightMapDataOps,
     1833                        CMDSPEC_ARG2, objc, objv, 0);
    18341834    if (proc == NULL) {
    18351835        return TCL_ERROR;
     
    18791879}
    18801880
    1881 static Rappture::CmdSpec heightMapLineContourOps[] = {
     1881static CmdSpec heightMapLineContourOps[] = {
    18821882    {"color",   1, HeightMapLineContourColorOp,   6, 0, "r g b ?heightmapNames...?",},
    18831883    {"visible", 1, HeightMapLineContourVisibleOp, 4, 0, "bool ?heightmapNames...?",},
     
    18911891    Tcl_ObjCmdProc *proc;
    18921892
    1893     proc = Rappture::GetOpFromObj(interp, nHeightMapLineContourOps,
    1894         heightMapLineContourOps, Rappture::CMDSPEC_ARG2, objc, objv, 0);
     1893    proc = GetOpFromObj(interp, nHeightMapLineContourOps,
     1894                        heightMapLineContourOps, CMDSPEC_ARG2, objc, objv, 0);
    18951895    if (proc == NULL) {
    18961896        return TCL_ERROR;
     
    20342034}
    20352035
    2036 static Rappture::CmdSpec heightMapOps[] = {
     2036static CmdSpec heightMapOps[] = {
    20372037    {"create",       2, HeightMapCreateOp,      10, 10, "heightmapName xmin ymin xmax ymax xnum ynum values",},
    20382038    {"cull",         2, HeightMapCullOp,        3, 3, "mode",},
     
    20532053    Tcl_ObjCmdProc *proc;
    20542054
    2055     proc = Rappture::GetOpFromObj(interp, nHeightMapOps, heightMapOps,
    2056                                   Rappture::CMDSPEC_ARG1, objc, objv, 0);
     2055    proc = GetOpFromObj(interp, nHeightMapOps, heightMapOps,
     2056                        CMDSPEC_ARG1, objc, objv, 0);
    20572057    if (proc == NULL) {
    20582058        return TCL_ERROR;
     
    21362136}
    21372137
    2138 static Rappture::CmdSpec gridOps[] = {
     2138static CmdSpec gridOps[] = {
    21392139    {"axiscolor",  5, GridAxisColorOp,  5, 6, "r g b ?a?",},
    21402140    {"axisname",   5, GridAxisNameOp,   5, 5, "index title units",},
     
    21502150    Tcl_ObjCmdProc *proc;
    21512151
    2152     proc = Rappture::GetOpFromObj(interp, nGridOps, gridOps,
    2153                                   Rappture::CMDSPEC_ARG1, objc, objv, 0);
     2152    proc = GetOpFromObj(interp, nGridOps, gridOps,
     2153                        CMDSPEC_ARG1, objc, objv, 0);
    21542154    if (proc == NULL) {
    21552155        return TCL_ERROR;
  • trunk/packages/vizservers/nanovis/Flow.cpp

    r3936 r4056  
    5656    TRACE("Enter");
    5757
    58     Rappture::FreeSwitches(_switches, &_sv, 0);
     58    FreeSwitches(_switches, &_sv, 0);
    5959
    6060    if (_volume != NULL) {
     
    336336
    337337float *
    338 Flow::getScaledVector(Rappture::Unirect3d *unirect)
     338Flow::getScaledVector(Unirect3d *unirect)
    339339{
    340340    assert(unirect->nComponents() == 3);
     
    365365
    366366Volume *
    367 Flow::makeVolume(Rappture::Unirect3d *unirect, float *data)
     367Flow::makeVolume(Unirect3d *unirect, float *data)
    368368{
    369369    Volume *volume =
  • trunk/packages/vizservers/nanovis/Flow.h

    r3936 r4056  
    104104    }
    105105
    106     void data(Rappture::Unirect3d *unirect)
     106    void data(Unirect3d *unirect)
    107107    {
    108108        float *vdata = getScaledVector(unirect);
     
    181181    int parseSwitches(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
    182182    {
    183         if (Rappture::ParseSwitches(interp, _switches, objc, objv, &_sv,
    184                                     SWITCH_DEFAULTS) < 0) {
     183        if (nv::ParseSwitches(interp, _switches, objc, objv, &_sv,
     184                              SWITCH_DEFAULTS) < 0) {
    185185            return TCL_ERROR;
    186186        }
     
    210210    bool scaleVectorField();
    211211
    212     float *getScaledVector(Rappture::Unirect3d *unirect);
    213 
    214     Volume *makeVolume(Rappture::Unirect3d *unirect, float *data);
     212    float *getScaledVector(Unirect3d *unirect);
     213
     214    Volume *makeVolume(Unirect3d *unirect, float *data);
    215215
    216216    void renderBoxes();
     
    251251    FlowValues _sv;
    252252
    253     static Rappture::SwitchSpec _switches[];
     253    static SwitchSpec _switches[];
    254254};
    255255
  • trunk/packages/vizservers/nanovis/FlowBox.cpp

    r3630 r4056  
    4141{
    4242    TRACE("Freeing switches");
    43     Rappture::FreeSwitches(_switches, &_sv, 0);
     43    FreeSwitches(_switches, &_sv, 0);
    4444}
    4545
  • trunk/packages/vizservers/nanovis/FlowBox.h

    r3630 r4056  
    4949    int parseSwitches(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
    5050    {
    51         if (Rappture::ParseSwitches(interp, _switches, objc, objv, &_sv,
    52                                     SWITCH_DEFAULTS) < 0) {
     51        if (nv::ParseSwitches(interp, _switches, objc, objv, &_sv,
     52                              SWITCH_DEFAULTS) < 0) {
    5353            return TCL_ERROR;
    5454        }
     
    6969    std::string _name;          ///< Name of this box in the hash table.
    7070    FlowBoxValues _sv;
    71     static Rappture::SwitchSpec _switches[];
     71    static SwitchSpec _switches[];
    7272};
    7373
  • trunk/packages/vizservers/nanovis/FlowCmd.cpp

    r3943 r4056  
    5050using namespace vrmath;
    5151
    52 static Rappture::SwitchParseProc AxisSwitchProc;
    53 static Rappture::SwitchCustom axisSwitch = {
     52static SwitchParseProc AxisSwitchProc;
     53static SwitchCustom axisSwitch = {
    5454    AxisSwitchProc, NULL, 0,
    5555};
    5656
    57 static Rappture::SwitchParseProc ColorSwitchProc;
    58 static Rappture::SwitchCustom colorSwitch = {
     57static SwitchParseProc ColorSwitchProc;
     58static SwitchCustom colorSwitch = {
    5959    ColorSwitchProc, NULL, 0,
    6060};
    6161
    62 static Rappture::SwitchParseProc PointSwitchProc;
    63 static Rappture::SwitchCustom pointSwitch = {
     62static SwitchParseProc PointSwitchProc;
     63static SwitchCustom pointSwitch = {
    6464    PointSwitchProc, NULL, 0,
    6565};
    6666
    67 static Rappture::SwitchParseProc PositionSwitchProc;
    68 static Rappture::SwitchCustom positionSwitch = {
     67static SwitchParseProc PositionSwitchProc;
     68static SwitchCustom positionSwitch = {
    6969    PositionSwitchProc, NULL, 0,
    7070};
    7171
    72 static Rappture::SwitchParseProc TransferFunctionSwitchProc;
    73 static Rappture::SwitchCustom transferFunctionSwitch = {
     72static SwitchParseProc TransferFunctionSwitchProc;
     73static SwitchCustom transferFunctionSwitch = {
    7474    TransferFunctionSwitchProc, NULL, 0,
    7575};
    7676
    77 Rappture::SwitchSpec Flow::_switches[] = {
    78     {Rappture::SWITCH_FLOAT, "-ambient", "value",
     77SwitchSpec Flow::_switches[] = {
     78    {SWITCH_FLOAT, "-ambient", "value",
    7979     offsetof(FlowValues, ambient), 0},
    80     {Rappture::SWITCH_BOOLEAN, "-arrows", "boolean",
     80    {SWITCH_BOOLEAN, "-arrows", "boolean",
    8181     offsetof(FlowValues, showArrows), 0},
    82     {Rappture::SWITCH_CUSTOM, "-axis", "axis",
     82    {SWITCH_CUSTOM, "-axis", "axis",
    8383     offsetof(FlowValues, slicePos.axis), 0, 0, &axisSwitch},
    84     {Rappture::SWITCH_FLOAT, "-diffuse", "value",
     84    {SWITCH_FLOAT, "-diffuse", "value",
    8585     offsetof(FlowValues, diffuse), 0},
    86     {Rappture::SWITCH_BOOLEAN, "-hide", "boolean",
     86    {SWITCH_BOOLEAN, "-hide", "boolean",
    8787     offsetof(FlowValues, isHidden), 0},
    88     {Rappture::SWITCH_BOOLEAN, "-light2side", "boolean",
     88    {SWITCH_BOOLEAN, "-light2side", "boolean",
    8989     offsetof(FlowValues, twoSidedLighting), 0},
    90     {Rappture::SWITCH_FLOAT, "-opacity", "value",
     90    {SWITCH_FLOAT, "-opacity", "value",
    9191     offsetof(FlowValues, opacity), 0},
    92     {Rappture::SWITCH_BOOLEAN, "-outline", "boolean",
     92    {SWITCH_BOOLEAN, "-outline", "boolean",
    9393     offsetof(FlowValues, showOutline), 0},
    94     {Rappture::SWITCH_CUSTOM, "-position", "number",
     94    {SWITCH_CUSTOM, "-position", "number",
    9595     offsetof(FlowValues, slicePos), 0, 0, &positionSwitch},
    96     {Rappture::SWITCH_BOOLEAN, "-slice", "boolean",
     96    {SWITCH_BOOLEAN, "-slice", "boolean",
    9797     offsetof(FlowValues, sliceVisible), 0},
    98     {Rappture::SWITCH_FLOAT, "-specularExp", "value",
     98    {SWITCH_FLOAT, "-specularExp", "value",
    9999     offsetof(FlowValues, specularExp), 0},
    100     {Rappture::SWITCH_FLOAT, "-specularLevel", "value",
     100    {SWITCH_FLOAT, "-specularLevel", "value",
    101101     offsetof(FlowValues, specular), 0},
    102     {Rappture::SWITCH_CUSTOM, "-transferfunction", "name",
     102    {SWITCH_CUSTOM, "-transferfunction", "name",
    103103     offsetof(FlowValues, transferFunction), 0, 0, &transferFunctionSwitch},
    104     {Rappture::SWITCH_BOOLEAN, "-volume", "boolean",
     104    {SWITCH_BOOLEAN, "-volume", "boolean",
    105105     offsetof(FlowValues, showVolume), 0},
    106     {Rappture::SWITCH_END}
    107 };
    108 
    109 Rappture::SwitchSpec FlowParticles::_switches[] = {
    110     {Rappture::SWITCH_CUSTOM, "-axis", "axis",
     106    {SWITCH_END}
     107};
     108
     109SwitchSpec FlowParticles::_switches[] = {
     110    {SWITCH_CUSTOM, "-axis", "axis",
    111111     offsetof(FlowParticlesValues, position.axis), 0, 0, &axisSwitch},
    112     {Rappture::SWITCH_CUSTOM, "-color", "{r g b a}",
     112    {SWITCH_CUSTOM, "-color", "{r g b a}",
    113113     offsetof(FlowParticlesValues, color), 0, 0,  &colorSwitch},
    114     {Rappture::SWITCH_BOOLEAN, "-hide", "boolean",
     114    {SWITCH_BOOLEAN, "-hide", "boolean",
    115115     offsetof(FlowParticlesValues, isHidden), 0},
    116     {Rappture::SWITCH_CUSTOM, "-position", "number",
     116    {SWITCH_CUSTOM, "-position", "number",
    117117     offsetof(FlowParticlesValues, position), 0, 0, &positionSwitch},
    118     {Rappture::SWITCH_FLOAT, "-size", "float",
     118    {SWITCH_FLOAT, "-size", "float",
    119119     offsetof(FlowParticlesValues, particleSize), 0},
    120     {Rappture::SWITCH_END}
    121 };
    122 
    123 Rappture::SwitchSpec FlowBox::_switches[] = {
    124     {Rappture::SWITCH_CUSTOM, "-color", "{r g b a}",
     120    {SWITCH_END}
     121};
     122
     123SwitchSpec FlowBox::_switches[] = {
     124    {SWITCH_CUSTOM, "-color", "{r g b a}",
    125125     offsetof(FlowBoxValues, color), 0, 0,  &colorSwitch},
    126     {Rappture::SWITCH_CUSTOM, "-corner1", "{x y z}",
     126    {SWITCH_CUSTOM, "-corner1", "{x y z}",
    127127     offsetof(FlowBoxValues, corner1), 0, 0, &pointSwitch},
    128     {Rappture::SWITCH_CUSTOM, "-corner2", "{x y z}",
     128    {SWITCH_CUSTOM, "-corner2", "{x y z}",
    129129     offsetof(FlowBoxValues, corner2), 0, 0, &pointSwitch},
    130     {Rappture::SWITCH_BOOLEAN, "-hide", "boolean",
     130    {SWITCH_BOOLEAN, "-hide", "boolean",
    131131     offsetof(FlowBoxValues, isHidden), 0},
    132     {Rappture::SWITCH_FLOAT, "-linewidth", "number",
     132    {SWITCH_FLOAT, "-linewidth", "number",
    133133     offsetof(FlowBoxValues, lineWidth), 0},
    134     {Rappture::SWITCH_END}
     134    {SWITCH_END}
    135135};
    136136
     
    161161    }
    162162
    163     Rappture::Unirect3d *dataPtr;
    164     dataPtr = new Rappture::Unirect3d(nComponents);
     163    Unirect3d *dataPtr;
     164    dataPtr = new Unirect3d(nComponents);
    165165    Flow *flow = (Flow *)clientData;
    166166    size_t length = buf.size();
     
    178178        }
    179179    } else if ((length > 10) && (strncmp(bytes, "unirect2d ", 10) == 0)) {
    180         Rappture::Unirect2d *u2dPtr;
    181         u2dPtr = new Rappture::Unirect2d(nComponents);
     180        Unirect2d *u2dPtr;
     181        u2dPtr = new Unirect2d(nComponents);
    182182        if (u2dPtr->parseBuffer(interp, buf) != TCL_OK) {
    183183            delete u2dPtr;
     
    247247    size_t length = buf.size();
    248248
    249     Rappture::Unirect3d *unirect = NULL;
     249    Unirect3d *unirect = NULL;
    250250    Volume *volume = NULL;
    251251
    252252    Flow *flow = (Flow *)clientData;
    253253    if ((length > 4) && (strncmp(bytes, "<DX>", 4) == 0)) {
    254         unirect = new Rappture::Unirect3d(nComponents);
     254        unirect = new Unirect3d(nComponents);
    255255        if (!unirect->importDx(result, nComponents, length - 4, bytes + 4)) {
    256256            Tcl_AppendResult(interp, result.remark(), (char *)NULL);
     
    259259        }
    260260    } else if ((length > 10) && (strncmp(bytes, "unirect3d ", 10) == 0)) {
    261         unirect = new Rappture::Unirect3d(nComponents);
     261        unirect = new Unirect3d(nComponents);
    262262        if (unirect->parseBuffer(interp, buf) != TCL_OK) {
    263263            delete unirect;
     
    265265        }
    266266    } else if ((length > 10) && (strncmp(bytes, "unirect2d ", 10) == 0)) {
    267         unirect = new Rappture::Unirect3d(nComponents);
    268         Rappture::Unirect2d *u2dPtr;
    269         u2dPtr = new Rappture::Unirect2d(nComponents);
     267        unirect = new Unirect3d(nComponents);
     268        Unirect2d *u2dPtr;
     269        u2dPtr = new Unirect2d(nComponents);
    270270        if (u2dPtr->parseBuffer(interp, buf) != TCL_OK) {
    271271            delete unirect;
     
    297297    } else {
    298298        TRACE("header is %.14s", buf.bytes());
    299         unirect = new Rappture::Unirect3d(nComponents);
     299        unirect = new Unirect3d(nComponents);
    300300        if (!unirect->importDx(result, nComponents, length, bytes)) {
    301301            Tcl_AppendResult(interp, result.remark(), (char *)NULL);
     
    349349}
    350350
    351 static Rappture::CmdSpec flowDataOps[] = {
     351static CmdSpec flowDataOps[] = {
    352352    {"file",    2, FlowDataFileOp,    5, 5, "fileName nComponents",},
    353353    {"follows", 2, FlowDataFollowsOp, 5, 5, "size nComponents",},
     
    361361    Tcl_ObjCmdProc *proc;
    362362
    363     proc = Rappture::GetOpFromObj(interp, nFlowDataOps, flowDataOps,
    364                                   Rappture::CMDSPEC_ARG2, objc, objv, 0);
     363    proc = GetOpFromObj(interp, nFlowDataOps, flowDataOps,
     364                        CMDSPEC_ARG2, objc, objv, 0);
    365365    if (proc == NULL) {
    366366        return TCL_ERROR;
     
    687687}
    688688
    689 static Rappture::CmdSpec flowParticlesOps[] = {
     689static CmdSpec flowParticlesOps[] = {
    690690    {"add",        1, FlowParticlesAddOp,        4, 0, "name ?switches?",},
    691691    {"configure",  1, FlowParticlesConfigureOp,  4, 0, "name ?switches?",},
     
    711711{
    712712    Tcl_ObjCmdProc *proc;
    713     proc = Rappture::GetOpFromObj(interp, nFlowParticlesOps, flowParticlesOps,
    714                                   Rappture::CMDSPEC_ARG2, objc, objv, 0);
     713    proc = GetOpFromObj(interp, nFlowParticlesOps, flowParticlesOps,
     714                        CMDSPEC_ARG2, objc, objv, 0);
    715715    if (proc == NULL) {
    716716        return TCL_ERROR;
     
    794794}
    795795
    796 static Rappture::CmdSpec flowBoxOps[] = {
     796static CmdSpec flowBoxOps[] = {
    797797    {"add",        1, FlowBoxAddOp,        4, 0, "name ?switches?",},
    798798    {"configure",  1, FlowBoxConfigureOp,  4, 0, "name ?switches?",},
     
    816816{
    817817    Tcl_ObjCmdProc *proc;
    818     proc = Rappture::GetOpFromObj(interp, nFlowBoxOps, flowBoxOps,
    819                                   Rappture::CMDSPEC_ARG2, objc, objv, 0);
     818    proc = GetOpFromObj(interp, nFlowBoxOps, flowBoxOps,
     819                        CMDSPEC_ARG2, objc, objv, 0);
    820820    if (proc == NULL) {
    821821        return TCL_ERROR;
     
    866866}
    867867
    868 static Rappture::CmdSpec flowInstOps[] = {
     868static CmdSpec flowInstOps[] = {
    869869    {"box",         1, FlowBoxOp,        2, 0, "oper ?args?"},
    870870    {"configure",   1, FlowConfigureOp,  2, 0, "?switches?"},
     
    888888{
    889889    Tcl_ObjCmdProc *proc;
    890     proc = Rappture::GetOpFromObj(interp, nFlowInstOps, flowInstOps,
    891                                   Rappture::CMDSPEC_ARG1, objc, objv, 0);
     890    proc = GetOpFromObj(interp, nFlowInstOps, flowInstOps,
     891                        CMDSPEC_ARG1, objc, objv, 0);
    892892    if (proc == NULL) {
    893893        return TCL_ERROR;
     
    10911091};
    10921092
    1093 static Rappture::SwitchParseProc VideoFormatSwitchProc;
    1094 static Rappture::SwitchCustom videoFormatSwitch = {
     1093static SwitchParseProc VideoFormatSwitchProc;
     1094static SwitchCustom videoFormatSwitch = {
    10951095    VideoFormatSwitchProc, NULL, 0,
    10961096};
    10971097
    1098 static Rappture::SwitchSpec flowVideoSwitches[] = {
    1099     {Rappture::SWITCH_INT, "-bitrate", "value",
     1098static SwitchSpec flowVideoSwitches[] = {
     1099    {SWITCH_INT, "-bitrate", "value",
    11001100     offsetof(FlowVideoSwitches, bitRate), 0},
    1101     {Rappture::SWITCH_CUSTOM, "-format", "string",
     1101    {SWITCH_CUSTOM, "-format", "string",
    11021102     offsetof(FlowVideoSwitches, formatObjPtr), 0, 0, &videoFormatSwitch},
    1103     {Rappture::SWITCH_FLOAT, "-framerate", "value",
     1103    {SWITCH_FLOAT, "-framerate", "value",
    11041104     offsetof(FlowVideoSwitches, frameRate), 0},
    1105     {Rappture::SWITCH_INT, "-height", "integer",
     1105    {SWITCH_INT, "-height", "integer",
    11061106     offsetof(FlowVideoSwitches, height), 0},
    1107     {Rappture::SWITCH_INT, "-numframes", "count",
     1107    {SWITCH_INT, "-numframes", "count",
    11081108     offsetof(FlowVideoSwitches, numFrames), 0},
    1109     {Rappture::SWITCH_INT, "-width", "integer",
     1109    {SWITCH_INT, "-width", "integer",
    11101110     offsetof(FlowVideoSwitches, width), 0},
    1111     {Rappture::SWITCH_END}
     1111    {SWITCH_END}
    11121112};
    11131113
     
    12471247    switches.formatObjPtr = Tcl_NewStringObj("mpeg1video", 10);
    12481248    Tcl_IncrRefCount(switches.formatObjPtr);
    1249     if (Rappture::ParseSwitches(interp, flowVideoSwitches,
     1249    if (ParseSwitches(interp, flowVideoSwitches,
    12501250                objc - 3, objv + 3, &switches, SWITCH_DEFAULTS) < 0) {
    12511251        return TCL_ERROR;
     
    12991299    tmpFileName[length] = '\0';
    13001300    rmdir(tmpFileName);
    1301     Rappture::FreeSwitches(flowVideoSwitches, &switches, 0);
     1301    FreeSwitches(flowVideoSwitches, &switches, 0);
    13021302    return result;
    13031303}
     
    13141314#endif /* HAVE_FFMPEG */
    13151315
    1316 static Rappture::CmdSpec flowCmdOps[] = {
     1316static CmdSpec flowCmdOps[] = {
    13171317    {"add",      1, FlowAddOp,     3, 0, "name ?option value...?",},
    13181318    {"delete",   1, FlowDeleteOp,  3, 0, "name ?name...?",},
     
    13321332    Tcl_ObjCmdProc *proc;
    13331333
    1334     proc = Rappture::GetOpFromObj(interp, nFlowCmdOps, flowCmdOps,
    1335                                   Rappture::CMDSPEC_ARG1, objc, objv, 0);
     1334    proc = GetOpFromObj(interp, nFlowCmdOps, flowCmdOps,
     1335                        CMDSPEC_ARG1, objc, objv, 0);
    13361336    if (proc == NULL) {
    13371337        return TCL_ERROR;
  • trunk/packages/vizservers/nanovis/FlowParticles.cpp

    r3631 r4056  
    4141    }
    4242    TRACE("Freeing switches");
    43     Rappture::FreeSwitches(_switches, &_sv, 0);
     43    FreeSwitches(_switches, &_sv, 0);
    4444}
    4545
  • trunk/packages/vizservers/nanovis/FlowParticles.h

    r3630 r4056  
    5252    int parseSwitches(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
    5353    {
    54         if (Rappture::ParseSwitches(interp, _switches, objc, objv, &_sv,
    55                                     SWITCH_DEFAULTS) < 0) {
     54        if (nv::ParseSwitches(interp, _switches, objc, objv, &_sv,
     55                              SWITCH_DEFAULTS) < 0) {
    5656            return TCL_ERROR;
    5757        }
     
    9797    FlowParticlesValues _sv;
    9898
    99     static Rappture::SwitchSpec _switches[];
     99    static SwitchSpec _switches[];
    100100};
    101101
  • trunk/packages/vizservers/nanovis/Switch.cpp

    r3362 r4056  
    3636#include "Switch.h"
    3737
    38 namespace Rappture {
     38namespace nv {
    3939
    4040static void
  • trunk/packages/vizservers/nanovis/Switch.h

    r3613 r4056  
    2828 */
    2929
    30 #ifndef RAPPTURE_SWITCH_H
    31 #define RAPPTURE_SWITCH_H
     30#ifndef NV_SWITCH_H
     31#define NV_SWITCH_H
    3232
    3333#ifdef HAVE_STDDEF_H
     
    3535#endif /* HAVE_STDDEF_H */
    3636
    37 namespace Rappture {
     37namespace nv {
    3838
    3939typedef int (SwitchParseProc)(ClientData clientData, Tcl_Interp *interp,
  • trunk/packages/vizservers/nanovis/Unirect.cpp

    r3935 r4056  
    4242
    4343int
    44 Rappture::Unirect2d::parseBuffer(Tcl_Interp *interp, Rappture::Buffer &buf)
     44nv::Unirect2d::parseBuffer(Tcl_Interp *interp, Rappture::Buffer &buf)
    4545{
    4646    Tcl_Obj *objPtr = Tcl_NewStringObj(buf.bytes(), buf.size());
     
    5959
    6060int
    61 Rappture::Unirect3d::parseBuffer(Tcl_Interp *interp, Rappture::Buffer &buf)
     61nv::Unirect3d::parseBuffer(Tcl_Interp *interp, Rappture::Buffer &buf)
    6262{
    6363    Tcl_Obj *objPtr;
     
    7878
    7979int
    80 Rappture::Unirect3d::loadData(Tcl_Interp *interp, int objc,
    81                               Tcl_Obj *const *objv)
     80nv::Unirect3d::loadData(Tcl_Interp *interp, int objc,
     81                        Tcl_Obj *const *objv)
    8282{
    8383    int num[3], nValues;
     
    312312
    313313int
    314 Rappture::Unirect2d::loadData(Tcl_Interp *interp, int objc,
    315                               Tcl_Obj *const *objv)
     314nv::Unirect2d::loadData(Tcl_Interp *interp, int objc,
     315                        Tcl_Obj *const *objv)
    316316{
    317317    if ((objc & 0x01) == 0) {
     
    487487
    488488bool
    489 Rappture::Unirect3d::importDx(Rappture::Outcome &result, size_t nComponents,
    490                               size_t length, char *string)
     489nv::Unirect3d::importDx(Rappture::Outcome &result, size_t nComponents,
     490                        size_t length, char *string)
    491491{
    492492    int nx, ny, nz, npts;
     
    632632
    633633void
    634 Rappture::Unirect3d::getVectorRange()
     634nv::Unirect3d::getVectorRange()
    635635{
    636636    assert(_nComponents == 3);
     
    656656
    657657bool
    658 Rappture::Unirect3d::convert(Rappture::Unirect2d *dataPtr)
     658nv::Unirect3d::convert(nv::Unirect2d *dataPtr)
    659659{
    660660    _initialized = false;
  • trunk/packages/vizservers/nanovis/Unirect.h

    r3935 r4056  
    55 * Author: George A. Howlett <gah@purdue.edu>
    66 */
    7 #ifndef RAPPTURE_UNIRECT_H
    8 #define RAPPTURE_UNIRECT_H
     7#ifndef NV_UNIRECT_H
     8#define NV_UNIRECT_H
    99
    1010#include <float.h>
     
    1818#include "Trace.h"
    1919
    20 namespace Rappture {
     20namespace nv {
    2121
    2222class Unirect2d;
Note: See TracChangeset for help on using the changeset viewer.