Package schrodinger :: Package infra :: Module mmim :: Class MMIMArgList
[hide private]
[frames] | no frames]

Class MMIMArgList

A class to provide list-like access to MMIM array properties.

Like an actual Python list, indices start at 0, not 1. Unlike a Python list, at this time negative indices and slices are not supported.

Note that while this class requires an MMIM handle, it neither initiates nor terminates the mmim library.

Instance Methods [hide private]
 
__init__(self, handle, key, getter=None, setter=None, list_len=None)
Create an instance from the MMIM handle and key (integer or string).
 
__getitem__(self, index)
 
__setitem__(self, index, value)
 
__len__(self)
 
setSize(self, size)
Set the size of the MMIM argument list.
 
append(self, value)
Append a new value to the current MMIM arglist.
 
__iter__(self)
Class Variables [hide private]
  _set_count_function = {mm.mmim_handle_get_indexed_arg_bool: mm...
Method Details [hide private]

__init__(self, handle, key, getter=None, setter=None, list_len=None)
(Constructor)

 

Create an instance from the MMIM handle and key (integer or string).

Takes functions to get and set indexed values, and a function to determine the length. If these are not provided, they are looked up based on the key provided.

append(self, value)

 

Append a new value to the current MMIM arglist.

Parameters:
  • value (str, int, bool, or float depending on the MMIM arglist type) - The new value to append.

Class Variable Details [hide private]

_set_count_function

Value:
{mm.mmim_handle_get_indexed_arg_bool: mm.mmim_handle_set_indexed_arg_b\
ool_count, mm.mmim_handle_get_indexed_arg_float: mm.mmim_handle_set_in\
dexed_arg_float_count, mm.mmim_handle_get_indexed_arg_int: mm.mmim_han\
dle_set_indexed_arg_int_count, mm.mmim_handle_get_indexed_arg_string: \
mm.mmim_handle_set_indexed_arg_string_count,}