[pytango] 152/483: removed old files

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit f7d22a41255526a0b0a5feb0ec20d09dc7011ca0
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Mon Oct 8 12:48:11 2012 +0000

    removed old files
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@21224 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 PyTango/group_element.py | 585 -----------------------------------------------
 setup.py                 |   1 -
 src/group_element.cpp    | 155 -------------
 3 files changed, 741 deletions(-)

diff --git a/PyTango/group_element.py b/PyTango/group_element.py
deleted file mode 100644
index 16c0a36..0000000
--- a/PyTango/group_element.py
+++ /dev/null
@@ -1,585 +0,0 @@
-################################################################################
-##
-## This file is part of PyTango, a python binding for Tango
-## 
-## http://www.tango-controls.org/static/PyTango/latest/doc/html/index.html
-##
-## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
-## 
-## PyTango is free software: you can redistribute it and/or modify
-## it under the terms of the GNU Lesser General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-## 
-## PyTango is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU Lesser General Public License for more details.
-## 
-## You should have received a copy of the GNU Lesser General Public License
-## along with PyTango.  If not, see <http://www.gnu.org/licenses/>.
-##
-################################################################################
-
-"""
-This is an internal PyTango module.
-"""
-
-__all__ = ["group_element_init"]
-
-__docformat__ = "restructuredtext"
-
-import operator
-
-from ._PyTango import StdStringVector, GroupElement
-
-from .utils import document_method as __document_method
-from .utils import seq_2_StdStringVector
-import collections
-
-def __apply_to(fn, key):
-    if isinstance(key, slice):
-        if key.step:
-            return [ fn(x) for x in range(key.start, key.stop, key.step) ]
-        else:
-            return [ fn(x) for x in range(key.start, key.stop) ]
-    else:
-        return fn(key)
-
-def __GroupElement__contains(self, pattern):
-    return self.contains(pattern)
-
-def __GroupElement__get_one_item(self, key):
-    x = self.get_group(key)
-    if x is not None:
-        return x
-    return self.get_device(key)
-    
-def __GroupElement__getitem(self, key):
-    fn = lambda x: __GroupElement__get_one_item(self, x)
-    return __apply_to(fn, key)
-
-def __GroupElement__delitem(self, key):
-    fn = lambda x: self.remove(x)
-    return __apply_to(fn, key)
-
-def __GroupElement__len(self):
-    return self.get_size()
-
-def __GroupElement__add(self, patterns_or_group, timeout_ms=-1):
-    if isinstance(patterns_or_group, GroupElement):
-        return self.__add(patterns_or_group, timeout_ms)
-    elif isinstance(patterns_or_group, StdStringVector):
-        return self.__add(patterns_or_group, timeout_ms)
-    elif isinstance(patterns_or_group, str):
-        return self.__add(patterns_or_group, timeout_ms)
-    elif isinstance(patterns_or_group, collections.Sequence):
-        patterns = seq_2_StdStringVector(patterns_or_group)
-        return self.__add(patterns, timeout_ms)
-    else:
-        raise TypeError('Parameter patterns_or_group: Should be GroupElement, str or a sequence of strings.')
-    
-def __GroupElement__remove(self, patterns, forward=True):
-    if isinstance(patterns, str):
-        return self.__remove(patterns, forward)
-    elif isinstance(patterns, collections.Sequence):
-        std_patterns = seq_2_StdStringVector(patterns)
-        return self.__remove(std_patterns, forward)
-    else:
-        raise TypeError('Parameter patterns: Should be a str or a sequence of str.')
-
-def __GroupElement__comand_inout(self, cmd_name, param=None, forward=True):
-    if param is None:
-        idx = self.command_inout_asynch(cmd_name, forget=False, forward=forward, reserved=-1)
-    else:
-        idx = self.command_inout_asynch(cmd_name, param, forget=False, forward=forward, reserved=-1)
-    return self.command_inout_reply(idx)
-
-def __GroupElement__read_attribute(self, attr_name, forward=True):
-    idx = self.read_attribute_asynch(attr_name, forward, reserved=-1)
-    return self.read_attribute_reply(idx)
-
-def __GroupElement__read_attributes(self, attr_names, forward=True):
-    idx = self.read_attributes_asynch(attr_names, forward, reserved=-1)
-    return self.read_attributes_reply(idx)
-
-def __GroupElement__write_attribute(self, attr_name, value, forward=True):
-    idx = self.write_attribute_asynch(attr_name, value, forward, reserved=-1)
-    return self.write_attribute_reply(idx)
-
-def __init_GroupElement():
-    
-    GroupElement.__contains__ = __GroupElement__contains
-    GroupElement.__getitem__ = __GroupElement__getitem
-    GroupElement.__delitem__ = __GroupElement__delitem
-    GroupElement.__len__ = __GroupElement__len
-
-    GroupElement.add = __GroupElement__add
-    GroupElement.remove = __GroupElement__remove
-    
-    GroupElement.command_inout = __GroupElement__comand_inout
-    GroupElement.read_attribute = __GroupElement__read_attribute
-    GroupElement.read_attributes = __GroupElement__read_attributes
-    GroupElement.write_attribute = __GroupElement__write_attribute
-
-def __doc_GroupElement():
-    def document_method(method_name, desc, append=True):
-        return __document_method(GroupElement, method_name, desc, append)
-    
-    document_method("add", """
-    add(self, patterns, timeout_ms=-1) -> None
-        
-            Attaches any device which name matches one of the specified patterns.
-
-            This method first asks to the Tango database the list of device names
-            matching one the patterns. Devices are then attached to the group in
-            the order in which they are returned by the database.
-
-            Any device already present in the hierarchy (i.e. a device belonging to
-            the group or to one of its subgroups), is silently ignored but its
-            client side timeout is set to timeout_ms milliseconds if timeout_ms
-            is different from -1.
-
-        Parameters :
-            - patterns   : (str | sequence<str>) can be a simple device name or
-                            a device name pattern (e.g. domain_*/ family/member_*),
-                            or a sequence of these.
-            - timeout_ms : (int) If timeout_ms is different from -1, the client
-                            side timeouts of all devices matching the
-                            specified patterns are set to timeout_ms
-                            milliseconds.
-        Return     : None
-
-        Throws     : TypeError, ArgumentError
-    """ )
-
-    document_method("remove", """
-    remove(self, patterns, forward=True) -> None
-        
-            Removes any group or device which name matches the specified pattern. 
-            
-            The pattern parameter can be a group name, a device name or a device
-            name pattern (e.g domain_*/family/member_*).
-            
-            Since we can have groups with the same name in the hierarchy, a group
-            name can be fully qualified to specify which group should be removed.
-            Considering the following group:
-
-                ::
-
-                    -> gauges 
-                    | -> cell-01 
-                    |     |-> penning 
-                    |     |    |-> ...
-                    |     |-> pirani
-                    |          |-> ...
-                    | -> cell-02
-                    |     |-> penning
-                    |     |    |-> ...
-                    |     |-> pirani
-                    |          |-> ...
-                    | -> cell-03
-                    |     |-> ... 
-                    |     
-                    | -> ...  
-            
-            A call to gauges->remove("penning") will remove any group named
-            "penning" in the hierarchy while gauges->remove("gauges.cell-02.penning")
-            will only remove the specified group.
-        
-        Parameters :
-            - patterns   : (str | sequence<str>) A string with the pattern or a
-                           list of patterns.
-            - forward    : (bool) If fwd is set to true (the default), the remove
-                           request is also forwarded to subgroups. Otherwise,
-                           it is only applied to the local set of elements.
-                           For instance, the following code remove any
-                           stepper motor in the hierarchy:
-                           
-                               root_group->remove("*/stepper_motor/*");
-                
-        Return     : None
-        
-        Throws     : 
-    """ )
-
-    document_method("contains", """
-    contains(self, pattern, forward=True) -> bool
-        
-        Parameters :
-            - pattern    : (str) The pattern can be a fully qualified or simple
-                            group name, a device name or a device name pattern.
-            - forward    : (bool) If fwd is set to true (the default), the remove
-                            request is also forwarded to subgroups. Otherwise,
-                            it is only applied to the local set of elements.
-                
-        Return     : (bool) Returns true if the hierarchy contains groups and/or
-                     devices which name matches the specified pattern. Returns
-                     false otherwise.
-        
-        Throws     : 
-    """ )
-
-
-    document_method("get_device", """
-    get_device(self, dev_name) -> DeviceProxy
-    get_device(self, idx) -> DeviceProxy
-
-            Returns a reference to the specified device or None if there is no
-            device by that name in the group. Or, returns a reference to the
-            "idx-th" device in the hierarchy or NULL if the hierarchy contains
-            less than "idx" devices.
-
-            This method may throw an exception in case the specified device belongs
-            to the group but can't be reached (not registered, down...). See example
-            below:
-
-            ::
-
-                try:
-                    dp = g.get_device("my/device/01")
-                    if dp is None:
-                        # my/device/01 does not belong to the group
-                        pass
-                except DevFailed, f:
-                    # my/device/01 belongs to the group but can't be reached
-                    pass
-
-            The request is systematically forwarded to subgroups (i.e. if no device
-            named device_name could be found in the local set of devices, the
-            request is forwarded to subgroups).
-            
-        Parameters :
-            - dev_name    : (str) Device name.
-            - idx         : (int) Device number.
-                
-        Return     : (DeviceProxy) Be aware that this method returns a
-                    different DeviceProxy referring to the same device each time.
-                    So, do not use it directly for permanent things.
-
-        Example:
-                        # WRONG: The DeviceProxy will quickly go out of scope
-                        # and disappear (thus, the event will be automatically
-                        # unsubscribed)
-                        g.get_device("my/device/01").subscribe_events('attr', callback)
-
-                        # GOOD:
-                        dp = g.get_device("my/device/01")
-                        dp.subscribe_events('attr', callback)
-        
-        Throws     : DevFailed
-    """ )
-
-    document_method("get_group", """
-    get_group(self, group_name ) -> Group
-
-            Returns a reference to the specified group or None if there is no group
-            by that name. The group_name can be a fully qualified name.
-
-            Considering the following group:
-
-            ::
-                    
-                -> gauges
-                    |-> cell-01
-                    |    |-> penning
-                    |    |    |-> ... 
-                    |    |-> pirani
-                    |    |-> ... 
-                    |-> cell-02
-                    |    |-> penning
-                    |    |    |-> ...
-                    |    |-> pirani
-                    |    |-> ...
-                    | -> cell-03
-                    |    |-> ...
-                    |
-                    | -> ...  
-
-            A call to gauges.get_group("penning") returns the first group named
-            "penning" in the hierarchy (i.e. gauges.cell-01.penning) while
-            gauges.get_group("gauges.cell-02.penning'') returns the specified group.
-            
-            The request is systematically forwarded to subgroups (i.e. if no group
-            named group_name could be found in the local set of elements, the request
-            is forwarded to subgroups).
-        
-        Parameters :
-            - group_name : (str)
-        
-        Return     : (Group)
-        
-        Throws     :
-        
-        New in PyTango 7.0.0
-    """ )
-
-    
-# Tango methods (~ DeviceProxy interface)
-    document_method("ping", """
-    ping(self, forward=True) -> bool
-
-            Ping all devices in a group.
-        
-        Parameters :
-            - forward    : (bool) If fwd is set to true (the default), the request
-                            is also forwarded to subgroups. Otherwise, it is
-                            only applied to the local set of devices.
-                
-        Return     : (bool) This method returns true if all devices in
-                     the group are alive, false otherwise.
-        
-        Throws     : 
-    """ )
-
-    document_method("set_timeout_millis", """
-    set_timeout_millis(self, timeout_ms) -> bool
-        
-            Set client side timeout for all devices composing the group in
-            milliseconds. Any method which takes longer than this time to execute
-            will throw an exception.
-
-        Parameters :
-            - timeout_ms : (int)
-                
-        Return     : None
-        
-        Throws     : (errors are ignored)
-
-        New in PyTango 7.0.0
-    """ )
-
-    document_method("command_inout_asynch", """
-    command_inout_asynch(self, cmd_name, forget=False, forward=True, reserved=-1 ) -> int
-    command_inout_asynch(self, cmd_name, param=None forget=False, forward=True, reserved=-1 ) -> int
-        
-            Executes a Tango command on each device in the group asynchronously.
-            The method sends the request to all devices and returns immediately.
-            Pass the returned request id to Group.command_inout_reply() to obtain
-            the results.
-
-        Parameters :
-            - cmd_name : (str) Command name
-            - param    : (any)
-            - forget   : (bool) Fire and forget flag. If set to true, it means that
-                            no reply is expected (i.e. the caller does not care
-                            about it and will not even try to get it)
-            - forward  : (bool) If it is set to true (the default) request is
-                            forwarded to subgroups. Otherwise, it is only applied
-                            to the local set of devices.
-            - reserved : (int) is reserved for internal purpose and should not be
-                            used. This parameter may disappear in a near future.
-                
-        Return     : (int) request id. Pass the returned request id to
-                    Group.command_inout_reply() to obtain the results.
-        
-        Throws     :
-    """ )
-
-    document_method("command_inout_reply", """
-    command_inout_reply(self, req_id, timeout_ms=0) -> sequence<GroupCmdReply>
-
-            Returns the results of an asynchronous command.
-
-        Parameters :
-            - req_id     : (int) Is a request identifier previously returned by one
-                            of the command_inout_asynch methods
-            - timeout_ms : (int) For each device in the hierarchy, if the command
-                            result is not yet available, command_inout_reply
-                            wait timeout_ms milliseconds before throwing an
-                            exception. This exception will be part of the
-                            global reply. If timeout_ms is set to 0,
-                            command_inout_reply waits "indefinitely".
-                
-        Return     : (sequence<GroupCmdReply>)
-        
-        Throws     : 
-    """ )
-
-    document_method("command_inout", """
-    command_inout(   self, cmd_name, param=None, forward=True) -> sequence<GroupCmdReply>
-
-            Just a shortcut to do:
-                self.command_inout_reply(self.command_inout_asynch(...))
-
-        Parameters:
-            - cmd_name : (str)
-            - param    : (any)
-            - forward  : (bool)
-
-        Return : (sequence<GroupCmdReply>)
-    """ )
-
-    document_method("read_attribute_asynch", """
-    read_attribute_asynch(self, attr_name, forward=True, reserved=-1 ) -> int
-
-            Reads an attribute on each device in the group asynchronously.
-            The method sends the request to all devices and returns immediately.
-
-        Parameters :
-            - attr_name : (str) Name of the attribute to read.
-            - forward   : (bool) If it is set to true (the default) request is
-                            forwarded to subgroups. Otherwise, it is only applied
-                            to the local set of devices.
-            - reserved  : (int) is reserved for internal purpose and should not be
-                            used. This parameter may disappear in a near future.
-                
-        Return     : (int) request id. Pass the returned request id to
-                    Group.read_attribute_reply() to obtain the results.
-        
-        Throws     :
-    """ )
-
-    document_method("read_attributes_asynch", """
-    read_attributes_asynch(self, attr_names, forward=True, reserved=-1 ) -> int
-
-            Reads the attributes on each device in the group asynchronously.
-            The method sends the request to all devices and returns immediately.
-
-        Parameters :
-            - attr_names : (sequence<str>) Name of the attributes to read.
-            - forward    : (bool) If it is set to true (the default) request is
-                            forwarded to subgroups. Otherwise, it is only applied
-                            to the local set of devices.
-            - reserved   : (int) is reserved for internal purpose and should not be
-                            used. This parameter may disappear in a near future.
-                
-        Return     : (int) request id. Pass the returned request id to
-                    Group.read_attributes_reply() to obtain the results.
-        
-        Throws     :
-    """ )
-
-    document_method("read_attribute_reply", """
-    read_attribute_reply(self, req_id, timeout_ms=0 ) -> sequence<GroupAttrReply>
-
-            Returns the results of an asynchronous attribute reading.
-
-        Parameters :
-            - req_id     : (int) a request identifier previously returned by read_attribute_asynch.
-            - timeout_ms : (int) For each device in the hierarchy, if the attribute
-                            value is not yet available, read_attribute_reply
-                            wait timeout_ms milliseconds before throwing an
-                            exception. This exception will be part of the
-                            global reply. If timeout_ms is set to 0,
-                            read_attribute_reply waits "indefinitely".
-                
-        Return     : (sequence<GroupAttrReply>)
-        
-        Throws     :
-    """ )
-
-    document_method("read_attributes_reply", """
-    read_attributes_reply(self, req_id, timeout_ms=0 ) -> sequence<GroupAttrReply>
-
-            Returns the results of an asynchronous attribute reading.
-
-        Parameters :
-            - req_id     : (int) a request identifier previously returned by read_attribute_asynch.
-            - timeout_ms : (int) For each device in the hierarchy, if the attribute
-                            value is not yet available, read_attribute_reply
-                            wait timeout_ms milliseconds before throwing an
-                            exception. This exception will be part of the
-                            global reply. If timeout_ms is set to 0,
-                            read_attributes_reply waits "indefinitely".
-                
-        Return     : (sequence<GroupAttrReply>)
-        
-        Throws     :
-    """ )
-
-    document_method("read_attribute", """
-    read_attribute(  self, attr_name, forward=True) -> sequence<GroupAttrReply>
-
-            Just a shortcut to do:
-                self.read_attribute_reply(self.read_attribute_asynch(...))
-    """ )
-
-    document_method("read_attributes", """
-    read_attributes( self, attr_names, forward=True) -> sequence<GroupAttrReply>
-
-            Just a shortcut to do:
-                self.read_attributes_reply(self.read_attributes_asynch(...))
-    """ )
-
-    document_method("write_attribute_asynch", """
-    write_attribute_asynch(self, attr_name, value, forward=True, reserved=-1 ) -> int
-
-            Writes an attribute on each device in the group asynchronously.
-            The method sends the request to all devices and returns immediately.
-
-        Parameters :
-            - attr_name : (str) Name of the attribute to write.
-            - value     : (any) Value to write. See DeviceProxy.write_attribute
-            - forward   : (bool) If it is set to true (the default) request is
-                            forwarded to subgroups. Otherwise, it is only applied
-                            to the local set of devices.
-            - reserved  : (int) is reserved for internal purpose and should not
-                            be used. This parameter may disappear in a near
-                            future.
-                
-        Return     : (int) request id. Pass the returned request id to
-                    Group.write_attribute_reply() to obtain the acknowledgements.
-        
-        Throws     :
-    """ )
-        
-    document_method("write_attribute_reply", """
-    write_attribute_reply(self, req_id, timeout_ms=0 ) -> sequence<GroupReply>
-
-            Returns the acknowledgements of an asynchronous attribute writing.
-
-        Parameters :
-            - req_id     : (int) a request identifier previously returned by write_attribute_asynch.
-            - timeout_ms : (int) For each device in the hierarchy, if the acknowledgment
-                            is not yet available, write_attribute_reply
-                            wait timeout_ms milliseconds before throwing an
-                            exception. This exception will be part of the
-                            global reply. If timeout_ms is set to 0,
-                            write_attribute_reply waits "indefinitely".
-                
-        Return     : (sequence<GroupReply>)
-        
-        Throws     :
-    """ )
-        
-    document_method("write_attribute", """
-    write_attribute( self, attr_name, value, forward=True) -> sequence<GroupReply>
-
-            Just a shortcut to do:
-                self.write_attribute_reply(self.write_attribute_asynch(...))
-    """ )
-
-# Misc methods
-    document_method("get_name", """
-        Get the name of the group. Eg: Group('name').get_name() == 'name'
-    """ )
-    document_method("get_fully_qualified_name", """
-        Get the complete (dpt-separated) name of the group. This takes into
-        consideration the name of the group and its parents.
-    """ )
-    document_method("enable", "Enables a group or a device element in a group.")
-    document_method("disable", "Disables a group or a device element in a group.")
-    document_method("is_enabled", "Check if a group is enabled.\nNew in PyTango 7.0.0")
-    document_method("name_equals", "New in PyTango 7.0.0")
-    document_method("name_matches", "New in PyTango 7.0.0")
-    document_method("get_size", """
-    get_size(self, forward=True) -> int
-
-        Parameters :
-            - forward : (bool) If it is set to true (the default), the request is
-                        forwarded to sub-groups.
-                
-        Return     : (int) The number of the devices in the hierarchy
-        
-        Throws     :
-    """ )
-
-# "Should not be used" methods
-    # get_parent(self)
-    
-
-def group_element_init(doc=True):
-    __init_GroupElement()
-    if doc:
-        __doc_GroupElement()
diff --git a/setup.py b/setup.py
index d3fb67d..b8575f4 100644
--- a/setup.py
+++ b/setup.py
@@ -480,7 +480,6 @@ def main():
     client_dir = src_dir
     server_dir = os.path.join(src_dir, 'server')
     _clientfiles = [ os.path.join(client_dir,fname) for fname in os.listdir(client_dir) if fname.endswith('.cpp') ]
-    _clientfiles.remove(os.path.join(client_dir,"group_element.cpp"))
     _clientfiles.sort()
     _serverfiles = [ os.path.join(server_dir,fname) for fname in os.listdir(server_dir) if fname.endswith('.cpp') ]
     _serverfiles.sort()
diff --git a/src/group_element.cpp b/src/group_element.cpp
deleted file mode 100644
index 8378762..0000000
--- a/src/group_element.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
-
-   This file is part of PyTango, a python binding for Tango
-
-   http://www.tango-controls.org/static/PyTango/latest/doc/html/index.html
-
-   Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
-   
-   PyTango is free software: you can redistribute it and/or modify
-   it under the terms of the GNU Lesser General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-   
-   PyTango is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU Lesser General Public License for more details.
-  
-   You should have received a copy of the GNU Lesser General Public License
-   along with PyTango.  If not, see <http://www.gnu.org/licenses/>.
-   
-*******************************************************************************/
-
-#include "precompiled_header.hpp"
-#include "pytgutils.h"
-#include "device_attribute.h"
-
-void export_group_element()
-{
-    using namespace boost::python;
-
-    class_<Tango::GroupElement, unique_pointer<Tango::GroupElement>,
-           boost::noncopyable> GroupElement("GroupElement",
-        "The abstract GroupElement class for Group. Not to be initialized\n"
-        "directly.", no_init)
-    ;
-
-    GroupElement
-    //
-    // Group management methods
-    //
-//        .def("__add",
-//            (void (Tango::GroupElement::*) (const std::string &, int))
-//            &Tango::GroupElement::add,
-//            (arg_("self"), arg_("pattern"), arg_("timeout_ms")=-1) )
-//        .def("__add",
-//            (void (Tango::GroupElement::*) (const std::vector<std::string> &, int))
-//            &Tango::GroupElement::add,
-//            (arg_("self"), arg_("patterns"), arg_("timeout_ms")=-1))
-//        .def("__remove",
-//            (void (Tango::GroupElement::*) (const std::string &, bool))
-//            &Tango::GroupElement::remove,
-//            (arg_("self"), arg_("pattern"), arg_("forward")=true))
-//        .def("__remove",
-//            (void (Tango::GroupElement::*) (const std::vector<std::string> &, bool))
-//            &Tango::GroupElement::remove,
-//            (arg_("self"), arg_("patterns"), arg_("forward")=true))
-        .def("contains",
-            &Tango::GroupElement::contains,
-            (arg_("self"), arg_("pattern"), arg_("forward")=true) )
-        .def("get_device",
-            (Tango::DeviceProxy* (Tango::GroupElement::*) (const std::string &))
-            &Tango::GroupElement::get_device,
-            (arg_("self"), arg_("dev_name")),
-            return_internal_reference<1>() )
-        .def("get_device",
-            (Tango::DeviceProxy* (Tango::GroupElement::*) (long))
-            &Tango::GroupElement::get_device,
-            (arg_("self"), arg_("idx")),
-            return_internal_reference<1>() )
-//        .def("get_group",
-//            &Tango::GroupElement::get_group,
-//            (arg_("self"), arg_("group_name")),
-//            return_internal_reference<1>() )
-
-    //
-    // Tango methods (~ DeviceProxy interface)
-    //
-        .def("ping",
-            pure_virtual(&Tango::GroupElement::ping),
-            (arg_("self"), arg_("forward")=true) )
-        .def("set_timeout_millis",
-            pure_virtual(&Tango::GroupElement::set_timeout_millis),
-            (arg_("self"), arg_("timeout_ms")) )
-
-
-    //
-    // Misc
-    //
-        .def("get_name",
-            &Tango::GroupElement::get_name,
-            (arg_("self")),
-            return_value_policy<copy_const_reference>() )
-        .def("get_fully_qualified_name",
-            &Tango::GroupElement::get_fully_qualified_name,
-            (arg_("self")) )
-        .def("enable",
-            &Tango::GroupElement::enable,
-            (arg_("self")) )
-        .def("disable",
-            &Tango::GroupElement::disable,
-            (arg_("self")) )
-        .def("is_enabled",
-            &Tango::GroupElement::is_enabled,
-            (arg_("self")) )
-        .def("name_equals",
-            &Tango::GroupElement::name_equals,
-            (arg_("self")) )
-        .def("name_matches",
-            &Tango::GroupElement::name_matches,
-            (arg_("self")) )
-//        .def("get_size",
-//            &Tango::GroupElement::get_size,
-//            (arg_("self"), arg_("forward")=true) )
-
-    //
-    // "Should not be used" methods
-    //
-        
-        // According to the header,
-        // The methods are: find, get_parent, set_parent, is_device,
-        // is_group, dump.
-        // I've choosed according to my very personal criteria which are really
-        // needed and which aren't.
-
-        // find looks in both devices and groups, and returns a GroupElement.
-        // Problem is, it is impossible to get DeviceProxy from
-        // GroupDeviceElement (It can be done only by private methods) so
-        // it is useless for us. Our own find can be implemented with
-        // get_device and get_group, and they have different return values
-        // DeviceProxy and Group.
-// 		.def("find",
-// 			&Tango::GroupElement::find,
-// 			(arg_("self"), arg_("pattern?"), arg_("forward")=true ),
-// 			return_internal_reference<1>() )
-
-        // It would return a x.get_group("grp").get_parent() != x
-        // So, as it is not really necessary, we get rid of him...
-//         .def("get_parent",
-//             &Tango::GroupElement::get_parent,
-//             (arg_("self")),
-//             return_internal_reference<1>() )
-
-        // I am not exporting "find", so all the GroupElemens will be
-        // Groups (there's no way to access a GroupDeviceElement)
-//         .def("is_device",
-//             pure_virtual(&Tango::GroupElement::is_device),
-//             (arg_("self")) )
-// 
-//         .def("is_group",
-//             pure_virtual(&Tango::GroupElement::is_group),
-//             (arg_("self")) )
-    ;
-
-}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list