- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xotcl::Class
::xotcl::Class create ...
Defined in
Class Relations
- class: ::xotcl::Class
- superclass: ::xotcl::Object
- subclass: ::xo::db::Class, ::xotcl::RecreationClass, ::xo::tdom::Class, ::xo::ChatClass, ::xowiki::TreeRenderer, ::xowiki::IncludeletClass
::xotcl::Class create ::xotcl::Class \ -superclass ::xotcl::ObjectMethods (to be applied on the object)
Methods (to be applied on instances)
__class_configureparameter (scripted)
set slotObjects [nsf::directdispatch [self] ::nsf::methods::class::info::slotobjects -closure -type ::nx::Slot] set parameterDefinitions [::nsf::parameter::specs $slotObjects] lappend parameterDefinitions args:alias,method=residualargs,args__default_metaclass (setter)
__default_superclass (setter)
ad_instforward (scripted)
set flags [::xo::api get_proc_definition_flags $debug $deprecated] uplevel [self] instforward {*}$flags $method_name $args ::xo::api update_method_doc -protection [expr {$private ? "private" : "public"}] -deprecated=$deprecated -debug=$debug [::xo::api scope] [self] "inst" $method_name $docad_instproc (scripted)
set flags [::xo::api get_proc_definition_flags $debug $deprecated] set returnSpec [::xo::api get_returns_spec $returns] uplevel [list [self] instproc {*}$flags $proc_name $arguments {*}$returnSpec $body] ::xo::api update_method_doc -protection [expr {$private ? "private" : "public"}] -deprecated=$deprecated -debug=$debug [::xo::api scope] [self] inst $proc_name $docallinstances (scripted)
# TODO: mark it deprecated return [:info instances -closure]alloc (alias)
create (alias)
dealloc (alias)
extend_slot (scripted)
# The argument list is e.g. "foo -name x -title y" # # It is placed into one argument to avoid interference with the "-" # argument parsing since it will always start with a non-dashed # value. # set name [lindex $arg 0] set config [lrange $arg 1 end] # search for slot foreach c [:info heritage] { if {[nsf::is object ${c}::slot::$name]} { set slot ${c}::slot::$name break } } if {![info exists slot]} {error "can't find slot $name"} # copy slot and configure it set newSlot [self]::slot::$name $slot copy $newSlot $newSlot configure -domain [self] -manager $newSlot -create_acs_attribute false -create_table_attribute false {*}$config # # Changing the domain is necessary for "update_attribute_from_slot" # for the extended slots like "title", "description" etc. But then # the accessor methods (for "title", "description") have to be # installed manually for the classes, on which the extension # happens. # ::nsf::method::setter [$newSlot domain] $name ns_log notice "=== change domain of $name from [$newSlot domain] to [$slot domain]" $newSlot domain [$slot domain] # set :db_slot($name) $newSlotextend_slot_default (scripted)
# Search for the slot. If the slot exists, extend its default # value with the new value foreach c [:info heritage] { if {[nsf::is object ${c}::slot::$name]} { set value [list $value {*}[${c}::slot::$name default]] break } } # create a mirroring slot with the maybe extended default :slots [list Attribute create $name -default $value]info (alias)
instfilter (forward)
instfilterguard (alias)
instforward (scripted)
set arglist [list] if {[info exists target] && [string index $target 0] eq "-"} { error "target '$target' must not start with a dash" } if {[info exists default]} {lappend arglist -default $default} if {$earlybinding} {lappend arglist -earlybinding} if {[info exists methodprefix]} {lappend arglist -prefix $methodprefix} if {$objscope} {lappend arglist -frame object} if {[info exists onerror]} {lappend arglist -onerror $onerror} if {$verbose} {lappend arglist -verbose} if {[info exists target]} {lappend arglist $target} if {[llength $args] > 0} {lappend arglist {*}$args} set r [::nsf::method::forward [self] $method {*}$arglist] if {$debug} {::nsf::method::property [self] $r debug true} if {$deprecated} {::nsf::method::property [self] $r deprecated true} return $rinstinvar (forward)
instmixin (forward)
<instance of xotcl::Class> instmixin
- Testcases:
- create_folder_with_page, xowf, create_workflow_with_instance
instmixinguard (alias)
instparametercmd (forward)
instproc (scripted)
set conditions [list] if {[info exists precondition]} {lappend conditions -precondition $precondition} if {[info exists postcondition]} {lappend conditions -postcondition $postcondition} set r [::nsf::method::create [self] $name $arguments $body {*}$conditions] if {$debug} {::nsf::method::property [self] $r debug true} if {$deprecated} {::nsf::method::property [self] $r deprecated true} if {[info exists returns]} {::nsf::method::property [self] $r returns $returns} return $rmethod (scripted)
set returns_flag [expr {[info exists returns] ? [list -returns $returns] : {}}] if {${per-object}} { :proc -debug=$debug -deprecated=$deprecated $name $arguments {*}$returns_flag $body } else { :instproc -debug=$debug -deprecated=$deprecated $name $arguments {*}$returns_flag $body }new (alias)
parameter (scripted)
set slotContainer [::nx::slotObj [::nsf::self]] foreach arg $arglist { #puts stderr "PARAMETER: [self] ::nsf::classes::nx::Class::property -accessor public $arg" [self] ::nsf::classes::nx::Class::property -class ::xotcl::Attribute -accessor public $arg ::nsf::method:::setter [self] [lindex $arg 0] } ::nsf::var::set $slotContainer __parameter $arglistrecreate (alias)
slots (scripted)
set slotContainer [::nx::slotObj [self]] ::uplevel [list [self] contains -object $slotContainer $cmd]superclass (forward)
unknown (scripted)
# puts stderr "use '[self] create $args', not '[self] $args'" set lvl 1 if {[::nsf::current isnextcall]} { set lvl [::nsf::current callinglevel] } ::uplevel $lvl [list [self] create {*}$args]uses (scripted)
foreach package $list { ::xotcl::package import -into [::xotcl::self] $package puts stderr "*** using ${package}::* in [::xotcl::self]" }
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables