Artec 3D Scanning SDK  2.0
IString.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Store various data types.
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _ISTRING_H_
12 #define _ISTRING_H_
13 
15 #include <artec/sdk/base/IRef.h>
16 
17 namespace artec { namespace sdk { namespace base
18 {
19 
20 class IString;
21 class IArrayString;
22 
23 extern "C"
24 {
25 
27  createString(IString** pString, const wchar_t* sourceString);
29  createArrayString (IArrayString** pArray, int elementsCount);
30 }
31 
32 /// Interface for string with smart reference counting
33 class IString : public IRef
34 {
35 public:
36  typedef wchar_t elementType;
37 
38  /// Get number of array elements.
39  virtual int getLength() const = 0;
40 
41  /// Get data pointer for reading only.
42  virtual const wchar_t* getPointer() const = 0;
43 };
44 
45 /**
46 * Interface for array of strings
47 * that supports smart reference counting.
48 */
49 class IArrayString : public IRef
50 {
51 public:
52  /// Get Array elements count.
53  virtual int getSize() const = 0;
54 
55  /// Get pointer to the string
56  virtual const wchar_t* getElement(int index) const = 0;
57 
58  /// Set string to array
59  virtual void setElement(int index, const wchar_t* string) = 0;
60 };
61 
62 } } } // namespace artec::sdk::base
63 
64 #endif // _IARRAY_H_
ErrorCode ABASESDK_LINK_SPEC createString(IString **pString, const wchar_t *sourceString)
virtual const wchar_t * getPointer() const =0
Get data pointer for reading only.
Interface for string with smart reference counting.
Definition: IString.h:33
virtual void setElement(int index, const wchar_t *string)=0
Set string to array.
virtual const wchar_t * getElement(int index) const =0
Get pointer to the string.
virtual int getLength() const =0
Get number of array elements.
virtual int getSize() const =0
Get Array elements count.
#define ABASESDK_LINK_SPEC
Interface for array of strings that supports smart reference counting.
Definition: IString.h:49
Interface that implements reference counting and life-time management.
Definition: IRef.h:22
ErrorCode ABASESDK_LINK_SPEC createArrayString(IArrayString **pArray, int elementsCount)