Jamoma API  0.6.0.a19
CACFArray.cpp
1 /* Copyright 2007 Apple Inc. All Rights Reserved.
2 
3  Disclaimer: IMPORTANT: This Apple software is supplied to you by
4  Apple Inc. ("Apple") in consideration of your agreement to the
5  following terms, and your use, installation, modification or
6  redistribution of this Apple software constitutes acceptance of these
7  terms. If you do not agree with these terms, please do not use,
8  install, modify or redistribute this Apple software.
9 
10  In consideration of your agreement to abide by the following terms, and
11  subject to these terms, Apple grants you a personal, non-exclusive
12  license, under Apple's copyrights in this original Apple software (the
13  "Apple Software"), to use, reproduce, modify and redistribute the Apple
14  Software, with or without modifications, in source and/or binary forms;
15  provided that if you redistribute the Apple Software in its entirety and
16  without modifications, you must retain this notice and the following
17  text and disclaimers in all such redistributions of the Apple Software.
18  Neither the name, trademarks, service marks or logos of Apple Inc.
19  may be used to endorse or promote products derived from the Apple
20  Software without specific prior written permission from Apple. Except
21  as expressly stated in this notice, no other rights or licenses, express
22  or implied, are granted by Apple herein, including but not limited to
23  any patent rights that may be infringed by your derivative works or by
24  other works in which the Apple Software may be incorporated.
25 
26  The Apple Software is provided by Apple on an "AS IS" basis. APPLE
27  MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
28  THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
29  FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
30  OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
31 
32  IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
33  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35  INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
36  MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
37  AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
38  STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
39  POSSIBILITY OF SUCH DAMAGE.
40 */
41 //=============================================================================
42 // Includes
43 //=============================================================================
44 
45 // Self Include
46 #include "CACFArray.h"
47 
48 // PublicUtility Includes
49 #include "CACFDictionary.h"
50 #include "CACFNumber.h"
51 #include "CACFString.h"
52 
53 //=============================================================================
54 // CACFArray
55 //=============================================================================
56 
57 bool CACFArray::HasItem(const void* inItem) const
58 {
59  bool theAnswer = false;
60  if(mCFArray != NULL)
61  {
62  CFRange theRange = { 0, CFArrayGetCount(mCFArray)};
63  theAnswer = CFArrayContainsValue(mCFArray, theRange, inItem);
64  }
65  return theAnswer;
66 }
67 
68 bool CACFArray::GetIndexOfItem(const void* inItem, UInt32& outIndex) const
69 {
70  bool theAnswer = false;
71  outIndex = 0;
72  if(mCFArray != NULL)
73  {
74  CFRange theRange = { 0, CFArrayGetCount(mCFArray)};
75  CFIndex theIndex = CFArrayGetFirstIndexOfValue(mCFArray, theRange, inItem);
76  if(theIndex != -1)
77  {
78  theAnswer = true;
79  outIndex = ToUInt32(theIndex);
80  }
81  }
82  return theAnswer;
83 }
84 
85 bool CACFArray::GetBool(UInt32 inIndex, bool& outValue) const
86 {
87  bool theAnswer = false;
88 
89  CFTypeRef theValue = NULL;
90  if(GetCFType(inIndex, theValue))
91  {
92  if((theValue != NULL) && (CFGetTypeID(theValue) == CFBooleanGetTypeID()))
93  {
94  outValue = CFBooleanGetValue(static_cast<CFBooleanRef>(theValue));
95  theAnswer = true;
96  }
97  else if((theValue != NULL) && (CFGetTypeID(theValue) == CFNumberGetTypeID()))
98  {
99  SInt32 theNumericValue = 0;
100  CFNumberGetValue(static_cast<CFNumberRef>(theValue), kCFNumberSInt32Type, &theNumericValue);
101  outValue = theNumericValue != 0;
102  theAnswer = true;
103  }
104  }
105 
106  return theAnswer;
107 }
108 
109 bool CACFArray::GetSInt32(UInt32 inIndex, SInt32& outItem) const
110 {
111  bool theAnswer = false;
112 
113  CFTypeRef theItem = NULL;
114  if(GetCFType(inIndex, theItem))
115  {
116  if((theItem != NULL) && (CFGetTypeID(theItem) == CFNumberGetTypeID()))
117  {
118  CFNumberGetValue(static_cast<CFNumberRef>(theItem), kCFNumberSInt32Type, &outItem);
119  theAnswer = true;
120  }
121  }
122 
123  return theAnswer;
124 }
125 
126 bool CACFArray::GetUInt32(UInt32 inIndex, UInt32& outItem) const
127 {
128  bool theAnswer = false;
129 
130  CFTypeRef theItem = NULL;
131  if(GetCFType(inIndex, theItem))
132  {
133  if((theItem != NULL) && (CFGetTypeID(theItem) == CFNumberGetTypeID()))
134  {
135  CFNumberGetValue(static_cast<CFNumberRef>(theItem), kCFNumberSInt32Type, &outItem);
136  theAnswer = true;
137  }
138  }
139 
140  return theAnswer;
141 }
142 
143 bool CACFArray::GetSInt64(UInt32 inIndex, SInt64& outItem) const
144 {
145  bool theAnswer = false;
146 
147  CFTypeRef theItem = NULL;
148  if(GetCFType(inIndex, theItem))
149  {
150  if((theItem != NULL) && (CFGetTypeID(theItem) == CFNumberGetTypeID()))
151  {
152  CFNumberGetValue(static_cast<CFNumberRef>(theItem), kCFNumberSInt64Type, &outItem);
153  theAnswer = true;
154  }
155  }
156 
157  return theAnswer;
158 }
159 
160 bool CACFArray::GetUInt64(UInt32 inIndex, UInt64& outItem) const
161 {
162  bool theAnswer = false;
163 
164  CFTypeRef theItem = NULL;
165  if(GetCFType(inIndex, theItem))
166  {
167  if((theItem != NULL) && (CFGetTypeID(theItem) == CFNumberGetTypeID()))
168  {
169  CFNumberGetValue(static_cast<CFNumberRef>(theItem), kCFNumberSInt64Type, &outItem);
170  theAnswer = true;
171  }
172  }
173 
174  return theAnswer;
175 }
176 
177 bool CACFArray::GetFloat32(UInt32 inIndex, Float32& outItem) const
178 {
179  bool theAnswer = false;
180 
181  CFTypeRef theItem = NULL;
182  if(GetCFType(inIndex, theItem))
183  {
184  if((theItem != NULL) && (CFGetTypeID(theItem) == CFNumberGetTypeID()))
185  {
186  CFNumberGetValue(static_cast<CFNumberRef>(theItem), kCFNumberFloat32Type, &outItem);
187  theAnswer = true;
188  }
189  }
190 
191  return theAnswer;
192 }
193 
194 bool CACFArray::GetFloat64(UInt32 inIndex, Float64& outItem) const
195 {
196  bool theAnswer = false;
197 
198  CFTypeRef theItem = NULL;
199  if(GetCFType(inIndex, theItem))
200  {
201  if((theItem != NULL) && (CFGetTypeID(theItem) == CFNumberGetTypeID()))
202  {
203  CFNumberGetValue(static_cast<CFNumberRef>(theItem), kCFNumberFloat64Type, &outItem);
204  theAnswer = true;
205  }
206  }
207 
208  return theAnswer;
209 }
210 
211 bool CACFArray::GetString(UInt32 inIndex, CFStringRef& outItem) const
212 {
213  bool theAnswer = false;
214 
215  CFTypeRef theItem = NULL;
216  if(GetCFType(inIndex, theItem))
217  {
218  if((theItem != NULL) && (CFGetTypeID(theItem) == CFStringGetTypeID()))
219  {
220  outItem = static_cast<CFStringRef>(theItem);
221  theAnswer = true;
222  }
223  }
224 
225  return theAnswer;
226 }
227 
228 bool CACFArray::GetArray(UInt32 inIndex, CFArrayRef& outItem) const
229 {
230  bool theAnswer = false;
231 
232  CFTypeRef theItem = NULL;
233  if(GetCFType(inIndex, theItem))
234  {
235  if((theItem != NULL) && (CFGetTypeID(theItem) == CFArrayGetTypeID()))
236  {
237  outItem = static_cast<CFArrayRef>(theItem);
238  theAnswer = true;
239  }
240  }
241 
242  return theAnswer;
243 }
244 
245 bool CACFArray::GetDictionary(UInt32 inIndex, CFDictionaryRef& outItem) const
246 {
247  bool theAnswer = false;
248 
249  CFTypeRef theItem = NULL;
250  if(GetCFType(inIndex, theItem))
251  {
252  if((theItem != NULL) && (CFGetTypeID(theItem) == CFDictionaryGetTypeID()))
253  {
254  outItem = static_cast<CFDictionaryRef>(theItem);
255  theAnswer = true;
256  }
257  }
258 
259  return theAnswer;
260 }
261 
262 bool CACFArray::GetData(UInt32 inIndex, CFDataRef& outItem) const
263 {
264  bool theAnswer = false;
265 
266  CFTypeRef theItem = NULL;
267  if(GetCFType(inIndex, theItem))
268  {
269  if((theItem != NULL) && (CFGetTypeID(theItem) == CFDataGetTypeID()))
270  {
271  outItem = static_cast<CFDataRef>(theItem);
272  theAnswer = true;
273  }
274  }
275 
276  return theAnswer;
277 }
278 
279 bool CACFArray::GetUUID(UInt32 inIndex, CFUUIDRef& outItem) const
280 {
281  bool theAnswer = false;
282 
283  CFTypeRef theItem = NULL;
284  if(GetCFType(inIndex, theItem))
285  {
286  if((theItem != NULL) && (CFGetTypeID(theItem) == CFUUIDGetTypeID()))
287  {
288  outItem = static_cast<CFUUIDRef>(theItem);
289  theAnswer = true;
290  }
291  }
292 
293  return theAnswer;
294 }
295 
296 bool CACFArray::GetCFType(UInt32 inIndex, CFTypeRef& outItem) const
297 {
298  bool theAnswer = false;
299 
300  if((mCFArray != NULL) && (inIndex < GetNumberItems()))
301  {
302  outItem = CFArrayGetValueAtIndex(mCFArray, inIndex);
303  theAnswer = outItem != NULL;
304  }
305 
306  return theAnswer;
307 }
308 
309 void CACFArray::GetCACFString(UInt32 inIndex, CACFString& outItem) const
310 {
311  outItem = static_cast<CFStringRef>(NULL);
312  CFTypeRef theItem = NULL;
313  if(GetCFType(inIndex, theItem))
314  {
315  if((theItem != NULL) && (CFGetTypeID(theItem) == CFStringGetTypeID()))
316  {
317  outItem = static_cast<CFStringRef>(theItem);
318  }
319  }
320 }
321 
322 void CACFArray::GetCACFArray(UInt32 inIndex, CACFArray& outItem) const
323 {
324  outItem = static_cast<CFArrayRef>(NULL);
325  CFTypeRef theItem = NULL;
326  if(GetCFType(inIndex, theItem))
327  {
328  if((theItem != NULL) && (CFGetTypeID(theItem) == CFArrayGetTypeID()))
329  {
330  outItem = static_cast<CFArrayRef>(theItem);
331  }
332  }
333 }
334 
335 void CACFArray::GetCACFDictionary(UInt32 inIndex, CACFDictionary& outItem) const
336 {
337  outItem = static_cast<CFDictionaryRef>(NULL);
338  CFTypeRef theItem = NULL;
339  if(GetCFType(inIndex, theItem))
340  {
341  if((theItem != NULL) && (CFGetTypeID(theItem) == CFDictionaryGetTypeID()))
342  {
343  outItem = static_cast<CFDictionaryRef>(theItem);
344  }
345  }
346 }
347 
348 bool CACFArray::AppendBool(bool inItem)
349 {
350  bool theAnswer = false;
351 
352  if((mCFArray != NULL) && mMutable)
353  {
354  CACFBoolean theItem(inItem);
355  if(theItem.IsValid())
356  {
357  theAnswer = AppendCFType(theItem.GetCFBoolean());
358  }
359  }
360 
361  return theAnswer;
362 }
363 
364 bool CACFArray::AppendSInt32(SInt32 inItem)
365 {
366  bool theAnswer = false;
367 
368  if((mCFArray != NULL) && mMutable)
369  {
370  CACFNumber theItem(inItem);
371  if(theItem.IsValid())
372  {
373  theAnswer = AppendCFType(theItem.GetCFNumber());
374  }
375  }
376 
377  return theAnswer;
378 }
379 
380 bool CACFArray::AppendUInt32(UInt32 inItem)
381 {
382  bool theAnswer = false;
383 
384  if((mCFArray != NULL) && mMutable)
385  {
386  CACFNumber theItem(inItem);
387  if(theItem.IsValid())
388  {
389  theAnswer = AppendCFType(theItem.GetCFNumber());
390  }
391  }
392 
393  return theAnswer;
394 }
395 
396 bool CACFArray::AppendSInt64(SInt64 inItem)
397 {
398  bool theAnswer = false;
399 
400  if((mCFArray != NULL) && mMutable)
401  {
402  CACFNumber theItem(inItem);
403  if(theItem.IsValid())
404  {
405  theAnswer = AppendCFType(theItem.GetCFNumber());
406  }
407  }
408 
409  return theAnswer;
410 }
411 
412 bool CACFArray::AppendUInt64(UInt64 inItem)
413 {
414  bool theAnswer = false;
415 
416  if((mCFArray != NULL) && mMutable)
417  {
418  CACFNumber theItem(inItem);
419  if(theItem.IsValid())
420  {
421  theAnswer = AppendCFType(theItem.GetCFNumber());
422  }
423  }
424 
425  return theAnswer;
426 }
427 
428 bool CACFArray::AppendFloat32(Float32 inItem)
429 {
430  bool theAnswer = false;
431 
432  if((mCFArray != NULL) && mMutable)
433  {
434  CACFNumber theItem(inItem);
435  if(theItem.IsValid())
436  {
437  theAnswer = AppendCFType(theItem.GetCFNumber());
438  }
439  }
440 
441  return theAnswer;
442 }
443 
444 bool CACFArray::AppendFloat64(Float64 inItem)
445 {
446  bool theAnswer = false;
447 
448  if((mCFArray != NULL) && mMutable)
449  {
450  CACFNumber theItem(inItem);
451  if(theItem.IsValid())
452  {
453  theAnswer = AppendCFType(theItem.GetCFNumber());
454  }
455  }
456 
457  return theAnswer;
458 }
459 
460 bool CACFArray::AppendString(const CFStringRef inItem)
461 {
462  return AppendCFType(inItem);
463 }
464 
465 bool CACFArray::AppendArray(const CFArrayRef inItem)
466 {
467  return AppendCFType(inItem);
468 }
469 
470 bool CACFArray::AppendDictionary(const CFDictionaryRef inItem)
471 {
472  return AppendCFType(inItem);
473 }
474 
475 bool CACFArray::AppendData(const CFDataRef inItem)
476 {
477  return AppendCFType(inItem);
478 }
479 
480 bool CACFArray::AppendCFType(const CFTypeRef inItem)
481 {
482  bool theAnswer = false;
483 
484  if((mCFArray != NULL) && mMutable)
485  {
486  CFArrayAppendValue(mCFArray, inItem);
487  theAnswer = true;
488  }
489 
490  return theAnswer;
491 }
492 
493 bool CACFArray::InsertBool(UInt32 inIndex, bool inItem)
494 {
495  bool theAnswer = false;
496 
497  if((mCFArray != NULL) && mMutable)
498  {
499  CACFBoolean theItem(inItem);
500  if(theItem.IsValid())
501  {
502  theAnswer = InsertCFType(inIndex, theItem.GetCFBoolean());
503  }
504  }
505 
506  return theAnswer;
507 }
508 
509 bool CACFArray::InsertSInt32(UInt32 inIndex, SInt32 inItem)
510 {
511  bool theAnswer = false;
512 
513  if((mCFArray != NULL) && mMutable)
514  {
515  CACFNumber theItem(inItem);
516  if(theItem.IsValid())
517  {
518  theAnswer = InsertCFType(inIndex, theItem.GetCFNumber());
519  }
520  }
521 
522  return theAnswer;
523 }
524 
525 bool CACFArray::InsertUInt32(UInt32 inIndex, UInt32 inItem)
526 {
527  bool theAnswer = false;
528 
529  if((mCFArray != NULL) && mMutable)
530  {
531  CACFNumber theItem(inItem);
532  if(theItem.IsValid())
533  {
534  theAnswer = InsertCFType(inIndex, theItem.GetCFNumber());
535  }
536  }
537 
538  return theAnswer;
539 }
540 
541 bool CACFArray::InsertSInt64(UInt32 inIndex, SInt64 inItem)
542 {
543  bool theAnswer = false;
544 
545  if((mCFArray != NULL) && mMutable)
546  {
547  CACFNumber theItem(inItem);
548  if(theItem.IsValid())
549  {
550  theAnswer = InsertCFType(inIndex, theItem.GetCFNumber());
551  }
552  }
553 
554  return theAnswer;
555 }
556 
557 bool CACFArray::InsertUInt64(UInt32 inIndex, UInt64 inItem)
558 {
559  bool theAnswer = false;
560 
561  if((mCFArray != NULL) && mMutable)
562  {
563  CACFNumber theItem(inItem);
564  if(theItem.IsValid())
565  {
566  theAnswer = InsertCFType(inIndex, theItem.GetCFNumber());
567  }
568  }
569 
570  return theAnswer;
571 }
572 
573 bool CACFArray::InsertFloat32(UInt32 inIndex, Float32 inItem)
574 {
575  bool theAnswer = false;
576 
577  if((mCFArray != NULL) && mMutable)
578  {
579  CACFNumber theItem(inItem);
580  if(theItem.IsValid())
581  {
582  theAnswer = InsertCFType(inIndex, theItem.GetCFNumber());
583  }
584  }
585 
586  return theAnswer;
587 }
588 
589 bool CACFArray::InsertFloat64(UInt32 inIndex, Float64 inItem)
590 {
591  bool theAnswer = false;
592 
593  if((mCFArray != NULL) && mMutable)
594  {
595  CACFNumber theItem(inItem);
596  if(theItem.IsValid())
597  {
598  theAnswer = InsertCFType(inIndex, theItem.GetCFNumber());
599  }
600  }
601 
602  return theAnswer;
603 }
604 
605 bool CACFArray::InsertString(UInt32 inIndex, const CFStringRef inItem)
606 {
607  return InsertCFType(inIndex, inItem);
608 }
609 
610 bool CACFArray::InsertArray(UInt32 inIndex, const CFArrayRef inItem)
611 {
612  return InsertCFType(inIndex, inItem);
613 }
614 
615 bool CACFArray::InsertDictionary(UInt32 inIndex, const CFDictionaryRef inItem)
616 {
617  return InsertCFType(inIndex, inItem);
618 }
619 
620 bool CACFArray::InsertData(UInt32 inIndex, const CFDataRef inItem)
621 {
622  return InsertCFType(inIndex, inItem);
623 }
624 
625 bool CACFArray::InsertCFType(UInt32 inIndex, const CFTypeRef inItem)
626 {
627  bool theAnswer = false;
628 
629  if((mCFArray != NULL) && mMutable)
630  {
631  if(inIndex < GetNumberItems())
632  {
633  CFArrayInsertValueAtIndex(mCFArray, inIndex, inItem);
634  }
635  else
636  {
637  CFArrayAppendValue(mCFArray, inItem);
638  }
639  theAnswer = true;
640  }
641 
642  return theAnswer;
643 }
644 
645 bool CACFArray::SetBool(UInt32 inIndex, bool inItem)
646 {
647  bool theAnswer = false;
648 
649  if((mCFArray != NULL) && mMutable && (inIndex <= GetNumberItems()))
650  {
651  CACFBoolean theItem(inItem);
652  if(theItem.IsValid())
653  {
654  theAnswer = SetCFType(inIndex, theItem.GetCFBoolean());
655  }
656  }
657 
658  return theAnswer;
659 }
660 
661 bool CACFArray::SetSInt32(UInt32 inIndex, SInt32 inItem)
662 {
663  bool theAnswer = false;
664 
665  if((mCFArray != NULL) && mMutable && (inIndex <= GetNumberItems()))
666  {
667  CACFNumber theItem(inItem);
668  if(theItem.IsValid())
669  {
670  theAnswer = SetCFType(inIndex, theItem.GetCFNumber());
671  }
672  }
673 
674  return theAnswer;
675 }
676 
677 bool CACFArray::SetUInt32(UInt32 inIndex, UInt32 inItem)
678 {
679  bool theAnswer = false;
680 
681  if((mCFArray != NULL) && mMutable && (inIndex <= GetNumberItems()))
682  {
683  CACFNumber theItem(inItem);
684  if(theItem.IsValid())
685  {
686  theAnswer = SetCFType(inIndex, theItem.GetCFNumber());
687  }
688  }
689 
690  return theAnswer;
691 }
692 
693 bool CACFArray::SetSInt64(UInt32 inIndex, SInt64 inItem)
694 {
695  bool theAnswer = false;
696 
697  if((mCFArray != NULL) && mMutable && (inIndex <= GetNumberItems()))
698  {
699  CACFNumber theItem(inItem);
700  if(theItem.IsValid())
701  {
702  theAnswer = SetCFType(inIndex, theItem.GetCFNumber());
703  }
704  }
705 
706  return theAnswer;
707 }
708 
709 bool CACFArray::SetUInt64(UInt32 inIndex, UInt64 inItem)
710 {
711  bool theAnswer = false;
712 
713  if((mCFArray != NULL) && mMutable && (inIndex <= GetNumberItems()))
714  {
715  CACFNumber theItem(inItem);
716  if(theItem.IsValid())
717  {
718  theAnswer = SetCFType(inIndex, theItem.GetCFNumber());
719  }
720  }
721 
722  return theAnswer;
723 }
724 
725 bool CACFArray::SetFloat32(UInt32 inIndex, Float32 inItem)
726 {
727  bool theAnswer = false;
728 
729  if((mCFArray != NULL) && mMutable && (inIndex <= GetNumberItems()))
730  {
731  CACFNumber theItem(inItem);
732  if(theItem.IsValid())
733  {
734  theAnswer = SetCFType(inIndex, theItem.GetCFNumber());
735  }
736  }
737 
738  return theAnswer;
739 }
740 
741 bool CACFArray::SetFloat64(UInt32 inIndex, Float64 inItem)
742 {
743  bool theAnswer = false;
744 
745  if((mCFArray != NULL) && mMutable && (inIndex <= GetNumberItems()))
746  {
747  CACFNumber theItem(inItem);
748  if(theItem.IsValid())
749  {
750  theAnswer = SetCFType(inIndex, theItem.GetCFNumber());
751  }
752  }
753 
754  return theAnswer;
755 }
756 
757 bool CACFArray::SetString(UInt32 inIndex, const CFStringRef inItem)
758 {
759  return SetCFType(inIndex, inItem);
760 }
761 
762 bool CACFArray::SetArray(UInt32 inIndex, const CFArrayRef inItem)
763 {
764  return SetCFType(inIndex, inItem);
765 }
766 
767 bool CACFArray::SetDictionary(UInt32 inIndex, const CFDictionaryRef inItem)
768 {
769  return SetCFType(inIndex, inItem);
770 }
771 
772 bool CACFArray::SetData(UInt32 inIndex, const CFDataRef inItem)
773 {
774  return SetCFType(inIndex, inItem);
775 }
776 
777 bool CACFArray::SetCFType(UInt32 inIndex, const CFTypeRef inItem)
778 {
779  bool theAnswer = false;
780 
781  if((mCFArray != NULL) && mMutable && (inIndex <= GetNumberItems()))
782  {
783  CFArraySetValueAtIndex(mCFArray, inIndex, inItem);
784  theAnswer = true;
785  }
786 
787  return theAnswer;
788 }