github.com/hspan/go-ole@v0.0.0/vt_string.go (about)

     1  // generated by stringer -output vt_string.go -type VT; DO NOT EDIT
     2  
     3  package ole
     4  
     5  import "fmt"
     6  
     7  const (
     8  	_VT_name_0 = "VT_EMPTYVT_NULLVT_I2VT_I4VT_R4VT_R8VT_CYVT_DATEVT_BSTRVT_DISPATCHVT_ERRORVT_BOOLVT_VARIANTVT_UNKNOWNVT_DECIMAL"
     9  	_VT_name_1 = "VT_I1VT_UI1VT_UI2VT_UI4VT_I8VT_UI8VT_INTVT_UINTVT_VOIDVT_HRESULTVT_PTRVT_SAFEARRAYVT_CARRAYVT_USERDEFINEDVT_LPSTRVT_LPWSTR"
    10  	_VT_name_2 = "VT_RECORDVT_INT_PTRVT_UINT_PTR"
    11  	_VT_name_3 = "VT_FILETIMEVT_BLOBVT_STREAMVT_STORAGEVT_STREAMED_OBJECTVT_STORED_OBJECTVT_BLOB_OBJECTVT_CFVT_CLSID"
    12  	_VT_name_4 = "VT_BSTR_BLOBVT_VECTOR"
    13  	_VT_name_5 = "VT_ARRAY"
    14  	_VT_name_6 = "VT_BYREF"
    15  	_VT_name_7 = "VT_RESERVED"
    16  	_VT_name_8 = "VT_ILLEGAL"
    17  )
    18  
    19  var (
    20  	_VT_index_0 = [...]uint8{0, 8, 15, 20, 25, 30, 35, 40, 47, 54, 65, 73, 80, 90, 100, 110}
    21  	_VT_index_1 = [...]uint8{0, 5, 11, 17, 23, 28, 34, 40, 47, 54, 64, 70, 82, 91, 105, 113, 122}
    22  	_VT_index_2 = [...]uint8{0, 9, 19, 30}
    23  	_VT_index_3 = [...]uint8{0, 11, 18, 27, 37, 55, 71, 85, 90, 98}
    24  	_VT_index_4 = [...]uint8{0, 12, 21}
    25  	_VT_index_5 = [...]uint8{0, 8}
    26  	_VT_index_6 = [...]uint8{0, 8}
    27  	_VT_index_7 = [...]uint8{0, 11}
    28  	_VT_index_8 = [...]uint8{0, 10}
    29  )
    30  
    31  func (i VT) String() string {
    32  	switch {
    33  	case 0 <= i && i <= 14:
    34  		return _VT_name_0[_VT_index_0[i]:_VT_index_0[i+1]]
    35  	case 16 <= i && i <= 31:
    36  		i -= 16
    37  		return _VT_name_1[_VT_index_1[i]:_VT_index_1[i+1]]
    38  	case 36 <= i && i <= 38:
    39  		i -= 36
    40  		return _VT_name_2[_VT_index_2[i]:_VT_index_2[i+1]]
    41  	case 64 <= i && i <= 72:
    42  		i -= 64
    43  		return _VT_name_3[_VT_index_3[i]:_VT_index_3[i+1]]
    44  	case 4095 <= i && i <= 4096:
    45  		i -= 4095
    46  		return _VT_name_4[_VT_index_4[i]:_VT_index_4[i+1]]
    47  	case i == 8192:
    48  		return _VT_name_5
    49  	case i == 16384:
    50  		return _VT_name_6
    51  	case i == 32768:
    52  		return _VT_name_7
    53  	case i == 65535:
    54  		return _VT_name_8
    55  	default:
    56  		return fmt.Sprintf("VT(%d)", i)
    57  	}
    58  }