summaryrefslogtreecommitdiff
path: root/src/vm/sigformat.h
blob: 1bcd6c331095aef8cff77a51fc00785834638cdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.



#ifndef _SIGFORMAT_H
#define _SIGFORMAT_H

#include "invokeutil.h"
#include "field.h"

#define SIG_INC 256

class SigFormat
{
public:
    SigFormat();

        //@GENERICS: the owning type handle is required because pMeth may be shared between instantiations
    SigFormat(MethodDesc* pMeth, TypeHandle owner, BOOL fIgnoreMethodName = false);
    SigFormat(MetaSig &metaSig, LPCUTF8 memberName, LPCUTF8 className = NULL, LPCUTF8 ns = NULL);

    ~SigFormat();

    const char * GetCString();
    const char * GetCStringParmsOnly();

    void AddType(TypeHandle th);

protected:
    void FormatSig(MetaSig &metaSig, LPCUTF8 memberName, LPCUTF8 className = NULL, LPCUTF8 ns = NULL);

    char*       _fmtSig;
    size_t      _size;
    size_t      _pos;

    void AddString(LPCUTF8 s);
    void AddTypeString(Module* pModule, SigPointer sig, const SigTypeContext *pTypeContext);

};

#endif // _SIGFORMAT_H