|
| 1 | +VERSION 1.0 CLASS |
| 2 | +BEGIN |
| 3 | + MultiUse = -1 'True |
| 4 | +END |
| 5 | +Attribute VB_Name = "DeclarationDictTestCodemodule" |
| 6 | +Attribute VB_GlobalNameSpace = False |
| 7 | +Attribute VB_Creatable = False |
| 8 | +Attribute VB_PredeclaredId = False |
| 9 | +Attribute VB_Exposed = False |
| 10 | +Option Compare Database |
| 11 | +Option Explicit |
| 12 | + |
| 13 | +'AccUnit:TestRelated |
| 14 | + |
| 15 | +'Implements CodeModulGenerator |
| 16 | + |
| 17 | +Dim AccUnitX As Long |
| 18 | +Private m_AccUnitInfo As String |
| 19 | +Public Field As String |
| 20 | + |
| 21 | +Private Const Const1 As String = "abc" |
| 22 | + |
| 23 | +Private Enum TestEnum: TestEnum_P1 = 2: End Enum |
| 24 | +Private Type TestType1 |
| 25 | + FldA As Long |
| 26 | + FldB As String |
| 27 | + FldC As Boolean |
| 28 | +End Type |
| 29 | + |
| 30 | +Private Enum TestEnum2 |
| 31 | + TestEnum2_P1 = 2 |
| 32 | + TestEnum2_P2 = 3 |
| 33 | +End Enum |
| 34 | + |
| 35 | +Private Type TestType2 |
| 36 | + Fld2A As Long |
| 37 | + Fld2B As String |
| 38 | + FldC As Date |
| 39 | +End Type |
| 40 | + |
| 41 | +Private WithEvents m_TextBox As TextBox |
| 42 | +Attribute m_TextBox.VB_VarHelpID = -1 |
| 43 | + |
| 44 | +Public Event RaiseSomething(ByVal EventParam1 As Variant) |
| 45 | + |
| 46 | +Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As LongPtr) |
| 47 | + |
| 48 | +Private Declare PtrSafe Function CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _ |
| 49 | + (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long) As Long |
| 50 | + |
| 51 | +Public Event RaiseSomething2(ByVal EventParam1 As Variant, ByVal EventParam2 As Variant) |
| 52 | + |
| 53 | +Private Sub Class_Initialize() |
| 54 | +' Dim Class_Initialize_Xyz as String ... ignored! |
| 55 | +End Sub |
| 56 | + |
| 57 | +Public Function AccUnitTestFunct(ByVal FuncParam1 As Variant, FuncParam2() As String) As Variant |
| 58 | + |
| 59 | + Dim FuncVar1 As Variant, FuncVar2 |
| 60 | + Dim FuncVar3() ' _ |
| 61 | + Dim CommentX as String, CommentY As Long |
| 62 | + |
| 63 | + Dim FuncVar4 As Long: FuncVar4 = 5 |
| 64 | + |
| 65 | + Dim Dim1 As Long: Dim Dim2 |
| 66 | + |
| 67 | + Dim Counter2 ' _ |
| 68 | + Public X asString, Y As Long |
| 69 | + |
| 70 | +End Function |
| 71 | + |
| 72 | +Public Sub ProcWith3DeclLines( _ |
| 73 | + ByVal D3P1 As Variant, _ |
| 74 | + ByRef D3P2() As String) |
| 75 | +' |
| 76 | +End Sub |
| 77 | + |
| 78 | +' Declaration of a property procedure in one line: |
| 79 | +Friend Property Get Name1() As String: Name1 = "TestName": End Property |
| 80 | + |
| 81 | +Friend Property Let Name2(ByVal NewValue As String) |
| 82 | +' |
| 83 | +End Property |
| 84 | + |
| 85 | +Friend Property Set PropertySet(ByVal ObjRef As Object) |
| 86 | +' |
| 87 | +End Property |
| 88 | + |
| 89 | +Private Sub TestMe() ' _ |
| 90 | +Private Sub ThisIsOnlyAComment( |
| 91 | + |
| 92 | +End Sub |
| 93 | + |
| 94 | +Public Sub VariableParams(ParamArray Args() As Variant) |
| 95 | +' |
| 96 | +End Sub |
| 97 | + |
| 98 | +Private Static Sub MyStaticSub(Optional ByVal Reset As Boolean = False) |
| 99 | + Static Counter2 As Integer |
| 100 | +End Sub |
| 101 | + |
| 102 | + |
| 103 | +Private Function CodeModulGenerator_CreateCodemodule(ByVal ComponentType As VBIDE.vbext_ComponentType, Optional ByVal Name As String = vbNullString) As VBIDE.VBComponent |
| 104 | +' |
| 105 | +End Function |
| 106 | + |
| 107 | +Private Sub CodeModulGenerator_InsertDeclarationLine(ByVal Code As String) |
| 108 | +' |
| 109 | +End Sub |
| 110 | + |
| 111 | +Private Sub CodeModulGenerator_RemoveCodemodule() |
| 112 | +' |
| 113 | +End Sub |
0 commit comments