1    /* ====================================================================
2     * The Apache Software License, Version 1.1
3     *
4     * Copyright (c) 2000 The Apache Software Foundation.  All rights
5     * reserved.
6     *
7     * Redistribution and use in source and binary forms, with or without
8     * modification, are permitted provided that the following conditions
9     * are met:
10    *
11    * 1. Redistributions of source code must retain the above copyright
12    *    notice, this list of conditions and the following disclaimer.
13    *
14    * 2. Redistributions in binary form must reproduce the above copyright
15    *    notice, this list of conditions and the following disclaimer in
16    *    the documentation and/or other materials provided with the
17    *    distribution.
18    *
19    * 3. The end-user documentation included with the redistribution,
20    *    if any, must include the following acknowledgment:
21    *       "This product includes software developed by the
22    *        Apache Software Foundation (http://www.apache.org/)."
23    *    Alternately, this acknowledgment may appear in the software itself,
24    *    if and wherever such third-party acknowledgments normally appear.
25    *
26    * 4. The names "Apache" and "Apache Software Foundation" must
27    *    not be used to endorse or promote products derived from this
28    *    software without prior written permission. For written
29    *    permission, please contact apache@apache.org.
30    *
31    * 5. Products derived from this software may not be called "Apache",
32    *    nor may "Apache" appear in their name, without prior written
33    *    permission of the Apache Software Foundation.
34    *
35    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
36    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38    * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
39    * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41    * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
42    * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43    * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44    * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
45    * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46    * SUCH DAMAGE.
47    * ====================================================================
48    *
49    * This software consists of voluntary contributions made by many
50    * individuals on behalf of the Apache Software Foundation.  For more
51    * information on the Apache Software Foundation, please see
52    * <http://www.apache.org/>.
53    *
54    * Portions of this software are based upon public domain software
55    * originally written at the National Center for Supercomputing Applications,
56    * University of Illinois, Urbana-Champaign.
57    */
58   
59   package org.apache.poi.hpsf;
60   
61   /**
62    * <p>The <em>Variant</em> types as defined by Microsoft's COM. I
63    * found this information in <a href="http://www.marin.clara.net/COM/variant_type_definitions.htm">http://www.marin.clara.net/COM/variant_type_definitions.htm</a>.</p>
64    *
65    * <p>In the variant types descriptions the following shortcuts are
66    * used: <strong>[V]</strong> - may appear in a VARIANT,
67    * <strong>[T]</strong> - may appear in a TYPEDESC,
68    * <strong>[P]</strong> - may appear in an OLE property set,
69    * <strong>[S]</strong> - may appear in a Safe Array.</p>
70    *
71    * @author Rainer Klute (klute@rainer-klute.de)
72    * @version $Id: Variant.java,v 1.1 2002/02/14 04:00:59 mjohnson Exp $
73    * @since 2002-02-09
74    */
75   public class Variant
76   {
77   
78       /**
79        * <p>[V][P] Nothing.</p>
80        */
81       public final static int VT_EMPTY = 0;
82   
83       /**
84        * <p>[V][P] SQL style Null.</p>
85        */
86       public final static int VT_NULL = 1;
87   
88       /**
89        * <p>[V][T][P][S] 2 byte signed int.</p>
90        */
91       public final static int VT_I2 = 2;
92   
93       /**
94        * <p>[V][T][P][S] 4 byte signed int.</p>
95        */
96       public final static int VT_I4 = 3;
97   
98       /**
99        * <p>[V][T][P][S] 4 byte real.</p>
100       */
101      public final static int VT_R4 = 4;
102  
103      /**
104       * <p>[V][T][P][S] 8 byte real.</p>
105       */
106      public final static int VT_R8 = 5;
107  
108      /**
109       * <p>[V][T][P][S] currency. <span style="background-color:
110       * #ffff00">How long is this? How is it to be
111       * interpreted?</span></p>
112       */
113      public final static int VT_CY = 6;
114  
115      /**
116       * <p>[V][T][P][S] date. <span style="background-color:
117       * #ffff00">How long is this? How is it to be
118       * interpreted?</span></p>
119       */
120      public final static int VT_DATE = 7;
121  
122      /**
123       * <p>[V][T][P][S] OLE Automation string. <span
124       * style="background-color: #ffff00">How long is this? How is it
125       * to be interpreted?</span></p>
126       */
127      public final static int VT_BSTR = 8;
128  
129      /**
130       * <p>[V][T][P][S] IDispatch *. <span style="background-color:
131       * #ffff00">How long is this? How is it to be
132       * interpreted?</span></p>
133       */
134      public final static int VT_DISPATCH = 9;
135  
136      /**
137       * <p>[V][T][S] SCODE. <span style="background-color:
138       * #ffff00">How long is this? How is it to be
139       * interpreted?</span></p>
140       */
141      public final static int VT_ERROR = 10;
142  
143      /**
144       * <p>[V][T][P][S] True=-1, False=0.</p>
145       */
146      public final static int VT_BOOL = 11;
147  
148      /**
149       * <p>[V][T][P][S] VARIANT *. <span style="background-color:
150       * #ffff00">How long is this? How is it to be
151       * interpreted?</span></p>
152       */
153      public final static int VT_VARIANT = 12;
154  
155      /**
156       * <p>[V][T][S] IUnknown *. <span style="background-color:
157       * #ffff00">How long is this? How is it to be
158       * interpreted?</span></p>
159       */
160      public final static int VT_UNKNOWN = 13;
161  
162      /**
163       * <p>[V][T][S] 16 byte fixed point.</p>
164       */
165      public final static int VT_DECIMAL = 14;
166  
167      /**
168       * <p>[T] signed char.</p>
169       */
170      public final static int VT_I1 = 16;
171  
172      /**
173       * <p>[V][T][P][S] unsigned char.</p>
174       */
175      public final static int VT_UI1 = 17;
176  
177      /**
178       * <p>[T][P] unsigned short.</p>
179       */
180      public final static int VT_UI2 = 18;
181  
182      /**
183       * <p>[T][P] unsigned int.</p>
184       */
185      public final static int VT_UI4 = 19;
186  
187      /**
188       * <p>[T][P] signed 64-bit int.</p>
189       */
190      public final static int VT_I8 = 20;
191  
192      /**
193       * <p>[T][P] unsigned 64-bit int.</p>
194       */
195      public final static int VT_UI8 = 21;
196  
197      /**
198       * <p>[T] signed machine int.</p>
199       */
200      public final static int VT_INT = 22;
201  
202      /**
203       * <p>[T] unsigned machine int.</p>
204       */
205      public final static int VT_UINT = 23;
206  
207      /**
208       * <p>[T] C style void.</p>
209       */
210      public final static int VT_VOID = 24;
211  
212      /**
213       * <p>[T] Standard return type. <span style="background-color:
214       * #ffff00">How long is this? How is it to be
215       * interpreted?</span></p>
216       */
217      public final static int VT_HRESULT = 25;
218  
219      /**
220       * <p>[T] pointer type. <span style="background-color:
221       * #ffff00">How long is this? How is it to be
222       * interpreted?</span></p> */
223      public final static int VT_PTR = 26;
224  
225      /**
226       * <p>[T] (use VT_ARRAY in VARIANT).</p> */
227      public final static int VT_SAFEARRAY = 27;
228  
229      /**
230       * <p>[T] C style array. <span style="background-color:
231       * #ffff00">How long is this? How is it to be
232       * interpreted?</span></p>
233       */
234      public final static int VT_CARRAY = 28;
235  
236      /**
237       * <p>[T] user defined type. <span style="background-color:
238       * #ffff00">How long is this? How is it to be
239       * interpreted?</span></p>
240       */
241      public final static int VT_USERDEFINED = 29;
242  
243      /**
244       * <p>[T][P] null terminated string.</p>
245       */
246      public final static int VT_LPSTR = 30;
247  
248      /**
249       * <p>[T][P] wide (Unicode) null terminated string.</p>
250       */
251      public final static int VT_LPWSTR = 31;
252  
253      /**
254       * <p>[P] FILETIME. The FILETIME structure holds a date and time
255       * associated with a file. The structure identifies a 64-bit
256       * integer specifying the number of 100-nanosecond intervals which
257       * have passed since January 1, 1601. This 64-bit value is split
258       * into the two dwords stored in the structure.</p>
259       */
260      public final static int VT_FILETIME = 64;
261  
262      /**
263       * <p>[P] Length prefixed bytes.</p>
264       */
265      public final static int VT_BLOB = 65;
266  
267      /**
268       * <p>[P] Name of the stream follows.</p>
269       */
270      public final static int VT_STREAM = 66;
271  
272      /**
273       * <p>[P] Name of the storage follows.</p>
274       */
275      public final static int VT_STORAGE = 67;
276  
277      /**
278       * <p>[P] Stream contains an object. <span style="background-color:
279       * #ffff00">How long is this? How is it to be
280       * interpreted?</span></p>
281       */
282      public final static int VT_STREAMED_OBJECT = 68;
283  
284      /**
285       * <p>[P] Storage contains an object. <span style="background-color:
286       * #ffff00">How long is this? How is it to be
287       * interpreted?</span></p>
288       */
289      public final static int VT_STORED_OBJECT = 69;
290  
291      /**
292       * <p>[P] Blob contains an object. <span style="background-color:
293       * #ffff00">How long is this? How is it to be
294       * interpreted?</span></p>
295       */
296      public final static int VT_BLOB_OBJECT = 70;
297  
298      /**
299       * <p>[P] Clipboard format. <span style="background-color:
300       * #ffff00">How long is this? How is it to be
301       * interpreted?</span></p>
302       */
303      public final static int VT_CF = 71;
304  
305      /**
306       * <p>[P] A Class ID. <span style="background-color:
307       * #ffff00">How long is this? How is it to be
308       * interpreted?</span></p>
309       */
310      public final static int VT_CLSID = 72;
311  
312      /**
313       * <p>[P] simple counted array. <span style="background-color:
314       * #ffff00">How long is this? How is it to be
315       * interpreted?</span></p>
316       */
317      public final static int VT_VECTOR = 0x1000;
318  
319      /**
320       * <p>[V] SAFEARRAY*. <span style="background-color:
321       * #ffff00">How long is this? How is it to be
322       * interpreted?</span></p>
323       */
324      public final static int VT_ARRAY = 0x2000;
325  
326      /**
327       * <p>[V] void* for local use. <span style="background-color:
328       * #ffff00">How long is this? How is it to be
329       * interpreted?</span></p>
330       */
331      public final static int VT_BYREF = 0x4000;
332  
333      public final static int VT_RESERVED = 0x8000;
334  
335      public final static int VT_ILLEGAL = 0xFFFF;
336  
337      public final static int VT_ILLEGALMASKED = 0xFFF;
338  
339      public final static int VT_TYPEMASK = 0xFFF;
340  
341  }
342