VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Module"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Private p_strFullText           As String
Private p_lngModuleType         As Long
Private p_blnExported           As Boolean
Private p_codCodeModule         As VBIDE.CodeModule
Private p_colProcedures         As CallTree.Procedures
Private p_cvbCustomVBProject    As CallTree.CustomVBProject

Public Name As String

Public Property Set CodeModule(codCodeModule As VBIDE.CodeModule)
    ' Sets reference to CodeModule object associated
    ' with this module.
    Set p_codCodeModule = codCodeModule
End Property

Public Property Get CodeModule() As VBIDE.CodeModule
    ' Returns reference to CodeModule object associated
    ' with this module.
    Set CodeModule = p_codCodeModule
End Property

Public Property Let FullText(strFullText As String)
    ' Stores full text of module.
    p_strFullText = strFullText
End Property

Public Property Get FullText() As String
    ' Returns full text of module.
    FullText = p_strFullText
End Property

Public Property Let ModuleType(lngModuleType As vbext_ComponentType)
    ' Stores type of component.
    p_lngModuleType = lngModuleType
End Property

Public Property Get ModuleType() As vbext_ComponentType
    ' Returns type of component.
    ModuleType = p_lngModuleType
End Property

Public Property Set Parent(cvbCustomVBProject As CallTree.CustomVBProject)
    ' Parent property for Module object stores reference to
    ' CustomVBProject object.
    Set p_cvbCustomVBProject = cvbCustomVBProject
End Property

Public Property Get Parent() As CallTree.CustomVBProject
    ' Parent property for Module object returns reference to
    ' CustomVBProject object.
    Set Parent = p_cvbCustomVBProject
End Property

Public Property Let Exported(blnExported As Boolean)
    ' Indicates whether module has been exported.
    p_blnExported = blnExported
End Property

Public Property Get Exported() As Boolean
    ' Indicates whether module has been exported.
    Exported = p_blnExported
End Property

Public Property Set Procedures(colProcedures As CallTree.Procedures)
    ' Sets reference to module's Procedures collection.
    Set p_colProcedures = colProcedures
End Property

Public Property Get Procedures() As CallTree.Procedures
    ' Returns reference to module's Procedures collection.
    Set Procedures = p_colProcedures
End Property

Private Sub Class_Initialize()
    ' Create new Procedures collection for this module.
    Set Me.Procedures = New Procedures
    
    ' Set Parent property for this module's Procedures collection.
    Set Me.Procedures.Parent = Me
    
    ' Set Exported property to False.
    Me.Exported = False
End Sub
