~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to doc/python_api/alternative/datatypes.py

  • Committer: Bazaar Package Importer
  • Author(s): Kevin Roy
  • Date: 2011-02-08 22:20:54 UTC
  • mfrom: (1.4.2 upstream)
  • mto: (14.2.6 sid) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: james.westby@ubuntu.com-20110208222054-kk0gwa4bu8h5lyq4
Tags: upstream-2.56.1-beta-svn34076
ImportĀ upstreamĀ versionĀ 2.56.1-beta-svn34076

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
# ##### BEGIN GPL LICENSE BLOCK #####
 
3
#
 
4
#  This program is free software; you can redistribute it and/or
 
5
#  modify it under the terms of the GNU General Public License
 
6
#  as published by the Free Software Foundation; either version 2
 
7
#  of the License, or (at your option) any later version.
 
8
#
 
9
#  This program is distributed in the hope that it will be useful,
 
10
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
#  GNU General Public License for more details.
 
13
#
 
14
#  You should have received a copy of the GNU General Public License
 
15
#  along with this program; if not, write to the Free Software Foundation,
 
16
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
17
#
 
18
# ##### END GPL LICENSE BLOCK #####
 
19
 
 
20
class DocObj:
 
21
        def __init__(self, name):
 
22
                self.name = name
 
23
                self.parent = None
 
24
                self.description = "Undocumented"
 
25
                self.warnings = []
 
26
                self.notes = []
 
27
                self.seealsos = []
 
28
                self.deprecateds = []
 
29
        def fullname(self):
 
30
                name = self.name
 
31
                obj = self.parent
 
32
                while obj:
 
33
                        name = obj.name + "." + name
 
34
                        obj = obj.parent
 
35
                return name
 
36
 
 
37
class Module(DocObj):
 
38
        def __init__(self, name, short_desc):
 
39
                DocObj.__init__(self, name)
 
40
                self.classes = {}
 
41
                self.dates = {}
 
42
                self.functions = {}
 
43
                self.short_desc = short_desc
 
44
 
 
45
class Class(DocObj):
 
46
        def __init__(self, name, parent):
 
47
                DocObj.__init__(self, name)
 
48
                self.parent = parent
 
49
                self.methods = {}
 
50
                self.attributes = {}
 
51
                self.base = None
 
52
 
 
53
class Data(DocObj):
 
54
        def __init__(self, name, parent, value = None):
 
55
                DocObj.__init__(self, name)
 
56
                self.parent = parent
 
57
                self.value = value
 
58
 
 
59
class Function(DocObj):
 
60
        def __init__(self, name, parent):
 
61
                DocObj.__init__(self, name)
 
62
                self.parent = parent
 
63
                self.arguments = []
 
64
                self.return_values = []
 
65
                self.location = None
 
66
                self.decorator = ""
 
67
 
 
68
class Attribute(DocObj):
 
69
        def __init__(self, name, parent, _type = None):
 
70
                DocObj.__init__(self, name)
 
71
                self.parent = parent
 
72
                self._type = _type
 
73
                self.readonly = False
 
74
 
 
75
class Argument:
 
76
        def __init__(self, name, default = None):
 
77
                self.name = name
 
78
                self.description = "Undocumented"
 
79
                self._type = "Undocumented"
 
80
                self.default = default
 
81
 
 
82
class ReturnValue:
 
83
        def __init__(self, name):
 
84
                self.name = name
 
85
                self.description = "Undocumented"
 
86
                self._type = "Undocumented"