casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
tableindex.py
Go to the documentation of this file.
00001 # This file was automatically generated by SWIG (http://www.swig.org).
00002 # Version 2.0.5
00003 #
00004 # Do not make changes to this file unless you know what you are doing--modify
00005 # the SWIG interface file instead.
00006 
00007 
00008 
00009 from sys import version_info
00010 if version_info >= (2,6,0):
00011     def swig_import_helper():
00012         from os.path import dirname
00013         import imp
00014         fp = None
00015         try:
00016             fp, pathname, description = imp.find_module('_tableindex', [dirname(__file__)])
00017         except ImportError:
00018             import _tableindex
00019             return _tableindex
00020         if fp is not None:
00021             try:
00022                 _mod = imp.load_module('_tableindex', fp, pathname, description)
00023             finally:
00024                 fp.close()
00025             return _mod
00026     _tableindex = swig_import_helper()
00027     del swig_import_helper
00028 else:
00029     import _tableindex
00030 del version_info
00031 try:
00032     _swig_property = property
00033 except NameError:
00034     pass # Python < 2.2 doesn't have 'property'.
00035 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
00036     if (name == "thisown"): return self.this.own(value)
00037     if (name == "this"):
00038         if type(value).__name__ == 'SwigPyObject':
00039             self.__dict__[name] = value
00040             return
00041     method = class_type.__swig_setmethods__.get(name,None)
00042     if method: return method(self,value)
00043     if (not static):
00044         self.__dict__[name] = value
00045     else:
00046         raise AttributeError("You cannot add attributes to %s" % self)
00047 
00048 def _swig_setattr(self,class_type,name,value):
00049     return _swig_setattr_nondynamic(self,class_type,name,value,0)
00050 
00051 def _swig_getattr(self,class_type,name):
00052     if (name == "thisown"): return self.this.own()
00053     method = class_type.__swig_getmethods__.get(name,None)
00054     if method: return method(self)
00055     raise AttributeError(name)
00056 
00057 def _swig_repr(self):
00058     try: strthis = "proxy of " + self.this.__repr__()
00059     except: strthis = ""
00060     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
00061 
00062 try:
00063     _object = object
00064     _newclass = 1
00065 except AttributeError:
00066     class _object : pass
00067     _newclass = 0
00068 
00069 
00070 class tableindex(_object):
00071     """Proxy of C++ casac::tableindex class"""
00072     __swig_setmethods__ = {}
00073     __setattr__ = lambda self, name, value: _swig_setattr(self, tableindex, name, value)
00074     __swig_getmethods__ = {}
00075     __getattr__ = lambda self, name: _swig_getattr(self, tableindex, name)
00076     __repr__ = _swig_repr
00077     def __init__(self): 
00078         """__init__(self) -> tableindex"""
00079         this = _tableindex.new_tableindex()
00080         try: self.this.append(this)
00081         except: self.this = this
00082     __swig_destroy__ = _tableindex.delete_tableindex
00083     __del__ = lambda self : None;
00084     def set(self, *args, **kwargs):
00085         """
00086         set(self, tab, columns, sort=True) -> bool
00087 
00088         Summary
00089                 Set table and columns to be indexed
00090 
00091         Input Parameters:
00092                 tab              table to be indexed, wants a table tool 
00093                 columns          column names 
00094                 sort             is a sort of the key values needed? true 
00095                 
00096         --------------------------------------------------------------------------------
00097                       
00098         """
00099         return _tableindex.tableindex_set(self, *args, **kwargs)
00100 
00101     def isunique(self):
00102         """
00103         isunique(self) -> bool
00104 
00105         Summary
00106                 Are all key values in the index unique?
00107         --------------------------------------------------------------------------------
00108                       
00109         """
00110         return _tableindex.tableindex_isunique(self)
00111 
00112     def setchanged(self, *args, **kwargs):
00113         """
00114         setchanged(self, columns=std::vector< string >(1, "")) -> bool
00115 
00116         Summary
00117                 Tell the index that columns have changed
00118 
00119         Input Parameters:
00120                 columns          names of changed columns all 
00121                 
00122         --------------------------------------------------------------------------------
00123                       
00124         """
00125         return _tableindex.tableindex_setchanged(self, *args, **kwargs)
00126 
00127     def rownr(self, *args, **kwargs):
00128         """
00129         rownr(self, key) -> int
00130 
00131         Summary
00132                 Find the row number matching the search value
00133 
00134         Input Parameters:
00135                 key              search value 
00136                 
00137         --------------------------------------------------------------------------------
00138                       
00139         """
00140         return _tableindex.tableindex_rownr(self, *args, **kwargs)
00141 
00142     def rownrs(self, *args, **kwargs):
00143         """
00144         rownrs(self, key, upperkey=initialize_record("0"), lowerincl=True, upperincl=True) -> std::vector< int >
00145 
00146         Summary
00147                 Find the row numbers matching search values
00148 
00149         Input Parameters:
00150                 key              search value 
00151                 upperkey         end of search interval 0 
00152                 lowerincl        include lower boundary true 
00153                 upperincl        include upper boundary? true 
00154                 
00155         --------------------------------------------------------------------------------
00156                       
00157         """
00158         return _tableindex.tableindex_rownrs(self, *args, **kwargs)
00159 
00160     def close(self):
00161         """
00162         close(self) -> bool
00163 
00164         Summary
00165                 Close the tableindex
00166         --------------------------------------------------------------------------------
00167                       
00168         """
00169         return _tableindex.tableindex_close(self)
00170 
00171     def done(self):
00172         """
00173         done(self) -> bool
00174 
00175         Summary
00176                 End the tableindex tool
00177         --------------------------------------------------------------------------------
00178                       
00179         """
00180         return _tableindex.tableindex_done(self)
00181 
00182 tableindex_swigregister = _tableindex.tableindex_swigregister
00183 tableindex_swigregister(tableindex)
00184 
00185 # This file is compatible with both classic and new-style classes.
00186 
00187