Welcome to mirror list, hosted at ThFree Co, Russian Federation.

weakreferencenative.h « vm « coreclr « src - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 387d6df2e25248df90979a05e895632d93435ac2 (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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

/*============================================================
**
** Header: WeakReferenceNative.h
**
**
===========================================================*/

#ifndef _WEAKREFERENCENATIVE_H
#define _WEAKREFERENCENATIVE_H

//
// The implementations of WeakReferenceNative and WeakReferenceOfTNative are identical, but the managed signatures
// are different. WeakReferenceOfTNative has strongly typed signatures. It is necessary for correct security transparancy
// annotations without compromising inlining (security critical code cannot be inlined into security neutral code).
//

class WeakReferenceNative
{
public:
    static FCDECL3(void, Create, WeakReferenceObject * pThis, Object * pTarget, CLR_BOOL trackResurrection);
    static FCDECL1(void, Finalize, WeakReferenceObject * pThis);
    static FCDECL1(Object *, GetTarget, WeakReferenceObject * pThis);
    static FCDECL2(void, SetTarget, WeakReferenceObject * pThis, Object * pTarget);
    static FCDECL1(FC_BOOL_RET, IsTrackResurrection, WeakReferenceObject * pThis);
    static FCDECL1(FC_BOOL_RET, IsAlive, WeakReferenceObject * pThis);
};

class WeakReferenceOfTNative
{
public:
    static FCDECL3(void, Create, WeakReferenceObject * pThis, Object * pTarget, CLR_BOOL trackResurrection);
    static FCDECL1(void, Finalize, WeakReferenceObject * pThis);
    static FCDECL1(Object *, GetTarget, WeakReferenceObject * pThis);
    static FCDECL2(void, SetTarget, WeakReferenceObject * pThis, Object * pTarget);
    static FCDECL1(FC_BOOL_RET, IsTrackResurrection, WeakReferenceObject * pThis);
};

#endif // _WEAKREFERENCENATIVE_H