コード例 #1
0
ファイル: class_wrapper.py プロジェクト: ISoirar/pypp11
    def add_registration_code(self, code, works_on_instance=True, tail=True):
        """adds the code to the class registration section

        :param works_on_instance: If true, the custom code can be applied directly to obj inst. Example: ObjInst.code
        :type works_on_instance: bool

        :param tail: if True, the custom code is appended to the end of the class registration code.
        :type tail: bool
        """
        if tail:
            self.registration_code_tail.append(user_text.class_user_text_t(code, works_on_instance))
        else:
            self.registration_code_head.append(user_text.class_user_text_t(code, works_on_instance))
コード例 #2
0
    def add_registration_code(self, code, works_on_instance=True, tail=True):
        """adds the code to the class registration section

        :param works_on_instance: If true, the custom code can be applied directly to obj inst. Example: ObjInst.code
        :type works_on_instance: bool

        :param tail: if True, the custom code is appended to the end of the class registration code.
        :type tail: bool
        """
        if tail:
            self.registration_code_tail.append(
                user_text.class_user_text_t(code, works_on_instance))
        else:
            self.registration_code_head.append(
                user_text.class_user_text_t(code, works_on_instance))
コード例 #3
0
    def add_registration_code( self, code, works_on_instance=True ):
        """adds the code to the class registration section

        works_on_instance: If true, the custom code can be applied directly to obj inst.
        Example: ObjInst."CustomCode"
        """
        self.registration_code.append( user_text.class_user_text_t( code, works_on_instance ) )
コード例 #4
0
ファイル: class_wrapper.py プロジェクト: tfepam/tce
    def add_registration_code(self, code, works_on_instance=True):
        """adds the code to the class registration section

        works_on_instance: If true, the custom code can be applied directly to obj inst.
        Example: ObjInst."CustomCode"
        """
        self.registration_code.append(
            user_text.class_user_text_t(code, works_on_instance))