Skip to content

Commit

Permalink
Add attribute documentation to Component class
Browse files Browse the repository at this point in the history
  • Loading branch information
rakhimov committed Oct 10, 2016
1 parent d2d7f74 commit 7347611
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion cppdep.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,30 @@ def find(path, fnmatcher):


class Component(object):
"""Representation of a component in a package.
Attributes:
name: A unique name as an identifier of the component.
hpath: The path to the header file of the component.
cpath: The path to the implementation file of the component.
package: (group_name, pkg_name)
dep_internal_hfiles: Internal header files the component depends upon.
dep_external_hfiles: External header files the component depends upon.
dep_external_pkgs: External packages the component depends upon.
"""

def __init__(self, name, hpath, cpath):
self.package = ('anonymous', 'anonymous')
"""Initialization of a free-standing component.
Args:
name: A unique identifier name for the component.
hpath: The path to the header file of the component.
cpath: The path to the implementation file of the component.
"""
self.name = name
self.hpath = hpath
self.cpath = cpath
self.package = ('anonymous', 'anonymous') # TODO: Reason for defaults?
self.dep_internal_hfiles = set()
self.dep_external_hfiles = set()
self.dep_components = set()
Expand Down

0 comments on commit 7347611

Please sign in to comment.