Z3 |

ASTMap.java
Go to the documentation of this file.
1
18 package com.microsoft.z3;
19
23 class ASTMap extends Z3Object {
31 public boolean contains(AST k)
32 {
33
34 return Native.astMapContains(getContext().nCtx(), getNativeObject(),
35 k.getNativeObject());
36 }
37
46 public AST find(AST k)
47 {
48 return new AST(getContext(), Native.astMapFind(getContext().nCtx(),
49 getNativeObject(), k.getNativeObject()));
50 }
51
57 public void insert(AST k, AST v)
58 {
59
60 Native.astMapInsert(getContext().nCtx(), getNativeObject(), k.getNativeObject(),
61 v.getNativeObject());
62 }
63
68 public void erase(AST k)
69 {
70 Native.astMapErase(getContext().nCtx(), getNativeObject(), k.getNativeObject());
71 }
72
76 public void reset()
77 {
78 Native.astMapReset(getContext().nCtx(), getNativeObject());
79 }
80
84 public int size()
85 {
86 return Native.astMapSize(getContext().nCtx(), getNativeObject());
87 }
88
94 public AST[] getKeys()
95 {
96 ASTVector av = new ASTVector(getContext(), Native.astMapKeys(getContext().nCtx(), getNativeObject()));
97 return av.ToArray();
98 }
99
103 @Override
104 public String toString()
105 {
106 return Native.astMapToString(getContext().nCtx(), getNativeObject());
107 }
108
109 ASTMap(Context ctx, long obj)
110 {
111 super(ctx, obj);
112 }
113
114 ASTMap(Context ctx)
115 {
116 super(ctx, Native.mkAstMap(ctx.nCtx()));
117 }
118
119 @Override
120 void incRef() {
121 Native.astMapIncRef(getContext().nCtx(), getNativeObject());
122 }
123
124 @Override
125 void addToReferenceQueue() {
126 getContext().getASTMapDRQ().storeReference(getContext(), this);
127 }
128}
com.microsoft.z3.Context.getASTMapDRQ
IDecRefQueue< ASTMap > getASTMapDRQ()
Definition: Context.java:4075
com.microsoft.z3.IDecRefQueue.storeReference
void storeReference(Context ctx, T obj)
Definition: IDecRefQueue.java:56
z3py.String
def String(name, ctx=None)
Definition: z3py.py:10693