| 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. |
| 4 | |
| 5 | |
| 6 | |
| 7 | #ifndef _SIGFORMAT_H |
| 8 | #define _SIGFORMAT_H |
| 9 | |
| 10 | #include "invokeutil.h" |
| 11 | #include "field.h" |
| 12 | |
| 13 | #define SIG_INC 256 |
| 14 | |
| 15 | class SigFormat |
| 16 | { |
| 17 | public: |
| 18 | SigFormat(); |
| 19 | |
| 20 | //@GENERICS: the owning type handle is required because pMeth may be shared between instantiations |
| 21 | SigFormat(MethodDesc* pMeth, TypeHandle owner, BOOL fIgnoreMethodName = false); |
| 22 | SigFormat(MetaSig &metaSig, LPCUTF8 memberName, LPCUTF8 className = NULL, LPCUTF8 ns = NULL); |
| 23 | |
| 24 | ~SigFormat(); |
| 25 | |
| 26 | const char * GetCString(); |
| 27 | const char * GetCStringParmsOnly(); |
| 28 | |
| 29 | void AddType(TypeHandle th); |
| 30 | |
| 31 | protected: |
| 32 | void FormatSig(MetaSig &metaSig, LPCUTF8 memberName, LPCUTF8 className = NULL, LPCUTF8 ns = NULL); |
| 33 | |
| 34 | char* _fmtSig; |
| 35 | size_t _size; |
| 36 | size_t _pos; |
| 37 | |
| 38 | void AddString(LPCUTF8 s); |
| 39 | void AddTypeString(Module* pModule, SigPointer sig, const SigTypeContext *pTypeContext); |
| 40 | |
| 41 | }; |
| 42 | |
| 43 | #endif // _SIGFORMAT_H |
| 44 | |