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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.