source: nanovis/tags/1.2.4/Command.h @ 5724

Last change on this file since 5724 was 5603, checked in by ldelgass, 9 years ago

move old processCommands to Command.cpp

  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
4 *
5 * Authors:
6 *   Wei Qiao <qiaow@purdue.edu>
7 *   Insoo Woo <iwoo@purdue.edu>
8 *   George A. Howlett <gah@purdue.edu>
9 *   Leif Delgass <ldelgass@purdue.edu>
10 */
11#ifndef NV_COMMAND_H
12#define NV_COMMAND_H
13
14#include <unistd.h>
15
16#include <tcl.h>
17
18#include "ResponseQueue.h"
19
20namespace Rappture {
21class Buffer;
22}
23
24namespace nv {
25
26class ReadBuffer;
27class Volume;
28
29#ifdef USE_THREADS
30extern void queueResponse(const void *bytes, size_t len,
31                          Response::AllocationType allocType,
32                          Response::ResponseType type = Response::DATA);
33#else
34extern ssize_t SocketWrite(const void *bytes, size_t len);
35#endif
36
37extern bool SocketRead(char *bytes, size_t len);
38
39#if !defined(USE_NEW_EVENT_LOOP) && !defined(USE_THREADS)
40extern int processCommands(Tcl_Interp *interp,
41                           FILE *inBufPtr,
42                           int fdOut);
43#endif
44extern int processCommands(Tcl_Interp *interp,
45                           ReadBuffer *inBufPtr,
46                           int fdOut);
47
48extern int handleError(Tcl_Interp *interp,
49                       int status,
50                       int fdOut);
51
52extern void initTcl(Tcl_Interp *interp, ClientData clientData);
53
54extern int GetAxisFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
55                          int *axisVal);
56
57extern int GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
58                             bool *boolVal);
59
60extern int GetDataStream(Tcl_Interp *interp, Rappture::Buffer &buf, int nBytes);
61
62extern int GetFloatFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
63                           float *floatVal);
64
65}
66
67#endif
Note: See TracBrowser for help on using the repository browser.