Last change
on this file since 6369 was
4893,
checked in by ldelgass, 10 years ago
|
merge r4056 from trunk
|
-
Property svn:eol-style set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
2 | /* |
---|
3 | * Copyright (c) 2004-2013 HUBzero Foundation, LLC |
---|
4 | * |
---|
5 | */ |
---|
6 | #ifndef NV_CMDPROC_H |
---|
7 | #define NV_CMDPROC_H |
---|
8 | |
---|
9 | namespace nv { |
---|
10 | |
---|
11 | /** |
---|
12 | * Structure to specify a set of operations for a Tcl command. |
---|
13 | * This is passed to the Blt_GetOp procedure to look |
---|
14 | * for a function pointer associated with the operation name. |
---|
15 | */ |
---|
16 | typedef struct { |
---|
17 | const char *name; /**< Name of operation */ |
---|
18 | int minChars; /**< Minimum # characters to disambiguate */ |
---|
19 | Tcl_ObjCmdProc *proc; |
---|
20 | int minArgs; /**< Minimum # args required */ |
---|
21 | int maxArgs; /**< Maximum # args required */ |
---|
22 | const char *usage; /**< Usage message */ |
---|
23 | } CmdSpec; |
---|
24 | |
---|
25 | typedef enum { |
---|
26 | CMDSPEC_ARG0, /**< Op is the first argument. */ |
---|
27 | CMDSPEC_ARG1, /**< Op is the second argument. */ |
---|
28 | CMDSPEC_ARG2, /**< Op is the third argument. */ |
---|
29 | CMDSPEC_ARG3, /**< Op is the fourth argument. */ |
---|
30 | CMDSPEC_ARG4 /**< Op is the fifth argument. */ |
---|
31 | } CmdSpecIndex; |
---|
32 | |
---|
33 | #define CMDSPEC_LINEAR_SEARCH 1 |
---|
34 | #define CMDSPEC_BINARY_SEARCH 0 |
---|
35 | |
---|
36 | extern Tcl_ObjCmdProc * |
---|
37 | GetOpFromObj(Tcl_Interp *interp, int nSpecs, |
---|
38 | CmdSpec *specs, int operPos, int objc, Tcl_Obj *const *objv, int flags); |
---|
39 | |
---|
40 | #define NumCmdSpecs(s) (sizeof(s) / sizeof(nv::CmdSpec)) |
---|
41 | |
---|
42 | } |
---|
43 | |
---|
44 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.