1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
12 class PermissionSetDecl;
14 extern unsigned int g_uCodePage;
15 extern WCHAR wzUniBuf[];
25 mdTypeRef m_crExtends;
26 mdTypeRef *m_crImplements;
30 DWORD m_dwNumInterfaces;
31 DWORD m_dwNumFieldsWithOffset;
32 PermissionDecl* m_pPermissions;
33 PermissionSetDecl* m_pPermissionSets;
40 MethodList m_MethodList;
41 //MethodSortedList m_MethodSList;
42 FieldDList m_FieldDList;
43 EventDList m_EventDList;
44 PropDList m_PropDList;
45 CustomDescrList m_CustDList;
51 m_crExtends = mdTypeRefNil;
54 m_dwNumInterfaces = 0;
55 m_dwNumFieldsWithOffset = 0;
56 m_crImplements = NULL;
58 m_dwFQN = pszFQN ? (DWORD)strlen(pszFQN) : 0;
59 m_Hash = pszFQN ? hash((const BYTE*)pszFQN, m_dwFQN, 10) : 0;
66 m_pPermissions = NULL;
67 m_pPermissionSets = NULL;
70 m_ulSize = 0xFFFFFFFF;
76 delete [] m_crImplements;
80 int FindTyPar(LPCWSTR wz)
83 for(i=0; i < (int)m_NumTyPars; i++)
85 if(!wcscmp(wz,m_TyPars[i].Name()))
93 int FindTyPar(LPCUTF8 sz)
98 WszMultiByteToWideChar(g_uCodePage,0,sz,-1,wzUniBuf,dwUniBuf);
99 return FindTyPar(wzUniBuf);
103 int ComparedTo(Class* T)
105 if (m_Hash == T->m_Hash)
107 // Properly handle hash conflict
108 return (m_szFQN == T->m_szFQN) ? 0 : strcmp(m_szFQN, T->m_szFQN);
111 return (m_Hash > T->m_Hash) ? 1 : -1;
117 #endif /* _CLASS_HPP */