nsfAPI.h

Clone Tools
  • last updated 22 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
gentclAPI.tcl: - handle duplicated domains by folding these to a single definition

nsf.c:

- added command nsf::method::get.

Rationale: provide a central place to obtain information

about all kind of method handles, which might be

- scripted and c-based methods

- nsf::procs

- plain tcl procs

- cmds (with and without paramter definitions)

- make results of ListMethod() robust against missing

information (e.g. plain tcl cmds, missing object registrations,

etc.)

- factor out common code for ListMethod call sites

for per-object methods, instance methods and procs/cmds

to ListMethodResolve()

- return errors from failing converter registrations

- extend regression test (new test set nsf-method.test)

  1. … 7 more files in changeset.
- minor cleanup

  1. … 5 more files in changeset.
- added methods "info lookup filters ?-guards? ?/pattern/?" and "info lookup methods *-guards? ?/pattern/?" - extended regression test

  1. … 7 more files in changeset.
nsf.c: - fixed unary argument passing notation for "-nocomplain" of nsf::var and for 42 other options of other commands

nx.tcl:

- added flag -nocomplain to "/obj/ /prop/ unset ?-nocomplain?"

  1. … 4 more files in changeset.
- renamed nsf::relation to nsf::relation::set and added nsf::relation::get in accordance with nsf::var::get

  1. … 17 more files in changeset.
nsf.c: - added nsf::var::get and "::nx::var get" to provide selector based interface for variable reading (used in slotmethod get of nx::VariableSlot)

- cleanup of nx.tcl and TODO

  1. … 8 more files in changeset.
- add flag "-onerror" to nsf::forward::method to handle errors during dispatch of a forwarder (not all error messags of forwarder are already transformed) - added log-level Info which prints always, e.g. for "-verbose" flag of forwarder - drop setter-rule from properties (use always forwarder) - drop "/obj/ /prop/" and "/obj/ /prop/ /value/" in favor of "/obj/ /prop/ get" and "/obj/ /prop/ assign /value/" to achieve better orthogonality with e.g. incremental properties

  1. … 16 more files in changeset.
- let the c-code generator produce as well nonnull assertions

  1. … 3 more files in changeset.
- use nx rather than xotcl2 terminology in nsf::method::forward

  1. … 8 more files in changeset.
- deactivated "-onerror", since its semantics are expressible via try/catch, and there are no regression tests for xotcl and nx, and we could not find any script that uses this

  1. … 4 more files in changeset.
nsf.c: - invalidate paramter caches of subclasses on NsfParameterInvalidateClassCacheCmd unless during shutdown. Otherwise some classes might not become aware of properties added later to superclasses. - extended regression test

  1. … 4 more files in changeset.
nsf.c: - change name of enumeratorConverterEntry to Nsf_EnumeratorConverterEntry, move it with NSF_ARG_* flags to tcl.h to make it available in derived modules using the converter - Added editor hints for a more uniform appearance

  1. … 44 more files in changeset.
nsf.c: - new command ::nsf::object::alloc /class/ /obj/ ?/script/? alloc an object and execute script in the context. Can be used to regenerate an object in a old state.

serializer:

- fixed loading of objects with required data in the blueprint

(many thanks for david hopfmueller for reporting this)

- make use of nsf::object::alloc (1 command instead of 1 create + 2 evals)

- these changes imprived laading time of blueprint by about 25%

for OpenACS+xowiki

  1. … 9 more files in changeset.
- add parameter parser and converter to stub tables

  1. … 3 more files in changeset.
- nsf: added switch "-checkalways" to nsf::method::create - nx: added switch "checkalways" to "method" and "object method" - extended regression test

  1. … 7 more files in changeset.
-added flag -checkalways to nsf::proc and nsf::asm::proc (for the latter just a placeholder for now). If the flag is used, it will cause argument testing independently from the "configure checkarguments" setting. To force argument checking always is useful e.g. for checking external values (e.g. in a web server)

  1. … 4 more files in changeset.
nsf.c - removed obsolete function AssertionAppendPrePost() - removed obsolete function NsfNSCopyCmdsCmd() and ::nsf::nscopycmd (handled now more general on scripting level in the "copy" method)

nx.tcl:

- "copy" method: fixed copying of class-level per-object methods

- extended regression tests

  1. … 5 more files in changeset.
- renamed initblock parameter from __initcmd to __initblock - renamed nsf::configure parameter from "keepinitcmds" to "keepcmds" - saving "keepcmds" in an associative array named "__cmd(/parameternName)" to allow saving of multiple parmeters with less nameclash danger (when application stays away from variables stating with double underscore)

  1. … 17 more files in changeset.
- changed enumeration values for "-source" in "info lookup methods" "info lookup slots" "info methods" "info slots" of "all|application|baseclasses" to "all|application|system" for consistencey with "nsf::my" and "nsf::dispatch" which uses "-system" as well

  1. … 4 more files in changeset.
Cleanup of nsfAPI.decls - remove unneeded enumeration types - use "typeName" to shorten reported names of parameters - use camel case for reported names

  1. … 4 more files in changeset.
- added implementation for slots with traces+types for classes - exception for incorrect defaults are thrown during slot creation - extended nsf::is, added parameter * ?-configure? -- accept configure paramter options * ?-name /name/? -- provide a parameter name for error message - simplified nx.tcl by using new nsf::is - extended regression test

  1. … 6 more files in changeset.
- C-code Generator: added "-typeName" for enumeration types that allows for disambiguation of enumerations with different argument names. Before that, the argument name determined the c-type of the enumeration. Therefore it was not possible to use argName "-type" for two different functions with a different list of enumerators.

- changed "-methodtype" to simply "-type" in

/obj/ info methods ... ?-type all|scripted|builtin|alias|forwarder|object|setter|nsfproc? ...

/obj/ info object methods ... ?-type all|scripted|builtin|alias|forwarder|object|setter|nsfproc? ...

/obj/ info lookup methods ... ?-type all|scripted|builtin|alias|forwarder|object|setter|nsfproc? ...

  1. … 14 more files in changeset.
- extended parameter extractor: new functionality ::nsf::parameter get default /parameter/ ?/varname/? ::nsf::parameter get type /parameter/ /obj/ info parameter get default /parameter/ ?/varname/? /obj/ info parameter get type /parameter/

  1. … 6 more files in changeset.
- Method and configure parameter reform

/cls/ info configure parameters ?pattern? -> list of params

/cls/ info configure syntax -> syntax output

/obj/ info method parameters /methodName/ ?/pattern/? -> list of params

/obj/ info method syntax -> syntax output

/obj/ info lookup configure parameter ?/pattern/? -> list of params

/obj/ info lookup configure syntax -> syntax output

/cls/ info parameter list|name|syntax /param/ -> value

  1. … 14 more files in changeset.
- allow explicit unsetting of -per-object flag in 0-argument -flag=value notation

  1. … 2 more files in changeset.
make assumptions explicit

  1. … 1 more file in changeset.
nsf.c: - handling of method names in error messages from nsfAPI.h. Make sure that error message is generated with the actual method name.

  1. … 4 more files in changeset.
- added functiality for "cget" to call parameter-methods (e.g. "... cget -class"). The method cget calls either "/slot/ get ..." (when slot=... is provided in the parameter spec) or it assumes that the method without argument returns the value - added "::nsf::object::property /obj/ volatile" to query whether a object is volatile or not - "/obj/ cget -volatile" returns now the volatial state of the object - factored out ParameterMethodDispatch() from OConfigureMethod() - extended regression test

  1. … 9 more files in changeset.
- NsfObjInfoObjectparameterMethod(): return not only the first matching parameter, but the list of all matching ones. The last optional argument was renamed from "name" to "pattern" accordingly

  1. … 6 more files in changeset.
- rename invalidateobjectparameter -> parameter:invalidate::classcache - rename invalidateobjobjectparameter -> parameter:invalidate::objectcache - bring cmds into alphabetical order

  1. … 7 more files in changeset.