00001 /****************************************************************************** 00002 * 00003 * \file mi32/sml.h 00004 * \brief SML -- Spatial Manipulation Language 00005 * 00006 * SML is used in TNTmips for both a scripting language and for database 00007 * query operations. 00008 * 00009 * \if NODOC 00010 * $Log: sml.h_v $ 00011 * Revision 1.411 2004/02/10 18:49:07 dwilliss 00012 * Added a new callback reason 00013 * 00014 * Revision 1.410 2004/01/09 18:54:21 msmith 00015 * added sig 00016 * 00017 * Revision 1.409 2003/12/19 23:49:10 dwilliss 00018 * Deprecate some old methods 00019 * 00020 * Revision 1.408 2003/12/16 18:05:43 dwilliss 00021 * Added new autoclass for classes which have destructors but no default 00022 * constructor or copy constructor 00023 * 00024 * Revision 1.407 2003/12/11 17:59:17 dwilliss 00025 * New proto 00026 * 00027 * Revision 1.406 2003/11/26 18:46:24 msmith 00028 * added a defsig 00029 * 00030 * Revision 1.405 2003/11/26 17:53:45 dwilliss 00031 * DrawOptimizedLabels now takes an ELEMTYPE parameter 00032 * 00033 * Revision 1.404 2003/11/26 16:24:57 dwilliss 00034 * Changed some private members from int to ELEMTYPE 00035 * Added a version of CallFunction that takes an ELEMTYPE as well as elemnum 00036 * 00037 * Revision 1.403 2003/11/17 18:07:05 dwilliss 00038 * nc 00039 * 00040 * Revision 1.402 2003/11/04 18:44:50 dwilliss 00041 * *** empty log message *** 00042 * 00043 * Revision 1.401 2003/10/24 19:36:02 dwilliss 00044 * Added methods to objects to get RVC Interface class instance 00045 * 00046 * Revision 1.400 2003/10/20 16:45:18 dwilliss 00047 * Put back some methods that I had retired too early. 00048 * Turns out they were deprecated but I hadn't hidden the prototype outside 00049 * the DLL so old code still called them 00050 * 00051 * Revision 1.399 2003/10/20 15:43:47 dwilliss 00052 * Deprecated some methods 00053 * Moved some private prototypes to mi32p/dbqueryp.h 00054 * 00055 * Revision 1.398 2003/10/16 17:12:28 dwilliss 00056 * Deprecated some SMLSTRING methods. 00057 * StringAlloc no longer needs a length. 00058 * 00059 * Revision 1.397 2003/10/15 22:53:13 dwilliss 00060 * Added methods to SMLTMPSTR to eliminate need for operator overloads on 00061 * casting to (char*) and (UNICODE*) 00062 * 00063 * Revision 1.396 2003/10/15 22:43:22 dwilliss 00064 * SMLSTRING now derived from MISTRING 00065 * Simplifies things a LOT! 00066 * 00067 * Revision 1.395 2003/10/08 22:07:12 dwilliss 00068 * Added Get/SetFilePath to SMLOBJECT. Deprecated the Get/SetFilename methods 00069 * 00070 * Revision 1.394 2003/09/30 16:25:48 dwilliss 00071 * Doxygen fix 00072 * 00073 * Revision 1.393 2003/09/23 14:13:18 dwilliss 00074 * made SMLCONTEXT a friend of SMLELEMDATA to stop a gcc warning 00075 * 00076 * Revision 1.392 2003/09/15 13:49:56 fileserver!dwilliss 00077 * Doxygen 00078 * 00079 * Revision 1.391 2003/09/10 22:39:45 dwilliss 00080 * General cleanup 00081 * 00082 * Revision 1.390 2003/09/09 21:15:38 dwilliss 00083 * SMLSTRING had some inline methods which is BAD when exported from a DLL 00084 * 00085 * Revision 1.389 2003/09/05 17:07:50 mju 00086 * Add SMLSTRING::GetSTRUTF8 method. 00087 * 00088 * Revision 1.388 2003/08/28 22:25:04 dwilliss 00089 * Added versions of some methods that should have been taking const pointers 00090 * 00091 * Revision 1.387 2003/08/27 14:24:20 dwilliss 00092 * Added CurrentFuncitonIsClassMethod() 00093 * 00094 * Revision 1.386 2003/08/26 20:57:53 dwilliss 00095 * Added SMLCLASSNAME for viewable 00096 * 00097 * Revision 1.385 2003/08/19 17:52:13 dwilliss 00098 * Allow for name aliases 00099 * 00100 * Revision 1.384 2003/08/18 19:48:30 dwilliss 00101 * Added support for name aliases 00102 * 00103 * Revision 1.383 2003/08/12 17:58:24 dwilliss 00104 * Added a version of GetLastError that doesn't take any string. We let the 00105 * normal error handling mechanism take care of it for us now 00106 * 00107 * Revision 1.382 2003/08/06 22:16:22 dwilliss 00108 * Changed LoadPlugins/UnloadPlugins to exist on all platforms, even if they 00109 * do nothing. Keep track of plugins in a simple array now 00110 * 00111 * Revision 1.381 2003/08/04 19:48:11 dwilliss 00112 * *** empty log message *** 00113 * 00114 * Revision 1.380 2003/08/04 17:03:37 dwilliss 00115 * Another method needed for debugging 00116 * 00117 * Revision 1.379 2003/08/04 16:28:28 dwilliss 00118 * Some methods needed for the SML Debugger 00119 * 00120 * Revision 1.378 2003/07/23 20:47:29 dwilliss 00121 * Added SMLCLASSMEMBER::TYPE_Enum 00122 * 00123 * Revision 1.377 2003/07/17 22:12:24 dwilliss 00124 * *** empty log message *** 00125 * 00126 * Revision 1.376 2003/07/17 15:40:04 dwilliss 00127 * Get rid of ElemList from SMLOBJECT. Nothing seemed to use it and it's 00128 * going to be replaced soon anyway 00129 * 00130 * Revision 1.375 2003/07/17 15:13:02 dwilliss 00131 * *** empty log message *** 00132 * 00133 * Revision 1.374 2003/07/17 14:05:51 dwilliss 00134 * Added a proto. Fixed the debug class 00135 * 00136 * Revision 1.373 2003/06/30 21:02:55 dwilliss 00137 * const change in private function 00138 * 00139 * Revision 1.372 2003/06/25 15:29:33 dwilliss 00140 * Added MISTRING versions of List and ListLine 00141 * 00142 * Revision 1.371 2003/06/14 02:10:21 scowan 00143 * Changed use of dregion to a trans2d mapgen. 00144 * 00145 * Revision 1.370 2003/06/03 17:08:27 dwilliss 00146 * Added an AddMethodOldCB. 00147 * 00148 * Revision 1.369 2003/06/02 20:08:44 dwilliss 00149 * Added stuff for OLE 00150 * 00151 * Revision 1.368 2003/05/30 17:09:07 dwilliss 00152 * OLE additions (private) 00153 * 00154 * Revision 1.367 2003/05/09 20:19:40 dwilliss 00155 * Added private class and methods to context 00156 * 00157 * Revision 1.366 2003/05/06 21:25:57 dwilliss 00158 * Added a CreateHisto method to SMLRASTEROBJECT 00159 * 00160 * Revision 1.365 2003/05/01 16:25:02 dwilliss 00161 * Added changes from tnt68 version back into DV. 00162 * 00163 * Revision 1.364 2003/04/23 21:59:07 mju 00164 * Remove some obsolete "main" funcs. 00165 * Add default flags for one Main func and elimate 'Ext' version. 00166 * 00167 * Revision 1.363 2003/03/06 17:05:37 dwilliss 00168 * Gave SMLELEMDATA some private methods 00169 * 00170 * Revision 1.362 2003/03/06 16:33:32 dwilliss 00171 * Added a couple bools to SMLELEMDATA to keep track of undo state 00172 * 00173 * Revision 1.361 2003/02/28 16:46:24 dwilliss 00174 * Deprecated a bunch of non-const methods. 00175 * Made a version of SetArgError that takes a non-const string, deprecated 00176 * the old one. 00177 * 00178 * Revision 1.360 2003/02/20 17:10:05 dwilliss 00179 * Added private members to context for parsing 00180 * 00181 * Revision 1.359 2003/02/19 21:40:20 dwilliss 00182 * Added a new private method to context 00183 * 00184 * Revision 1.358 2003/01/20 16:46:57 dwilliss 00185 * Can't use _T for template argument because MFC #defines it to char* 00186 * Thank-you Microsoft! 00187 * 00188 * Revision 1.357 2003/01/15 23:20:19 dwilliss 00189 * mostly comment changes 00190 * 00191 * Revision 1.356 2003/01/15 17:14:29 dwilliss 00192 * Added SMLAUTOCLASS_NEW_NOCOPY_T 00193 * 00194 * Revision 1.355 2002/12/09 17:14:10 scowan 00195 * Changed init from db handle method and added member to sml elem data. 00196 * 00197 * Revision 1.352 2002/12/02 18:07:53 dwilliss 00198 * Put it back. Just reverse two parameters to avoid ambiguious overload 00199 * 00200 * Revision 1.351 2002/12/02 17:54:54 dwilliss 00201 * Ifdef'd out one of the SMLFUNCDEF constructors. Seems to be confusing 00202 * VC6.0 00203 * 00204 * Revision 1.350 2002/11/27 23:27:26 dwilliss 00205 * Added an SMLFUNCDEF structure which provided constructors for SMLFUNC in a 00206 * type-safe way. 00207 * Deprecated the old inline methods that tried to do the same thing because 00208 * gcc 3.1 chokes on them. 00209 * 00210 * Revision 1.349 2002/11/27 22:01:06 dwilliss 00211 * Added experimental SMLFUNCVOID to provide better way to define these things 00212 * in a type-safe way. 00213 * 00214 * Revision 1.348 2002/11/20 17:24:26 dwilliss 00215 * Added SetStrictSyntax method 00216 * 00217 * Revision 1.347 2002/11/20 17:17:25 dwilliss 00218 * Added method for adding parser warnings 00219 * 00220 * Revision 1.346 2002/11/13 17:11:36 dwilliss 00221 * SMLELEMDATA now has constructor/destructor 00222 * 00223 * Revision 1.345 2002/10/08 16:43:46 dwilliss 00224 * Deprecated a couple methods that took non-const strings 00225 * 00226 * Revision 1.343 2002/10/01 16:39:34 dwilliss 00227 * Defined a new flag for SMLCONTEXT::Run() 00228 * 00229 * Revision 1.341 2002/09/10 20:47:11 dwilliss 00230 * Decided not to deprecate a macro yet. 00231 * 00232 * Revision 1.340 2002/09/10 20:45:15 dwilliss 00233 * SMLFUNCDEF macros no longer fill in description. 00234 * 00235 * Revision 1.339 2002/09/10 17:56:00 dwilliss 00236 * Oops. Tried to prototype an overload of a function with C linkage 00237 * 00238 * Revision 1.338 2002/09/10 17:51:24 dwilliss 00239 * Clean up after deprecated stuff fixed. Some stuff that was deprecated 00240 * before can just go away now 00241 * 00242 * Revision 1.337 2002/09/09 17:08:28 mju 00243 * Remove deprecated #defines and inlines. 00244 * Retire exported fns/methods with comment as to when can remove. 00245 * 00246 * Revision 1.336 2002/09/09 15:51:39 mju 00247 * Remove previously retired seterrorcode fns/method. 00248 * 00249 * Revision 1.335 2002/09/06 21:52:55 dwilliss 00250 * Added Open/CloseDatabase methods to SMLELEMDATA. Deprecated 00251 * SMLELEMDATA::SetHandle(), as it has been deemed "evil" 00252 * 00253 * Revision 1.334 2002/09/03 22:38:22 dwilliss 00254 * Deprecate stuff 00255 * 00256 * Revision 1.333 2002/08/28 22:44:00 dwilliss 00257 * Added some methods to get/set segment node 00258 * 00259 * Revision 1.332 2002/08/19 15:13:35 dwilliss 00260 * Got rid of some new warnings generated by gcc 3.1 00261 * 00262 * Revision 1.331 2002/08/16 21:04:35 dwilliss 00263 * Added XML document hooks to context 00264 * 00265 * Revision 1.330 2002/07/30 19:04:55 dwilliss 00266 * Use 0 instead of NULL for default parm 00267 * 00268 * Revision 1.329 2002/07/16 19:26:46 dwilliss 00269 * Added a GetFuncGroup method to SMLFUNC 00270 * 00271 * Revision 1.328 2002/06/07 21:28:14 dwilliss 00272 * Changed a private function to take const FIELPATH insteadh of UNICODE* 00273 * 00274 * Revision 1.327 2002/06/05 21:10:49 dwilliss 00275 * Added GetFieldType method to SMLSYMBOL' 00276 * 00277 * Revision 1.326 2002/06/03 16:20:55 dwilliss 00278 * Added SIG value for void function taking 4 doubles 00279 * 00280 * Revision 1.325 2002/05/16 16:15:39 dwilliss 00281 * force SMLSYMBOL members to be private for tonights build so I can make 00282 * sure I didn't miss anybody using them illegally. 00283 * 00284 * Revision 1.324 2002/05/16 16:08:33 dwilliss 00285 * Oops. left SMLSYMBOL members private. 00286 * Now only private if compiling for no deprecated (and not for rvcsys) 00287 * 00288 * Revision 1.323 2002/05/16 15:59:47 dwilliss 00289 * Added a few more methods to access stuff in SMLSYMBOL 00290 * 00291 * Revision 1.322 2002/05/16 14:20:07 dwilliss 00292 * Deprecate the old GetValue 00293 * 00294 * Revision 1.321 2002/05/16 14:12:26 dwilliss 00295 * Get rid of default value on one method. Causes ambiguious function 00296 * because we just added a new function taking just an MISTRING and returning 00297 * bool instead of void 00298 * 00299 * Revision 1.320 2002/05/16 14:02:13 dwilliss 00300 * Added two new GetValue methods to SMLSYMBOL 00301 * 00302 * Revision 1.319 2002/05/15 22:57:18 dwilliss 00303 * Deprecated FastSymbol inlines 00304 * Added some SMLSYMBOL method to access members that were previously being 00305 * accessed directly. Plan to make all members private as of 6.7 00306 * 00307 * Revision 1.318 2002/04/26 22:20:52 dwilliss 00308 * DBQuery_LineStyleSetPoints() should take const pointer 00309 * 00310 * Revision 1.317 2002/04/19 14:20:10 dwilliss 00311 * Fixed compiler warning about function pointer typedef 00312 * 00313 * Revision 1.316 2002/04/16 19:12:47 dwilliss 00314 * Mac compile error 00315 * 00316 * Revision 1.315 2002/04/16 17:29:45 mju 00317 * Parms changed to query_setupdraw. 00318 * 00319 * Revision 1.312 2002/04/05 17:42:53 dwilliss 00320 * Clean up error handling. Eliminate use of varargs SetErrCode 00321 * 00322 * Revision 1.311 2002/04/05 15:04:10 mju 00323 * Deprecate SetErrorCodeC. 00324 * 00325 * Revision 1.307 2002/03/28 22:28:08 dwilliss 00326 * Gave SMLCLASSMEMBER a TYPE enum so I could define a new one 00327 * 00328 * Revision 1.306 2002/03/26 21:44:29 dwilliss 00329 * SMLSTRING.SetString() now takes const pointers. non-const versions still 00330 * defined but prototype only available in rvcsys.dll 00331 * 00332 * Revision 1.303 2002/03/25 20:17:13 dwilliss 00333 * SMLAUTOCLASS now has AddMethodOld() for functions returning strings 00334 * SMLAUTOCLASS now has AddMember() 00335 * 00336 * Revision 1.302 2002/03/01 18:45:39 dwilliss 00337 * GeorefAlloc and Copy now have flags to allow allocation in temp heap 00338 * 00339 * Revision 1.301 2002/02/25 21:09:40 dwilliss 00340 * Added a PrevTableSym member to context 00341 * 00342 * Revision 1.300 2002/02/19 17:07:05 dwilliss 00343 * Internal print buffer is now MISTRING 00344 * 00345 * Revision 1.299 2002/02/12 18:19:31 dwilliss 00346 * context now keeps track of what things its warned about so as to not repeat 00347 * itself. 00348 * 00349 * Revision 1.298 2002/01/30 17:22:04 dwilliss 00350 * Added StrictSyntax member to context 00351 * 00352 * Revision 1.297 2001/12/28 18:10:39 dwilliss 00353 * A few new DOCCODE methods 00354 * 00355 * Revision 1.296 2001/12/27 17:14:56 dwilliss 00356 * Now has real constructor/destructor. Still private though. You have 00357 * to use functions to allocate an SMLCONTEXT, and use the Destroy() method 00358 * to delete it. 00359 * 00360 * Revision 1.294 2001/12/26 22:58:53 dwilliss 00361 * Mike and I changed our minds on the DEPRICATED thing. It's now a constant 00362 * to say when the feature will be RETIRED. If it's set, it's considered 00363 * to be deprecated now 00364 * 00365 * Revision 1.293 2001/12/26 22:35:35 dwilliss 00366 * Ok, so I spelled DEPRECATED wrong. That's what spell check is for! 00367 * 00368 * Revision 1.292 2001/12/26 22:31:35 dwilliss 00369 * Defined an SML_DEPRICATED constant 00370 * 00371 * Revision 1.291 2001/12/21 00:02:20 dwilliss 00372 * added funcgroup to SMLFUNC 00373 * 00374 * Revision 1.290 2001/12/19 21:37:21 dwilliss 00375 * AutoClass stuff works now 00376 * 00377 * Revision 1.289 2001/12/19 15:12:58 dwilliss 00378 * Got rid of typedef that gcc didn't like. Wasn't using it any way 00379 * 00380 * Revision 1.288 2001/12/18 21:01:31 dwilliss 00381 * More AutoClass changes 00382 * 00383 * Revision 1.287 2001/12/17 15:28:17 dwilliss 00384 * SMLAUTOCLASS setup function doesn't need to take an SMLCONTEXT 00385 * 00386 * Revision 1.286 2001/12/14 22:43:02 dwilliss 00387 * Autoclass stuff more solidified 00388 * 00389 * Revision 1.285 2001/12/14 20:16:34 dwilliss 00390 * Added SMLAUTOCLASS 00391 * 00392 * Revision 1.282 2001/12/10 21:46:39 dwilliss 00393 * Major changes to documentation code 00394 * 00395 * Revision 1.281 2001/10/04 19:40:18 dwilliss 00396 * inline functions for defining function returning class was marking them 00397 * as classes, not as functions returning class. 00398 * 00399 * Revision 1.280 2001/10/04 17:30:20 dwilliss 00400 * Some new prototypes 00401 * 00402 * Revision 1.279 2001/09/19 22:27:58 dwilliss 00403 * Added prototype for MFC query editor 00404 * 00405 * Revision 1.278 2001/08/08 22:42:11 dwilliss 00406 * Added a protected member to SMLCONTEXT 00407 * 00408 * Revision 1.277 2001/07/06 15:44:29 mju 00409 * Add DEFINE_SMLCLASS_AUTO macro. 00410 * 00411 * Revision 1.276 2001/05/21 17:01:02 dwilliss 00412 * Change CopyConstructor 00413 * 00414 * Revision 1.275 2001/02/15 21:54:35 dwilliss 00415 * deprecate an old function 00416 * 00417 * Revision 1.274 2001/02/15 21:49:54 dwilliss 00418 * proto for DBQuery_EditMISTRING 00419 * 00420 * Revision 1.273 2001/02/01 17:58:20 dwilliss 00421 * Added new Func def macro for functions returning class which we have to 00422 * name differently than SML wants 00423 * Added encoding conversion to SMLFILE 00424 * 00425 * Revision 1.272 2001/01/25 23:04:18 dwilliss 00426 * Deprecate use of SMLSTRING constructor/destructor 00427 * 00428 * Revision 1.270 2001/01/18 16:58:56 dwilliss 00429 * Added MemPool methods to context 00430 * 00431 * Revision 1.269 2001/01/17 23:50:51 dwilliss 00432 * Clean up strings a bit 00433 * 00434 * Revision 1.268 2001/01/16 22:54:07 dwilliss 00435 * Change all bit-field things to bool values 00436 * 00437 * Revision 1.267 2001/01/16 18:53:31 dwilliss 00438 * Changed the way USERDATA is done so that it can be added to both 00439 * strings and symbols 00440 * 00441 * Revision 1.266 2000/12/13 17:48:19 dwilliss 00442 * Changed two spare bytes in SMLGEOSTRUCT to "Model" 00443 * 00444 * Revision 1.265 2000/11/22 22:23:13 dwilliss 00445 * Added format to GetValue() method that I just added last revision 00446 * 00447 * Revision 1.264 2000/11/22 22:12:10 dwilliss 00448 * Added GetValue method to SMLSYMBOL taking an MISTRING to fill int 00449 * 00450 * Revision 1.263 2000/10/31 16:50:50 mju 00451 * Add const versions of AddObjectSymbol. 00452 * 00453 * Revision 1.262 2000/10/26 16:01:28 mju 00454 * Add defaults for GetLastError. 00455 * 00456 * Revision 1.261 2000/10/13 16:35:14 dwilliss 00457 * changed a class back to struct 00458 * 00459 * Revision 1.260 2000/10/13 14:33:00 dwilliss 00460 * When delaring friends, must specify friend class NAME, not just friend NAME 00461 * 00462 * Revision 1.259 2000/09/13 15:03:08 dwilliss 00463 * I forgot, Macs don't export class methods the same way everybody else does. 00464 * Gotta do something special just for them. 00465 * 00466 * Revision 1.258 2000/09/12 21:16:43 dwilliss 00467 * new qflag 00468 * 00469 * Revision 1.257 2000/09/08 20:27:27 dwilliss 00470 * Defined new QFLAG 00471 * 00472 * Revision 1.256 2000/09/07 22:05:58 dwilliss 00473 * Added several new methods to SMLELEMDATA and SMLTABLE 00474 * 00475 * Revision 1.255 2000/08/31 15:04:43 mju 00476 * Add default for 'flags' in Parse() method. 00477 * 00478 * Revision 1.253 2000/08/29 20:10:33 dwilliss 00479 * Added case senssitive flag to context 00480 * 00481 * Revision 1.251 2000/08/11 20:17:49 mju 00482 * Add context::setsegment(). 00483 * 00484 * Revision 1.250 2000/07/17 17:42:30 mju 00485 * Add const-name versions of AddSymbol and AddClassSymbol. 00486 * 00487 * Revision 1.249 2000/06/21 17:25:32 dwilliss 00488 * Changed object list to keep track of own head/tail, prev/next rather than 00489 * using MLIST. MLIST assumes you can make the first element of the 00490 * structure a LINKEDLISTNODE, but if you have a vtable, you can't 00491 * 00492 * Revision 1.248 2000/06/13 20:59:38 dwilliss 00493 * Added USERDATA to SMLSTRING 00494 * 00495 * Revision 1.247 2000/06/09 14:21:30 mju 00496 * Add context::parse() method using const string. 00497 * 00498 * Revision 1.246 2000/06/05 14:09:06 mju 00499 * Add SMLSYMBOL::SetValue methods using const strings. 00500 * 00501 * Revision 1.245 2000/06/05 13:50:47 mju 00502 * Remove evil inclusion order dependencies. 00503 * Add SML_EditScript() inline. 00504 * 00505 * Revision 1.244 2000/05/26 19:26:09 mju 00506 * Add SML_ReadScript() using MISTRING. 00507 * 00508 * Revision 1.242 2000/05/26 15:19:48 dwilliss 00509 * Added SMLCONTEXT::CallbackAddGlobal() and reasons 00510 * 00511 * Revision 1.241 2000/05/24 22:11:21 mju 00512 * Add inlines/macros for defining various types of functions. 00513 * Change DEFINE_SMLCLASS_SIMPLE to take classname. 00514 * Remove ...FUNCDEFEXT and adjust other macros accordingly. 00515 * Add SMLCLASSWriteTableObj prototype. 00516 * 00517 * Revision 1.240 2000/05/19 22:18:40 mju 00518 * Add SMLCLASSNAME #defines. 00519 * 00520 * Revision 1.239 2000/05/17 22:27:26 dwilliss 00521 * More doc issues 00522 * 00523 * Revision 1.238 2000/05/17 17:37:02 dwilliss 00524 * More documentation 00525 * 00526 * Revision 1.237 2000/05/17 15:59:59 dwilliss 00527 * More documentation updates. 00528 * Added StringAlloc methods to SMLCONTEXT so that SMLSTRING's constructors 00529 * can become private (some day) 00530 * SMLTABLEDATA now has some exported methods (data still opaque) 00531 * 00532 * Revision 1.236 2000/05/17 14:44:08 mju 00533 * In _SML_ReadScript use const for filename. 00534 * Add SML_ReadScript() inline overload that uses FILEPATH and rearranges parms to allow most to have defaults. 00535 * Add default for element parm in CONTEXT::CallFunction(). 00536 * 00537 * Revision 1.235 2000/05/16 20:33:04 dwilliss 00538 * Added ReadElement method to CAD 00539 * 00540 * Revision 1.234 2000/05/12 19:59:45 dwilliss 00541 * Fixed ignore/End comments 00542 * 00543 * Revision 1.231 2000/04/28 21:42:27 dwilliss 00544 * More documentation 00545 * 00546 * Revision 1.230 2000/04/28 20:37:47 dwilliss 00547 * Put extern "C" around some prototypes that I had moved 00548 * 00549 * Revision 1.229 2000/04/28 17:49:23 dwilliss 00550 * Massive changes that were waiting until after 6.3 went out the door 00551 * 00552 * Revision 1.227 2000/03/07 20:41:23 dwilliss 00553 * More methods on context 00554 * 00555 * Revision 1.226 2000/03/01 20:32:15 dwilliss 00556 * Added GeorefCopy() method to context 00557 * 00558 * Revision 1.225 2000/02/25 20:50:15 dwilliss 00559 * Oops. Added IsDirty method to the wrong class. 00560 * 00561 * Revision 1.224 2000/02/25 20:46:24 dwilliss 00562 * Added IsDirty to SMLOBJECT 00563 * 00564 * Revision 1.222 1999/12/08 23:26:00 mju 00565 * Add macros for creating C++ class definitions. 00566 * 00567 * Revision 1.221 1999/12/06 17:27:01 mju 00568 * Use const filename. 00569 * 00570 * Revision 1.220 1999/11/22 17:48:29 scowan 00571 * More const. 00572 * 00573 * Revision 1.219 1999/11/19 23:20:03 dwilliss 00574 * More comments for documentation. 00575 * Made some members of classes const pointers 00576 * 00577 * Revision 1.214 1999/11/18 16:41:26 dwilliss 00578 * Added constptr member to SMLARG 00579 * 00580 * Revision 1.209 1999/10/13 17:49:09 dwilliss 00581 * All members of SMLOBJECT and SMLELEMDATA are private outside of rvcapp.dll 00582 * now. Must use methods to access them. (Post 6.2 release) 00583 * 00584 * Revision 1.208 1999/10/08 22:03:58 dwilson 00585 * make info a struct in SMLOBJECT 00586 * 00587 * Revision 1.203 1999/09/17 17:15:59 dwilliss 00588 * Added AddClassSymbol() 00589 * 00590 * Revision 1.202 1999/09/17 15:35:20 dwilliss 00591 * Added prototypes for plugin init/stop functions 00592 * 00593 * Revision 1.196 1999/09/03 22:21:30 dwilliss 00594 * Protos for two flavors of SetParentWidget 00595 * 00596 * Revision 1.195 1999/09/03 22:01:42 dwilliss 00597 * Took out inline method in SMLCONTEXT. Evil! 00598 * 00599 * Revision 1.194 1999/09/03 21:12:28 dwilliss 00600 * More methods on SMLCONTEXT 00601 * 00602 * Revision 1.193 1999/09/02 20:53:53 dwilliss 00603 * Added a bunch of methods to SMLCONTEXT to access members which 00604 * should be private. (Eventually they will be) 00605 * 00606 * Revision 1.190 1999/07/07 22:50:39 dwilliss 00607 * Added some things to a few of the structures 00608 * 00609 * Revision 1.189 1999/06/28 20:52:25 dwilliss 00610 * Added preprocessor stack 00611 * 00612 * Revision 1.188 1999/06/25 13:56:01 dwilliss 00613 * Got rid of a prototype that should never have been there 00614 * 00615 * Revision 1.187 1999/06/22 16:25:17 dwilson 00616 * Added Desc arg to SMLFUNCDEF2 00617 * 00618 * Revision 1.185 1999/06/18 21:11:30 dwilliss 00619 * Can't make SetString inline if the class is exported from a DLL 00620 * 00621 * Revision 1.184 1999/06/18 19:55:08 dwilliss 00622 * Oops. semicolon in wrong place 00623 * 00624 * Revision 1.183 1999/06/18 19:48:04 dwilliss 00625 * addes SetString methods to SMLSTRING 00626 * 00627 * Revision 1.182 1999/06/11 15:53:55 dwilliss 00628 * Added some more macros for class/function defn's 00629 * 00630 * Revision 1.181 1999/06/09 16:10:11 mju 00631 * Use WIN32 instead of WIn95. 00632 * 00633 * Revision 1.180 1999/05/27 15:15:15 mju 00634 * Include rvcgref as used in many SML modules. 00635 * 00636 * Revision 1.179 1999/05/26 16:03:30 mju 00637 * Include various RVC object headers as need for RVC...INFO structures. 00638 * 00639 * Revision 1.178 1999/05/14 19:47:17 dwilson 00640 * #defines for sml import/export validation functions 00641 * 00642 * Revision 1.177 1999/05/07 21:52:54 scowan 00643 * Foward declare menu stuff. 00644 * 00645 * Revision 1.176 1999/04/30 22:34:15 dwilson 00646 * changed size of MIEFORMATSMLCLASSARRAYSIZE to 4 00647 * 00648 * Revision 1.175 1999/04/30 20:23:36 dwilson 00649 * revert to 2 (for now) 00650 * 00651 * Revision 1.174 1999/04/30 17:23:03 dwilson 00652 * changed MIEFORMATSMLCLASSARRAYSIZE to 4 00653 * 00654 * Revision 1.173 1999/04/28 17:40:24 mju 00655 * Include dispinfo.h. 00656 * 00657 * Revision 1.167 1999/04/08 14:31:39 mju 00658 * Use inclusion guards around every #include statement. 00659 * 00660 * Revision 1.166 1999/04/07 19:39:33 dwilliss 00661 * added flag for WIN32_Native 00662 * 00663 * Revision 1.164 1999/04/07 16:11:02 dwilliss 00664 * Added a flag to classes to indicate WIN32_NATIVE availability 00665 * Wrote a macro to define classes not available in win32 native 00666 * 00667 * Revision 1.163 1999/03/22 18:18:24 dwilliss 00668 * Added some members to SMLFILEINFO to keep track of poll callback 00669 * 00670 * Revision 1.162 1999/03/17 22:35:42 dwilson 00671 * sml imp/exp constant added 00672 * 00673 * Revision 1.161 1999/03/12 17:00:07 dwilliss 00674 * Change SML macro so we can move installer function to different module 00675 * 00676 * Revision 1.160 1999/03/10 21:01:17 dwilson 00677 * func prototypes for sml import/export 00678 * 00679 * Revision 1.158 1999/03/04 15:07:35 dwilliss 00680 * Renamed new macro so I can use it directly. Other way had problems 00681 * with preprocessor sometimes 00682 * 00683 * Revision 1.157 1999/03/03 23:05:29 dwilliss 00684 * Added a flags to smlfunc structure 00685 * 00686 * Revision 1.156 1999/02/18 22:59:39 dwilliss 00687 * SMLCLASS constructors behave more like C++ constructors now 00688 * 00689 * Revision 1.155 1999/02/18 20:14:55 dwilliss 00690 * Special way to export classes on the Mac 00691 * 00692 * Revision 1.154 1999/02/18 16:00:58 dwilliss 00693 * RVCAPPCLASSEXPORT now defined in rvcdefns.h, not here 00694 * 00695 * Revision 1.151 1999/02/16 22:49:01 dwilliss 00696 * temp define a constructor for SMLSTRING which takes a (struct _SMLCONTEXT *) 00697 * because programs compiled last week need it. 00698 * 00699 * Revision 1.150 1999/02/16 17:32:00 dwilliss 00700 * Major changes. Moved a gob of stuff out of dbqueryp.h to here 00701 * 00702 * Revision 1.148 1999/02/05 15:02:53 dwilliss 00703 * IND is no longer an extern double. It's a #define in ieeefp.h 00704 * Also simplified ISIND and ISINF to use the macros defined 00705 * in ieeefp.h 00706 * 00707 * Revision 1.147 1999/02/03 23:58:25 dwilliss 00708 * Major changes to SMLSTRING 00709 * 00710 * Revision 1.146 1999/01/05 19:13:42 scowan 00711 * Swapped multiple keywords 00712 * 00713 * 00714 ******************************************************************************* 00715 * Defining built-in SML functions: 00716 * 00717 * I SML built-in functions come in 3 flavors: void, double, and string. 00718 * Functions should take 3 parameters: 00719 * 00720 * static void function(numargs, arg, argtype) 00721 * int numargs; # of arguments 00722 * SMLARG *arg; Array of arguments 00723 * UINT8 *argtype; STYPE_Xxxx -- See <mi32/dbquery.h> 00724 * 00725 * All built-in functions should be declared as static. 00726 * 00727 * II To install a group of built-in functions, do the following: 00728 * 00729 * A. For each function: 00730 * 1. Prototype the function. 00731 * 2. Define a static array of SMLPARM. 00732 * a. Give one entry for each parameter. 00733 * b. Signal the end of the array by defining a paramater 00734 * with NULL for a name. 00735 * c. If you request the type STYPE_AnyVal, you may be passed 00736 * either an STYPE_Constant or STYPE_String. Check the 00737 * argtype array in your function and use the parm accordingly. 00738 * d. If you don't care how many parameters your function gets, 00739 * name the last parameter (not counting the NULL) "..." 00740 * This will match 0 or more parameters of the type requested. 00741 * e. Some parameters can be marked as optional, but then it's 00742 * up to you to figure out which ones you got. Put optional 00743 * parameters at the end. 00744 * 00745 * B. Define a static array of SMLFUNC, one entry per function. 00746 * the type must be either STYPE_BProcedure (void function), 00747 * STYPE_Function (function returning double), or STYPE_BSFunction 00748 * (Function returning SMLSTRING). You will have to cast the 00749 * function pointer to (VOIDFUNC), or most compilers will hate you. 00750 * Signal the end of the array by defining a function with NULL as 00751 * a name. 00752 * 00753 * III In the function: 00754 * 00755 * A. Don't free anything passed to you -- ever! 00756 * B. The arg array passed is an array of unions. Use the field that 00757 * matches the type of data you requested. Rasters are passed as 00758 * symbols. 00759 * C. If you encounter an error in your function and want to halt the 00760 * SML script, call one of the following, then return: 00761 * 1. SML_SetErrorCode(int error) 00762 * Works for any error code listed in <mi32/errcodes.ref> 00763 * 2. SML_SetArgError(int error, int argnum) 00764 * Works for SML_EXxxxx errors listed below. Pass the 00765 * argument number of the offending argument. 00766 * 00767 * IV. Actual install. 00768 * A. Get the SML context (returned from SML_Init) 00769 * B. Call the following: 00770 * SML_InstallFunctions(context, class, func_list) 00771 * void *context; (returned from SML_Init) 00772 * char *class; (example: "test") 00773 * SMLFUNC *func_list; (see above) 00774 * 00775 * Function returns 0 or an error code 00776 * C. In the SML editor, the functions will be shown on the 00777 * "Symbols..." dialog in a group called (in this example) 00778 * "function_test". To make this look better, edit the 00779 * MIPS resource file and add the following line: 00780 * *function_test.labelString: My test functions 00781 * 00782 * \endif 00783 */ 00784 /*****************************************************************************/ 00785 00786 #ifndef INC_MI32_SML_H 00787 #define INC_MI32_SML_H 00788 00789 /*#undef SML_API_CONFORMANCE Can't have until I can check this include file in */ 00790 00791 #ifndef SML_API_CONFORMANCE 00792 #define SML_API_CONFORMANCE 0 00793 #endif 00794 00795 #ifndef INC_MI32_RVCCAD_H 00796 #include <mi32/rvccad.h> /* For RVCCADINFO */ 00797 #endif 00798 #ifndef INC_MI32_RVCGREF_H 00799 #include <mi32/rvcgref.h> 00800 #endif 00801 #ifndef INC_MI32_RVCRAST_H 00802 #include <mi32/rvcrast.h> /* For RVCRASTINFO */ 00803 #endif 00804 #ifndef INC_MI32_RVCRGN_H 00805 #include <mi32/rvcrgn.h> /* For RVCREGIONINFO */ 00806 #endif 00807 #ifndef INC_MI32_RVCTEXT_H 00808 #include <mi32/rvctext.h> /* For RVCTEXTINFO */ 00809 #endif 00810 #ifndef INC_MI32_RVCTIN_H 00811 #include <mi32/rvctin.h> /* For RVCTININFO */ 00812 #endif 00813 #ifndef INC_MI32_RVCVECT_H 00814 #include <mi32/rvcvect.h> /* For RVCVECTINFO */ 00815 #endif 00816 #ifndef INC_MI32_MGUI_H 00817 #include <mi32/mgui.h> /* because we need MDLGPARENT in SMLCONTEXT */ 00818 #endif 00819 #ifndef INC_MI32_INIDEFNS_H 00820 #include <mi32/inidefns.h> 00821 #endif 00822 #ifndef INC_MI32_REGION_H 00823 #include <mi32/region.h> 00824 #endif 00825 #ifndef INC_MI32_VECFUNCS_H 00826 #include <mi32/vecfuncs.h> /* for vector toolkit handle VEHANDLE */ 00827 #endif 00828 #ifndef INC_MI32_TINFUNCS_H 00829 #include <mi32/tinfuncs.h> /* for TIN toolkit handle TEHANDLE */ 00830 #endif 00831 #ifndef INC_MI32_MGD_H 00832 #include <mi32/mgd.h> /* have a prototype that takes an MgdGC */ 00833 #endif 00834 #ifndef INC_MI32_MCB_H 00835 #include <mi32/mcb.h> 00836 #endif 00837 #ifndef INC_MI32_MATRIX_H 00838 #include <mi32/matrix.h> 00839 #endif 00840 #ifndef INC_MI32_CRYPTO_H 00841 #include <mi32/crypto.h> 00842 #endif 00843 #ifndef INC_MI32_SIMPLEAR_H 00844 #include <mi32/simplear.h> 00845 #endif 00846 #ifndef INC_MI32_MLIST_H 00847 #include <mi32/mlist.h> 00848 #endif 00849 00850 #ifndef INC_MI32_TEXTID_H 00851 #include <mi32/textid.h> 00852 #endif 00853 00854 #ifndef INC_MI32_DISPINFO_H 00855 #include <mi32/dispinfo.h> 00856 #endif 00857 00858 #ifndef INC_MI32_IEEEFP_H 00859 #include <mi32/ieeefp.h> 00860 #endif 00861 00862 /* Forward Declarations */ 00863 struct MENUBARITEM; 00864 struct MENUITEM; 00865 00866 class MISTRING; 00867 class XMLDOC; 00868 00869 #ifdef WINNT 00870 #pragma warning (disable: 4018) /* '!=' : signed/unsigned mismatch */ 00871 #pragma warning (disable: 4251) //! struct needs dll-interface blah blah blah 00872 #endif 00873 00874 #ifdef GetObject 00875 //! If we've included windows.h before this, they #defined GetObject 00876 //! for us. We don't want it defined! 00877 #undef GetObject 00878 #endif 00879 00880 //! Use this for the desciption field of any member or function that you want 00881 //! the documentation to show as being Deprecated. 00882 //! The last two digits are the version in which the feature will no longer 00883 //! be guarenteed to be available. 00884 #define SML_RETIRE_IN_68 "RetireIn6.8" 00885 #define SML_RETIRE_IN_69 "RetireIn6.9" 00886 00887 /***************************************************************************/ 00888 //! definitions used by SML inport/export 00889 //! allows validation func to know what type of operation is being performed 00890 00891 #define SMLMIE_IMPORTRASTER 1 00892 #define SMLMIE_IMPORTVECTOR 2 00893 #define SMLMIE_IMPORTCAD 3 00894 #define SMLMIE_IMPORTTIN 4 00895 #define SMLMIE_IMPORTDBASE 5 00896 00897 #define SMLMIE_EXPORTRASTER 6 00898 #define SMLMIE_EXPORTVECTOR 7 00899 #define SMLMIE_EXPORTCAD 8 00900 #define SMLMIE_EXPORTTIN 9 00901 #define SMLMIE_EXPORTDBASE 10 00902 00903 00904 /***************************************************************************/ 00905 //! Forward decl'n of struct types so we can use pointers to them before 00906 //! Actually defining them 00907 00908 struct DBCALLBACKSTRUCT; 00909 struct SMLARGTYPELIST; 00910 struct SMLELEMDATA; 00911 struct SMLENUMLIST; 00912 struct SMLCLASSSTACK; 00913 struct _SMLTFREF; 00914 struct SMLCONTEXT; 00915 struct SMLSEGMENT; 00916 struct SMLSOURCEINFO; 00917 struct SMLPARSEPOS; 00918 struct SMLFLAG; 00919 struct SMLCLASS; 00920 struct SMLFUNC; 00921 struct SMLPARM; 00922 struct SMLRASTBUF; 00923 struct SMLTABLEDATA; 00924 struct SMLONEXITDATA; 00925 struct SMLMACHINEINSTRUCTION; 00926 struct SMLPREPROCESSORSTACK; 00927 struct MEXTSELELEM; 00928 class SMLEDITOR; 00929 class SMLDEBUG; 00930 class SMLPARSER; 00931 class SMLVM; 00932 class SMLMEMPOOL; 00933 class XMLNODE; 00934 00935 class SMLSYMBOL; 00936 class SMLSTRING; 00937 class DEBUGDATA; 00938 00939 #ifndef WIN32_NATIVE 00940 //! Because I need to create a prototype for a method that takes 00941 //! a CWnd even though I may not be compiling WIN32_NATIVE. 00942 class CWnd; 00943 struct _GUID; 00944 #endif 00945 00946 struct ITypeInfo; 00947 struct IDispatch; 00948 00949 class SMLOBJPROXY; 00950 00951 namespace RVC { 00952 class OBJECT; 00953 class RASTER; 00954 class VECTOR; 00955 class CAD; 00956 class TIN; 00957 class SHAPE; 00958 class REGION; 00959 } 00960 00961 //!*************************************************************************** 00962 //! SML class names. 00963 //! 00964 //! Some existing code hard-codes the strings. These defined values should 00965 //! be used instead to avoid use of incorrect names and to make code easier 00966 //! to understand. 00967 //! 00968 //! Class names in SML are case-insensitive. The convention is to make 00969 //! them all uppercase. Many existing scripts will have mixed case though. 00970 //! 00971 //! The "Mie" classes are not listed here for simplicity. 00972 //! 00973 //! Keep names in alphabetical order. 00974 00975 #define SMLCLASSNAME_ALLOCATION "ALLOCATION" 00976 #define SMLCLASSNAME_BITMAPPATTERN "BITMAPPATTERN" 00977 #define SMLCLASSNAME_BUTTONITEM "BUTTONITEM" 00978 #define SMLCLASSNAME_CALLBACKLIST "CALLBACKLIST" 00979 #define SMLCLASSNAME_CENTER "CENTER" 00980 #define SMLCLASSNAME_COLOR "COLOR" 00981 #define SMLCLASSNAME_COLORMAP "COLORMAP" 00982 #define SMLCLASSNAME_COMPOSITEWIDGET "COMPOSITEWIDGET" 00983 #define SMLCLASSNAME_CONTEXT "CONTEXT" 00984 #define SMLCLASSNAME_DATABASE "DATABASE" 00985 #define SMLCLASSNAME_DATATIP "DATATIP" 00986 #define SMLCLASSNAME_DBEDITOR "DBEDITOR" 00987 #define SMLCLASSNAME_DBEDITOR_SINGLERECORDVIEW "DBEDITOR_SINGLERECORDVIEW" 00988 #define SMLCLASSNAME_DBEDITOR_SINGLERECORDWIDGET "DBEDITOR_SINGLERECORDWIDGET" 00989 #define SMLCLASSNAME_DBEDITOR_TABULARVIEW "DBEDITOR_TABULARVIEW" 00990 #define SMLCLASSNAME_DBEDITORTABLE "DBEDITORTABLE" 00991 #define SMLCLASSNAME_DBFIELDINFO "DBFIELDINFO" 00992 #define SMLCLASSNAME_DBTABLEINFO "DBTABLEINFO" 00993 #define SMLCLASSNAME_DBTABLEVAR "DBTABLEVAR" 00994 #define SMLCLASSNAME_DIALOGSHELL "DIALOGSHELL" 00995 #define SMLCLASSNAME_DISP "DISP" 00996 #define SMLCLASSNAME_DISPCALLBACKLIST "DISPCALLBACKLIST" 00997 #define SMLCLASSNAME_DISPLAYINFO "DISPLAYINFO" 00998 #define SMLCLASSNAME_ELEMSELECTPARMS "ELEMSELECTPARMS" 00999 #define SMLCLASSNAME_FILE "FILE" 01000 #define SMLCLASSNAME_GEOREF "GEOREF" 01001 #define SMLCLASSNAME_GPSCALLBACKLIST "GPSCALLBACKLIST" 01002 #define SMLCLASSNAME_GPSDATA "GPSDATA" 01003 #define SMLCLASSNAME_GPSPORT "GPSPORT" 01004 #define SMLCLASSNAME_GPSSYMBOL "GPSSYMBOL" 01005 #define SMLCLASSNAME_GRAPHICSCONTEXT "GRAPHICSCONTEXT" 01006 #define SMLCLASSNAME_GRE_GROUP "GRE_GROUP" 01007 #define SMLCLASSNAME_GRE_LAYER "GRE_LAYER" 01008 #define SMLCLASSNAME_GRE_LAYER_CAD "GRE_LAYER_CAD" 01009 #define SMLCLASSNAME_GRE_LAYER_GEOFORMULA "GRE_LAYER_GEOFORMULA" 01010 #define SMLCLASSNAME_GRE_LAYER_MAPGRID "GRE_LAYER_MAPGRID" 01011 #define SMLCLASSNAME_GRE_LAYER_PINMAP "GRE_LAYER_PINMAP" 01012 #define SMLCLASSNAME_GRE_LAYER_RASTER "GRE_LAYER_RASTER" 01013 #define SMLCLASSNAME_GRE_LAYER_REGION "GRE_LAYER_REGION" 01014 #define SMLCLASSNAME_GRE_LAYER_SCALEBAR "GRE_LAYER_SCALEBAR" 01015 #define SMLCLASSNAME_GRE_LAYER_SCRIPT "GRE_LAYER_SCRIPT" 01016 #define SMLCLASSNAME_GRE_LAYER_SHAPE "GRE_LAYER_SHAPE" 01017 #define SMLCLASSNAME_GRE_LAYER_TEXT "GRE_LAYER_TEXT" 01018 #define SMLCLASSNAME_GRE_LAYER_TIN "GRE_LAYER_TIN" 01019 #define SMLCLASSNAME_GRE_LAYER_VECTOR "GRE_LAYER_VECTOR" 01020 #define SMLCLASSNAME_GRE_LAYERMANAGER "GRE_LAYERMANAGER" 01021 #define SMLCLASSNAME_GRE_LAYOUT "GRE_LAYOUT" 01022 #define SMLCLASSNAME_GRE_VECTOR_LABELS "GRE_VECTOR_LABELS" 01023 #define SMLCLASSNAME_GRE_VECTOR_LINES "GRE_VECTOR_LINES" 01024 #define SMLCLASSNAME_GRE_VECTOR_NODES "GRE_VECTOR_NODES" 01025 #define SMLCLASSNAME_GRE_VECTOR_POINTS "GRE_VECTOR_POINTS" 01026 #define SMLCLASSNAME_GRE_VECTOR_POLYS "GRE_VECTOR_POLYS" 01027 #define SMLCLASSNAME_GRE_VIEW "GRE_VIEW" 01028 #define SMLCLASSNAME_GRE_VIEWABLE "GRE_VIEWABLE" 01029 #define SMLCLASSNAME_GRE_VIEW3D "GRE_VIEW3D" 01030 #define SMLCLASSNAME_GROUPXPOSN "GROUPXPOSN" 01031 #define SMLCLASSNAME_GROUPYPOSN "GROUPYPOSN" 01032 #define SMLCLASSNAME_HISTOGRAM "HISTOGRAM" 01033 #define SMLCLASSNAME_INIHANDLE "INIHANDLE" 01034 #define SMLCLASSNAME_LEGENDVIEW "LEGENDVIEW" 01035 #define SMLCLASSNAME_LINEPATTERN "LINEPATTERN" 01036 #define SMLCLASSNAME_LINESTYLE "LINESTYLE" 01037 #define SMLCLASSNAME_LMCOMPONANT "LMCOMPONANT" //! Spelled incorrectly 01038 #define SMLCLASSNAME_LMCOMPONENT SMLCLASSNAME_LMCOMPONANT 01039 #define SMLCLASSNAME_MAPPROJ "MAPPROJ" 01040 #define SMLCLASSNAME_MAT3X3 "MAT3X3" 01041 #define SMLCLASSNAME_MATRIX "MATRIX" 01042 #define SMLCLASSNAME_MDISPREGIONTOOL "MDISPREGIONTOOL" 01043 #define SMLCLASSNAME_MDISPTOOL "MDISPTOOL" 01044 #define SMLCLASSNAME_MENUITEM "MENUITEM" 01045 #define SMLCLASSNAME_NETWORK "NETWORK" 01046 #define SMLCLASSNAME_OBJECT "OBJECT" 01047 #define SMLCLASSNAME_POINT2D "POINT2D" 01048 #define SMLCLASSNAME_POINT3D "POINT3D" 01049 #define SMLCLASSNAME_POINTSTYLE "POINTSTYLE" 01050 #define SMLCLASSNAME_POINTSYMBOL "POINTSYMBOL" 01051 #define SMLCLASSNAME_POINTTOOL "POINTTOOL" 01052 #define SMLCLASSNAME_POLYSTYLE "POLYSTYLE" 01053 #define SMLCLASSNAME_PORT "PORT" 01054 #define SMLCLASSNAME_PORTCALLBACKLIST "PORTCALLBACKLIST" 01055 #define SMLCLASSNAME_PRINTPARMS "PRINTPARMS" 01056 #define SMLCLASSNAME_PROMPT "PROMPT" 01057 #define SMLCLASSNAME_PROMPTNUM "PROMPTNUM" 01058 #define SMLCLASSNAME_PROMPTSTR "PROMPTSTR" 01059 #define SMLCLASSNAME_PUSHBUTTONITEM "PUSHBUTTONITEM" 01060 #define SMLCLASSNAME_RASTER "RASTER" 01061 #define SMLCLASSNAME_RASTERINFO "RASTERINFO" 01062 #define SMLCLASSNAME_RECT "RECT" 01063 #define SMLCLASSNAME_REGION "REGION" 01064 #define SMLCLASSNAME_REGIONDATA "REGIONDATA" 01065 #define SMLCLASSNAME_REGIONTOOL "REGIONTOOL" 01066 #define SMLCLASSNAME_ROUTE "ROUTE" 01067 #define SMLCLASSNAME_STATUSCONTEXT "STATUSCONTEXT" 01068 #define SMLCLASSNAME_STATUSHANDLE "STATUSHANDLE" 01069 #define SMLCLASSNAME_STOP "STOP" 01070 #define SMLCLASSNAME_STYLEOBJECT "STYLEOBJECT" 01071 #define SMLCLASSNAME_TEXTSTYLE "TEXTSTYLE" 01072 #define SMLCLASSNAME_TIMER "TIMER" 01073 #define SMLCLASSNAME_TOGGLEBUTTONITEM "TOGGLEBUTTONITEM" 01074 #define SMLCLASSNAME_TOOL "TOOL" 01075 #define SMLCLASSNAME_TOOLCALLBACKLIST "TOOLCALLBACKLIST" 01076 #define SMLCLASSNAME_TOOLTIP "TOOLTIP" 01077 #define SMLCLASSNAME_TRANSPARM "TRANSPARM" 01078 #define SMLCLASSNAME_VECTOR "VECTOR" 01079 #define SMLCLASSNAME_VECTORINFO "VECTORINFO" 01080 #define SMLCLASSNAME_VIEWPOINT3D "VIEWPOINT3D" 01081 01082 #if 0 // ifndef NO_DEPRECATED 01083 //! The following have been renamed to be the same as their C++ counterparts 01084 //! (eg: GRE_LAYER_RASTER). SML has built-in aliases (setup in qqmdisp.c) 01085 //! to allow it to continue to accept the old names. But code should refer 01086 //! to them as their new names 01087 01088 //!\deprecated 01089 #define SMLCLASSNAME_CADLAYER "CADLAYER" 01090 //!\deprecated 01091 #define SMLCLASSNAME_GROUP "GROUP" 01092 //!\deprecated 01093 #define SMLCLASSNAME_LAYER "LAYER" 01094 //!\deprecated 01095 #define SMLCLASSNAME_LAYERMANAGER "LAYERMANAGER" 01096 //!\deprecated 01097 #define SMLCLASSNAME_LAYOUT "LAYOUT" 01098 //!\deprecated 01099 #define SMLCLASSNAME_MAPGRIDLAYER "MAPGRIDLAYER" 01100 //!\deprecated 01101 #define SMLCLASSNAME_PINMAPLAYER "PINMAPLAYER" 01102 //!\deprecated 01103 #define SMLCLASSNAME_RASTERLAYER "RASTERLAYER" 01104 //!\deprecated 01105 #define SMLCLASSNAME_REGIONLAYER "REGIONLAYER" 01106 //!\deprecated 01107 #define SMLCLASSNAME_SCALEBARLAYER "SCALEBARLAYER" 01108 //!\deprecated 01109 #define SMLCLASSNAME_TEXTLAYER "TEXTLAYER" 01110 //!\deprecated 01111 #define SMLCLASSNAME_TINLAYER "TINLAYER" 01112 //!\deprecated 01113 #define SMLCLASSNAME_VECTORLAYER "VECTORLAYER" 01114 //!\deprecated 01115 #define SMLCLASSNAME_VECTORLAYERLABELS "VECTORLAYERLABELS" 01116 //!\deprecated 01117 #define SMLCLASSNAME_VECTORLAYERLINES "VECTORLAYERLINES" 01118 //!\deprecated 01119 #define SMLCLASSNAME_VECTORLAYERNODES "VECTORLAYERNODES" 01120 //!\deprecated 01121 #define SMLCLASSNAME_VECTORLAYERPOINTS "VECTORLAYERPOINTS" 01122 //!\deprecated 01123 #define SMLCLASSNAME_VECTORLAYERPOLYS "VECTORLAYERPOLYS" 01124 //!\deprecated 01125 #define SMLCLASSNAME_VIEW "VIEW" 01126 //!\deprecated 01127 #define SMLCLASSNAME_VIEW3D "VIEW3D" 01128 #endif 01129 01130 01131 //! The following class names are left as mixed case because of historical usage. 01132 #define SMLCLASSNAME_Widget "Widget" 01133 #define SMLCLASSNAME_XmBulletinBoard "XmBulletinBoard" 01134 #define SMLCLASSNAME_XmCallbackList "XmCallbackList" 01135 #define SMLCLASSNAME_XmDrawingArea "XmDrawingArea" 01136 #define SMLCLASSNAME_XmForm "XmForm" 01137 #define SMLCLASSNAME_XmFrame "XmFrame" 01138 #define SMLCLASSNAME_XmHTML "XmHTML" 01139 #define SMLCLASSNAME_XmLabel "XmLabel" 01140 #define SMLCLASSNAME_XmManager "XmManager" 01141 #define SMLCLASSNAME_XmOptionMenu "XmOptionMenu" 01142 #define SMLCLASSNAME_XmPrimitive "XmPrimitive" 01143 #define SMLCLASSNAME_XmPushButton "XmPushButton" 01144 #define SMLCLASSNAME_XmRowColumn "XmRowColumn" 01145 #define SMLCLASSNAME_XmScale "XmScale" 01146 #define SMLCLASSNAME_XmScrollBar "XmScrollBar" 01147 #define SMLCLASSNAME_XmScrolledWindow "XmScrolledWindow" 01148 #define SMLCLASSNAME_XmSeparator "XmSeparator" 01149 #define SMLCLASSNAME_XmToggleButton "XmToggleButton" 01150 01151 /***************************************************************************/ 01152 /* 01153 * Symbol types 01154 */ 01155 01156 #define STYPE_StrVar STYPE_StringVar 01157 #define STYPE_Num STYPE_Constant //!< Same as Constant 01158 01159 enum SMLSTYPE { 01160 STYPE_Constant = 0, //!< 0 NUMBER 01161 STYPE_NumVar, //!< 1 FVAR 01162 STYPE_StringVar, //!< 2 SVAR 01163 STYPE_Array, //!< 3 AVAR 01164 STYPE_Raster, //!< 4 RVAR 01165 STYPE_Vector, //!< 5 VVAR 01166 STYPE_CAD, //!< 6 CVAR 01167 STYPE_Region, //!< 7 EGVAR 01168 STYPE_TIN, //!< 8 TINVAR 01169 STYPE_RESERVERD, //!< 9 reserved for whatever 01170 STYPE_Keyword, //!< 10 01171 STYPE_Intrinsic, //!< 11 BLTIN 01172 STYPE_UFunction, //!< 12 FUNCTION - User defined 01173 STYPE_UProcedure, //!< 13 PROCEDURE - User defined 01174 STYPE_BFunction, //!< 14 BFUNCTION - Built-in 01175 STYPE_BSFunction, //!< 15 BSTRFUNC - Built-in 01176 STYPE_BProcedure, //!< 16 PBROCEDURE - Built-in 01177 STYPE_Table, //!< 17 TABLE 01178 STYPE_TableVar, //!< 18 TVAR - pointer to table 01179 STYPE_AnyVal, //!< 19 ANYVAL -- Either NUMBER or STRING 01180 STYPE_String, //!< 20 String 01181 STYPE_AnyObject, //!< 21 RVAR, VVAR, or CVAR 01182 STYPE_NumList, //!< 22 NUMBER, VLVAR, or NUM_OR_LIST 01183 STYPE_StrList, //!< 23 STRING, SLVAR, or STR_OR_LIST 01184 STYPE_List, //!< 24 StrList or NumList 01185 STYPE_RecList, //!< 25 May use NUMLIST instead 01186 STYPE_VectFunc, //!< 26 Function returning an object 01187 STYPE_RegionFunc, //!< 27 Function returning an object 01188 STYPE_CADFunc, //!< 28 Function returning an object 01189 STYPE_TINFunc, //!< 29 Function returning an object 01190 STYPE_ClassFunc, //!< 30 Function returning a class ptr 01191 STYPE_ClassVar, //!< 31 Variable holding a class ptr 01192 STYPE_Class, //!< 32 Just data 01193 STYPE_RastListVar, //!< 33 01194 STYPE_VectListVar, //!< 34 01195 STYPE_CADListVar, //!< 35 01196 STYPE_TINListVar, //!< 36 01197 STYPE_RegListVar, //!< 37 01198 STYPE_Enum, //!< 38 01199 STYPE_StrField, //!< 39 01200 STYPE_NumField, //!< 40 01201 STYPE_ClassArrayFunc,//!< 41 Function returning an (SMLCLASSARRAY*) 01202 STYPE_ClassArrayVar, //!< 42 01203 STYPE_MAXTYPE //!< 43 Always the last one 01204 }; 01205 01206 typedef enum SMLSTYPE SMLSTYPE; 01207 /* When adding a new STYPE, be sure to modify the following functions in dbquery.c 01208 ** DBQuery_STYPEtoString(), DBQuery_STYPEFlags(), 01209 ** _qq_stype_to_token_val(), _qq_token_val_to_stype() 01210 */ 01211 01212 /***************************************************************************/ 01213 //! For historical reasons, these constants are defined weird. They used to 01214 //! be defined in terms of the #defines produced by YACC for the various 01215 //! keywords. However, those values were not "fixed" and adding a new terminal 01216 //! to the grammer could cause the "constants" to shift. This is bad for a 01217 //! dll. To keep old code working, the enums are defined to be the numbers 01218 //! that they were at the time I changed this to be an enum and must remain 01219 //! the same for all time. 01220 01221 enum SMLSCOPE { 01222 SCOPE_NONE = 0, 01223 SCOPE_TABLE = 272, 01224 SCOPE_BFUNCTION = 280, 01225 SCOPE_KEYWORD = 311, 01226 SCOPE_GLOBAL = 336, 01227 SCOPE_LOCAL = 337, 01228 SCOPE_PERMANENT = 1000 01229 }; 01230 01231 typedef enum SMLSCOPE SMLSCOPE; 01232 01233 /***************************************************************************/ 01234 #ifndef INC_MI32_SMLFUNCS_H 01235 #include <mi32/smlfuncs.h> /* Gives us prototypes for installer functions */ 01236 #endif 01237 /***************************************************************************/ 01238 01239 typedef long SMLMACHINEINST; //!< not (INT32), Must be same size as (void *) 01240 01241 /***************************************************************************/ 01242 /** 01243 * Parameter flag value definition 01244 * 01245 * These are meant to be statically defined and normally use (char*) in the ASCII 01246 * range. Since there are a few cases where we need Unicode, interpret the name 01247 * and desc as UTF8. This will cause no change for statically defined strings, 01248 * as they're all chars < 128. In the few places where we need to make one 01249 * Unicode, convert it to UTF8 and store that. 01250 */ 01251 struct SMLFLAG { 01252 char *name; 01253 UINT32 value; 01254 char *desc; 01255 }; 01256 01257 /* Flags for SML_InstallStaticEnum(). It gets passed an array of SMLFLAGs and we have 01258 * to tell it what if anything to free when the context is destroied 01259 */ 01260 #define SMLFLAG_FreeName 0x0001 01261 #define SMLFLAG_FreeDesc 0x0002 01262 #define SMLFLAG_FreeFlagArray 0x0004 01263 01264 01265 /***************************************************************************/ 01266 01267 //! \class SMLUSERDATA mi32/sml.h 01268 //! A class which can be used to hang USERDATA off an SMLSTRING or SMLSYMBOL 01269 //! 01270 //! To use, you have to derive a class from SMLUSERDATA, 01271 //! Create your own ID in the enum below, and make your constructor 01272 //! call the base class constructor, passing in your id. 01273 //! 01274 //! For MicroImages employees adding derived classes, just use the 01275 //! next available number in the TAG enum. If using TNTsdk, 01276 //! start your numbers at something high like 1024 so there's no 01277 //! chance of conflicting with later additions by MicroImages. 01278 //! 01279 //! 01280 class RVCAPPCLASSEXPORT SMLUSERDATA { 01281 public: 01282 01283 enum TAG { 01284 TAG_NONE = 0, 01285 TAG_TABLE = 1, 01286 TAG_FIELD = 2, 01287 TAG_REGEXP = 3, 01288 TAG_FirstUserTag = 1000, //!< The first tag that AllocTag will return 01289 TAG_BIGNUMBER = 0x7FFFFFF //!< Make compiler use a long, not a byte 01290 }; 01291 01292 SMLUSERDATA ( 01293 TAG tag 01294 ) : 01295 m_tag(tag) 01296 { 01297 } 01298 01299 virtual ~SMLUSERDATA ( 01300 ) { 01301 } 01302 01303 //! Allocate a tag to use for a user-defined SMLUSERDATA 01304 //! Note: You should allocate one and keep it allocated. 01305 //! unless you need to attach multiple instances of the 01306 //! same type 01307 static TAG AllocTag(); 01308 01309 TAG GetTag ( 01310 ) const { 01311 return m_tag; 01312 } 01313 01314 private: 01315 #ifndef GENERATING_DOXYGEN_OUTPUT 01316 TAG m_tag; 01317 static TAG s_NextTag; 01318 #endif // GENERATING_DOXYGEN_OUTPUT 01319 }; 01320 01321 01322 #ifndef GENERATING_DOXYGEN_OUTPUT 01323 class SMLUSERDATACONTAINER { 01324 public: 01325 SMLUSERDATACONTAINER() : m_userdata(0) {} 01326 ~SMLUSERDATACONTAINER(); 01327 void Init() { m_userdata = 0; } //! Used if enclosing class has no constructor 01328 void Destroy(); //! Used if enclosing class has no destructor 01329 01330 //! Attach some User Data 01331 //! The data to be attached must be derived from SMLUSERDATA, and must have 01332 //! been allocated via "new". Once attached, the container owns the 01333 //! data and will "delete" it when the container is deleted. 01334 //! Also, if you try to attach something for a user ID that's already in use, 01335 //! it will delete the existing thing. 01336 void Attach ( 01337 SMLUSERDATA* 01338 ); 01339 01340 //! Unattach some User Data. 01341 //! If the data to be unattached isn't attached, it just ignores you. 01342 //! Once unattached, the data is yours to do with as you wish. You are 01343 //! responsible for deleting it too. 01344 void Detach ( 01345 SMLUSERDATA* 01346 ); 01347 01348 01349 //! Get the User Data. 01350 //! If no data for the given id is attached, it will just return NULL . 01351 //! Do not free the data returned unless you Unattach it first. 01352 SMLUSERDATA* Get ( 01353 SMLUSERDATA::TAG 01354 ); 01355 01356 private: 01357 #ifndef GENERATING_DOXYGEN_OUTPUT 01358 SIMPLE_ARRAY<SMLUSERDATA*>* m_userdata; //!< A pointer because it's only allocateed if needed (almost never) 01359 #endif // GENERATING_DOXYGEN_OUTPUT 01360 }; 01361 01362 #endif // GENERATING_DOXYGEN_OUTPUT 01363 01364 /***************************************************************************/ 01365 //! \class SMLSTRING mi32/sml.h 01366 //! \brief SML string constant representation 01367 //! 01368 //! \note The constructors are private. Use the various 01369 //! SMLCONTEXT::StringAlloc() methods instead. 01370 class RVCAPPCLASSEXPORT SMLSTRING : public MISTRING { 01371 01372 #if defined (RVCSYSDLL) 01373 public: 01374 #else 01375 private: 01376 #endif 01377 01378 #ifndef GENERATING_DOXYGEN_OUTPUT 01379 //! Constructors are private outside the DLL 01380 01381 //! Constructor for empty string. 01382 SMLSTRING ( 01383 ); 01384 01385 //! Constructor for ASCII (ISO-2022) string. 01386 //! Direct use of constructor outside rvcsys.dll deprecated 01387 //! use context->StringAlloc() instead, since the application 01388 //! doesn't know the size of an SMLSTRING. 01389 SMLSTRING ( 01390 const char *s 01391 ); 01392 01393 //! Constructor for any encoding SMLSTRING 01394 //! Direct use of constructor outside rvcsys.dll deprecated 01395 //! use context->StringAlloc() instead, since the application 01396 //! doesn't know the size of an SMLSTRING. 01397 SMLSTRING ( 01398 const void *s, 01399 CHAR_ENCODING encoding 01400 ); 01401 01402 //! Constructor for Unicode string. 01403 //! Direct use of constructor outside rvcsys.dll deprecated 01404 //! use context->StringAlloc() instead, since the application 01405 //! doesn't know the size of an SMLSTRING 01406 SMLSTRING ( 01407 const UNICODE *s 01408 ); 01409 01410 //! Constructor for UTF8 string. 01411 //! Direct use of constructor outside rvcsys.dll deprecated 01412 //! use context->StringAlloc() instead, since the application 01413 //! doesn't know the size of an SMLSTRING 01414 SMLSTRING ( 01415 const UINT8 *s 01416 ); 01417 01418 01419 //! Destructor. 01420 ~SMLSTRING(); 01421 01422 #endif // GENERATING_DOXYGEN_OUTPUT 01423 public: 01424 01425 01426 //! Attach some User Data to the string. 01427 //! The data to be attached must be derived from SMLUSERDATA, and must have 01428 //! been allocated via "new". Once attached to the string, the string owns the 01429 //! data and will "delete" it when the string is deleted. 01430 //! Also, if you try to attach something for a user ID that's already in use, 01431 //! it will delete the existing thing. 01432 void AttachUserData ( 01433 SMLUSERDATA* data 01434 ); 01435 01436 //! Detach some User Data from the string. 01437 //! If the data to be unattached isn't attached, it just ignores you. 01438 //! Once detached, the data is yours to do with as you wish. You are 01439 //! responsible for deleting it too. 01440 void DetachUserData ( 01441 SMLUSERDATA* data 01442 ); 01443 01444 01445 //! Get the User Data attached to a string. 01446 //! If no data for the given id is attached, it will just return NULL . 01447 //! Do not free the data returned unless you Unattach it first. 01448 SMLUSERDATA* GetUserData ( 01449 SMLUSERDATA::TAG tag 01450 ); 01451 01452 //! Increment refcount. 01453 void IncRefCount (); 01454 01455 //! Decrement refcount. If it goes to zero, string deletes itself. 01456 void DecRefCount (); 01457 01458 //! Prevent garbage collection from deleting this string. 01459 //! Used if the string is a "constant" in the script and 01460 //! the pointer to it is in the SML code 01461 void Lock ( 01462 ); 01463 01464 int GetRefCount ( 01465 ) const; 01466 01467 #if /* !defined(NO_DEPRECATED) || */ defined(RVCSYSDLL) 01468 //! Get the length of the string 01469 //! \deprecated Now that SMLSTRING is derived from MISTRING, just use its 01470 //! GetLength() method 01471 int GetLen ( 01472 ) const; 01473 01474 //! Returns the internal character encoding for this string. 01475 //! \deprecated. Strings are always Unicode now and this always returns -1 01476 int GetEncoding ( 01477 ) const; 01478 #endif 01479 01480 01481 //! Lookup a string value in an array of SMLFLAGS. 01482 //! 01483 //! In an SML function, a parameter may be defined to be STYPE_String 01484 //! even though internally you want a number. This function allows you 01485 //! to look up the value in an array of SMLFLAGs 01486 //! 01487 //! @return -1 if the string could not be found in the SMLF