apidoc::get_object_property (public)

 apidoc::get_object_property o what [ args... ]

Defined in packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl

Return poperties of objects agnostic to the object system (i.e., XOTcl or NX).

Parameters:
o (required)
what (required)

Partial Call Graph (max 5 caller/called nodes):
%3 Object ::xo::api Object ::xo::api (public) apidoc::get_object_property apidoc::get_object_property Object ::xo::api->apidoc::get_object_property packages/xotcl-core/www/index.tcl packages/xotcl-core/ www/index.tcl packages/xotcl-core/www/index.tcl->apidoc::get_object_property xo::api proc method_link xo::api proc method_link (public) xo::api proc method_link->apidoc::get_object_property xo::api proc update_method_doc xo::api proc update_method_doc (public) xo::api proc update_method_doc->apidoc::get_object_property xo::dot_append_method xo::dot_append_method (private) xo::dot_append_method->apidoc::get_object_property nsf::methods::class::info::heritage nsf::methods::class::info::heritage apidoc::get_object_property->nsf::methods::class::info::heritage nsf::methods::class::info::method nsf::methods::class::info::method apidoc::get_object_property->nsf::methods::class::info::method nsf::methods::class::info::mixinof nsf::methods::class::info::mixinof apidoc::get_object_property->nsf::methods::class::info::mixinof nsf::methods::class::info::mixins nsf::methods::class::info::mixins apidoc::get_object_property->nsf::methods::class::info::mixins nsf::methods::object::info::class nsf::methods::object::info::class apidoc::get_object_property->nsf::methods::object::info::class

Testcases:
No testcase defined.
Source code:
        switch -- $what {
            "mixin" {
                return [$o ::nsf::methods::object::info::mixins]
            }
            "instmixin" {
                return [$o ::nsf::methods::class::info::mixins]
            }
            "mixinof" {
                return [$o ::nsf::methods::class::info::mixinof -scope object]
            }
            "instmixinof" {
                return [$o ::nsf::methods::class::info::mixinof -scope class]
            }
            "instproc" {
                if {[nsf::is class,type=::xotcl::Class $o]} {return [$o info instprocs {*}$args]}
                if {[nsf::is class,type=::nx::Class $o]} {return [$o info methods -path -type scripted -callprotection all {*}$args]}
            }
            "instcommand" {
                if {[nsf::is class,type=::xotcl::Class $o]} {return [$o info instcommands {*}$args]}
                if {[nsf::is class,type=::nx::Class $o]} {return [$o info methods -path {*}$args]}
            }
            "instforward" {
                if {[nsf::is class,type=::xotcl::Class $o]} {return [$o info instforward {*}$args]}
                if {[nsf::is class,type=::nx::Class $o]} {return [$o info methods -type forwarder {*}$args]}
            }
            "instmethodtype" {
                return [$o ::nsf::methods::class::info::method type {*}$args]
            }
            "methodtype" {
                return [$o ::nsf::methods::object::info::method type {*}$args]
            }
            "proc" {
                if {[nsf::is object,type=::xotcl::Object $o]} {return [$o info procs {*}$args]}
                if {[nsf::is object,type=::nx::Object $o]} {return [$o info object methods -path -type scripted {*}$args]}
            }
            "command" {
                return [$o ::nsf::methods::object::info::methods {*}$args]
            }
            "forward" {
                if {[nsf::is object,type=::xotcl::Object $o]} {return [$o info forward {*}$args]}
                if {[nsf::is object,type=::nx::Object $o]} {return [$o info object methods -type forwarder {*}$args]}
            }
            "slots" {
                if {[nsf::is object,type=::xotcl::Object $o]} {return [$o info slots]}
                return [$o info object methods -type forwarder]
            }
            "class" {
                return [$o ::nsf::methods::object::info::class]
            }
            "superclass" {
                if {[nsf::is class,type=::xotcl::Class $o]} {return [$o info superclass]}
                if {[nsf::is class,type=::nx::Class $o]} {return [$o info superclasses]}
            }
            "heritage" {
                return [$o ::nsf::methods::class::info::heritage]
            }
            "subclass" {
                if {[nsf::is class,type=::xotcl::Class $o]} {return [$o info subclass]}
                if {[nsf::is class,type=::nx::Class $o]} {return [$o info subclasses]}
            }
            "parameter" {
                if {[nsf::is object,type=::xotcl::Object $o]} {return [$o info parameter]}
                return [lmap p [$o info variables -closure] {$o info variable parameter $p}]
            }
            "isclass" {
                return [nsf::is class $o]
            }
            "isobject" {
                return [nsf::is object $o]
            }
            "isbaseclass" {
                if {![nsf::is class $o]} {return 0}
                if {[catch {set p [$o ::nsf::methods::object::info::precedence]}]} {return 0}
                return [expr {[lindex $p end] eq $o}]
            }
            "instmethodparameter" {
                return [$o ::nsf::methods::class::info::method parameter {*}$args]
            }
            "methodparameter" {
                return [$o ::nsf::methods::object::info::method parameter {*}$args]
            }
            "instargs" {
                if {[nsf::is object,type=::xotcl::Object $o]} {return [$o info instargs {*}$args]}
                set posargs {}
                foreach  m [$o ::nsf::methods::class::info::method args {*}$args]  p [$o ::nsf::methods::class::info::method parameter {*}$args] {
                        if {[string index [lindex $p 0] 0] eq "-"} continue
                        lappend posargs $m
                    }
                return $posargs
            }
            "args" {
                if {[nsf::is object,type=::xotcl::Object $o]} {return [$o info args {*}$args]}
                set posargs {}
                foreach  m [$o ::nsf::methods::object::info::method args {*}$args]  p [$o ::nsf::methods::object::info::method parameter {*}$args] {
                        if {[lindex [string index $p 0] 0] eq "-"} continue
                        lappend posargs $m
                    }
                return $posargs
            }
            "instargdefault" {
                if {[nsf::is class,type=::xotcl::Class $o]} {
                    return [uplevel [list $o info instdefault {*}$args]]
                }
                lassign $args method arg varName
                foreach p [$o info method parameters $method] {
                    lassign $p name default
                    if {$name eq $arg} {
                        uplevel [list set $varName $default]
                        return [expr {[llength $p] == 2}]
                    }
                }
                return 0
            }
            "argdefault" {
                if {[nsf::is object,type=::xotcl::Object $o]} {
                    return [uplevel [list $o info default {*}$args]]
                }
                lassign $args method arg varName
                foreach p [$o info object method parameters $method] {
                    lassign $p name default
                    if {$name eq $arg} {
                        uplevel [list set $varName $default]
                        return [expr {[llength $p] == 2}]
                    }
                }
                return 0
            }

            "array-exists" {
                if {[nsf::is object,type=::xotcl::Object $o]} {return [$o array exists {*}$args]}
                return [$o eval [list array exists :{*}$args]]
            }
            "array-get" {
                if {[nsf::is object,type=::xotcl::Object $o]} {return [$o array get {*}$args]}
                return [$o eval [list array get :{*}$args]]
            }
            "array-set" {
                if {[nsf::is object,type=::xotcl::Object $o]} {return [$o array set {*}$args]}
                return [$o eval [list array set :{*}$args]]
            }
            "set" {
                if {[nsf::is object,type=::xotcl::Object $o]} {return [$o set {*}$args]}
                return [$o eval [list set :[lindex $args 0]]]
            }
            "vars" {
                return [$o ::nsf::methods::object::info::vars]
            }

            "isnxobject" {
                return [nsf::is object,type=::nx::Object $o]
            }
            default {
                error "no idea how to return $what"
            }
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: