Rhino.UintMap.Put C# (CSharp) Method

Put() public method

Set int value of the key.
Set int value of the key. If key does not exist, also set its object value to null.
public Put ( int key, int value ) : void
key int
value int
return void
		public virtual void Put(int key, int value)
		{
			if (key < 0)
			{
				Kit.CodeBug();
			}
			int index = EnsureIndex(key, true);
			if (ivaluesShift == 0)
			{
				int N = 1 << power;
				// keys.length can be N * 2 after clear which set ivaluesShift to 0
				if (keys.Length != N * 2)
				{
					int[] tmp = new int[N * 2];
					System.Array.Copy(keys, 0, tmp, 0, N);
					keys = tmp;
				}
				ivaluesShift = N;
			}
			keys[ivaluesShift + index] = value;
		}

Same methods

UintMap::Put ( int key, object value ) : void

Usage Example

Example #1
0
		/// <param name="indent">How much to indent the decompiled result</param>
		/// <param name="flags">Flags specifying format of decompilation output</param>
		internal sealed override string Decompile(int indent, int flags)
		{
			string encodedSource = GetEncodedSource();
			if (encodedSource == null)
			{
				return base.Decompile(indent, flags);
			}
			else
			{
				UintMap properties = new UintMap(1);
				properties.Put(Decompiler.INITIAL_INDENT_PROP, indent);
				return Decompiler.Decompile(encodedSource, flags, properties);
			}
		}
All Usage Examples Of Rhino.UintMap::Put