當前位置: 首頁>>代碼示例>>Python>>正文


Python ConfigBlock.c_ptr_type方法代碼示例

本文整理匯總了Python中vital.ConfigBlock.c_ptr_type方法的典型用法代碼示例。如果您正苦於以下問題:Python ConfigBlock.c_ptr_type方法的具體用法?Python ConfigBlock.c_ptr_type怎麽用?Python ConfigBlock.c_ptr_type使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vital.ConfigBlock的用法示例。


在下文中一共展示了ConfigBlock.c_ptr_type方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_config

# 需要導入模塊: from vital import ConfigBlock [as 別名]
# 或者: from vital.ConfigBlock import c_ptr_type [as 別名]
    def get_config(self, cb=None):
        """
        Return this algorithm's current configuration.

        As algorithms are named, the configuration returned will be contained
        inside a sub-block whose name matches this algorithm's name in order
        to separate

        :param cb: An optional existing ConfigBlock instance to add this
            algorithm's configuration to.
        :type cb: ConfigBlock

        :return: This named algorithm's current configuration. If a config block
            was given to this method, the same config block is returned.
        :rtype: vital.ConfigBlock

        """
        if cb is None:
            cb = ConfigBlock()

        self._call_cfunc(
            'vital_algorithm_%s_get_type_config' % self.type_name(),
            [ctypes.c_char_p, self.C_TYPE_PTR, ConfigBlock.c_ptr_type()],
            [self.name, self, cb],
            ConfigBlock.c_ptr_type()
        )

        return cb
開發者ID:Kitware,項目名稱:kwiver,代碼行數:30,代碼來源:algorithm.py

示例2: check_config

# 需要導入模塊: from vital import ConfigBlock [as 別名]
# 或者: from vital.ConfigBlock import c_ptr_type [as 別名]
    def check_config(self, cb):
        """
        Check the given configuration block for valid algorithm configuration

        :param cb: Configuration to check.
        :type cb: ConfigBlock

        :return: True if the given configuration block contains a valid
            configuration for this algorithm type and implementation.
        :rtype: bool

        """
        return self._call_cfunc(
            'vital_algorithm_%s_check_type_config' % self.type_name(),
            [ctypes.c_char_p, ConfigBlock.c_ptr_type()],
            [self.name, cb],
            ctypes.c_bool
        )
開發者ID:Kitware,項目名稱:kwiver,代碼行數:20,代碼來源:algorithm.py


注:本文中的vital.ConfigBlock.c_ptr_type方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。