1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxVariant docs
4 %% Author: wxWidgets Team
8 %% Copyright: (c) wxWidgets Team
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxVariant
}}\label{wxvariant
}
14 The
{\bf wxVariant
} class represents a container for any type.
15 A variant's value can be changed at run time, possibly to a different type of value.
17 As standard, wxVariant can store values of type bool, wxChar, double, long, string,
18 string list, time, date, void pointer, list of strings, and list of variants.
19 However, an application can extend wxVariant's capabilities by deriving from the
20 class
\helpref{wxVariantData
}{wxvariantdata
} and using the wxVariantData form of
21 the wxVariant constructor or assignment operator to assign this data to a variant.
22 Actual values for user-defined types will need to be accessed via the wxVariantData
23 object, unlike the case for basic data types where convenience functions such as
24 \helpref{GetLong
}{wxvariantgetlong
} can be used.
26 Pointers to any
\helpref{wxObject
}{wxobject
} derived class can also easily be stored
27 in a wxVariant. wxVariant will then use wxWidgets' built-in RTTI system to set the
28 type name (returned by
\helpref{GetType
}{wxvariantgettype
}) and to perform
29 type-safety checks at runtime.
31 This class is useful for reducing the programming for certain tasks, such as an editor
32 for different data types, or a remote procedure call protocol.
34 An optional name member is associated with a wxVariant. This might be used, for example,
35 in CORBA or OLE automation classes, where named parameters are required.
37 Note that as of wxWidgets
2.7.1, wxVariant is
\helpref{reference counted
}{trefcount
}.
38 Additionally, the convenience macros
{\bf DECLARE
\_VARIANT\_OBJECT} and
39 {\bf IMPLEMENT
\_VARIANT\_OBJECT} were added so that adding (limited) support
40 for conversion to and from wxVariant can be very easily implemented without modifying
41 either wxVariant or the class to be stored by wxVariant. Since assignment operators
42 cannot be declared outside the class, the shift left operators are used like this:
46 DECLARE_VARIANT_OBJECT(MyClass)
48 // in the implementation file
49 IMPLMENT_VARIANT_OBJECT(MyClass)
60 For this to work, MyClass must derive from
\helpref{wxObject
}{wxobject
}, implement
61 the
\helpref{wxWidgets RTTI system
}{runtimeclassoverview
}
62 and support the assignment operator and equality operator for itself. Ideally, it
63 should also be reference counted to make copying operations cheap and fast. This
64 can be most easily implemented using the reference counting support offered by
65 \helpref{wxObject
}{wxobject
} itself. By default, wxWidgets already implements
66 the shift operator conversion for a few of its drawing related classes:
69 IMPLEMENT_VARIANT_OBJECT(wxColour)
70 IMPLEMENT_VARIANT_OBJECT(wxImage)
71 IMPLEMENT_VARIANT_OBJECT(wxIcon)
72 IMPLEMENT_VARIANT_OBJECT(wxBitmap)
75 Note that as of wxWidgets
2.9.0, wxVariantData no longer inherits from wxObject
76 and wxVariant no longer uses the type-unsafe wxList class for list
77 operations but the type-safe wxVariantList class. Also, wxVariantData now
78 supports the Clone function for implementing the
\helpref{wxVariant::Unshare
}{wxvariantunshare
} function.
79 Clone is implemented automatically by IMPLEMENT
\_VARIANT\_OBJECT.
81 Since wxVariantData no longer derives from wxObject, any code that tests the type
82 of the data using wxDynamicCast will require adjustment. You can use the macro
83 wxDynamicCastVariantData with the same arguments as wxDynamicCast, to use C++ RTTI
84 type information instead of wxWidgets RTTI.
86 \wxheading{Derived from
}
88 \helpref{wxObject
}{wxobject
}
90 \wxheading{Include files
}
96 \helpref{wxBase
}{librarieslist
}
100 \helpref{wxVariantData
}{wxvariantdata
}
102 \latexignore{\rtfignore{\wxheading{Members
}}}
104 \membersection{wxVariant::wxVariant
}\label{wxvariantctor
}
106 \func{}{wxVariant
}{\void}
110 \func{}{wxVariant
}{\param{const wxVariant\&
}{variant
}}
112 Copy constructor, uses
\helpref{reference counting
}{trefcount
}.
114 \func{}{wxVariant
}{\param{const wxChar*
}{ value
},
\param{const wxString\&
}{name = ``"
}}
116 \func{}{wxVariant
}{\param{const wxString\&
}{ value
},
\param{const wxString\&
}{name = ``"
}}
118 Construction from a string value.
120 \func{}{wxVariant
}{\param{wxChar
}{ value
},
\param{const wxString\&
}{name = ``"
}}
122 Construction from a character value.
124 \func{}{wxVariant
}{\param{long
}{ value
},
\param{const wxString\&
}{name = ``"
}}
126 Construction from an integer value. You may need to cast to (long) to
127 avoid confusion with other constructors (such as the bool constructor).
129 \func{}{wxVariant
}{\param{bool
}{ value
},
\param{const wxString\&
}{name = ``"
}}
131 Construction from a boolean value.
133 \func{}{wxVariant
}{\param{double
}{ value
},
\param{const wxString\&
}{name = ``"
}}
135 Construction from a double-precision floating point value.
137 \func{}{wxVariant
}{\param{const wxVariantList\&
}{ value
},
\param{const wxString\&
}{name = ``"
}}
139 Construction from a list of wxVariant objects. This constructor
140 copies
{\it value
}, the application is still responsible for
141 deleting
{\it value
} and its contents.
143 \func{}{wxVariant
}{\param{void*
}{ value
},
\param{const wxString\&
}{name = ``"
}}
145 Construction from a void pointer.
147 \func{}{wxVariant
}{\param{wxObject*
}{ value
},
\param{const wxString\&
}{name = ``"
}}
149 Construction from a wxObject pointer.
151 \func{}{wxVariant
}{\param{wxVariantData*
}{ data
},
\param{const wxString\&
}{name = ``"
}}
153 Construction from user-defined data. The variant holds onto the
{\it data
} pointer.
155 \func{}{wxVariant
}{\param{wxDateTime\&
}{ val
},
\param{const wxString\&
}{name = ``"
}}
157 Construction from a
\helpref{wxDateTime
}{wxdatetime
}.
159 \func{}{wxVariant
}{\param{wxArrayString\&
}{ val
},
\param{const wxString\&
}{name = ``"
}}
161 Construction from an array of strings. This constructor copies
{\it value
} and its contents.
163 \func{}{wxVariant
}{\param{DATE
\_STRUCT*
}{ val
},
\param{const wxString\&
}{name = ``"
}}
165 Construction from a ODBC date value. Represented internally by a
\helpref{wxDateTime
}{wxdatetime
} value.
167 \func{}{wxVariant
}{\param{TIME
\_STRUCT*
}{ val
},
\param{const wxString\&
}{name = ``"
}}
169 Construction from a ODBC time value. Represented internally by a
\helpref{wxDateTime
}{wxdatetime
} value.
171 \func{}{wxVariant
}{\param{TIMESTAMP
\_STRUCT*
}{ val
},
\param{const wxString\&
}{name = ``"
}}
173 Construction from a ODBC timestamp value. Represented internally by a
\helpref{wxDateTime
}{wxdatetime
} value.
175 \membersection{wxVariant::
\destruct{wxVariant
}}\label{wxvariantdtor
}
177 \func{}{\destruct{wxVariant
}}{\void}
181 Note that destructor is protected, so wxVariantData cannot usually
182 be deleted. Instead,
\helpref{DecRef
}{wxvariantdatadecref
} should be called.
183 See
\helpref{reference-counted object destruction
}{refcountdestruct
} for more info.
186 \membersection{wxVariant::Append
}\label{wxvariantappend
}
188 \func{void
}{Append
}{\param{const wxVariant\&
}{ value
}}
190 Appends a value to the list.
192 \membersection{wxVariant::Clear
}\label{wxvariantclear
}
194 \func{void
}{Clear
}{\void}
196 Makes the variant null by deleting the internal data and
197 set the name to
{\it wxEmptyString
}.
199 \membersection{wxVariant::ClearList
}\label{wxvariantclearlist
}
201 \func{void
}{ClearList
}{\void}
203 Deletes the contents of the list.
206 \membersection{wxVariant::Convert
}\label{wxvariantconvert
}
208 \constfunc{bool
}{Convert
}{\param{long*
}{ value
}}
210 \constfunc{bool
}{Convert
}{\param{bool*
}{ value
}}
212 \constfunc{bool
}{Convert
}{\param{double*
}{ value
}}
214 \constfunc{bool
}{Convert
}{\param{wxString*
}{ value
}}
216 \constfunc{bool
}{Convert
}{\param{wxChar*
}{ value
}}
218 \constfunc{bool
}{Convert
}{\param{wxDateTime*
}{ value
}}
220 Retrieves and converts the value of this variant to the type that
{\it value
} is.
223 \membersection{wxVariant::GetCount
}\label{wxvariantgetcount
}
225 \constfunc{size
\_t}{GetCount
}{\void}
227 Returns the number of elements in the list.
229 \membersection{wxVariant::Delete
}\label{wxvariantdelete
}
231 \func{bool
}{Delete
}{\param{size
\_t }{item
}}
233 Deletes the zero-based
{\it item
} from the list.
235 \membersection{wxVariant::GetArrayString
}\label{wxvariantgetarraystring
}
237 \constfunc{wxArrayString
}{GetArrayString
}{\void}
239 Returns the string array value.
241 \membersection{wxVariant::GetBool
}\label{wxvariantgetbool
}
243 \constfunc{bool
}{GetBool
}{\void}
245 Returns the boolean value.
247 \membersection{wxVariant::GetChar
}\label{wxvariantgetchar
}
249 \constfunc{wxChar
}{GetChar
}{\void}
251 Returns the character value.
253 \membersection{wxVariant::GetData
}\label{wxvariantgetdata
}
255 \constfunc{wxVariantData*
}{GetData
}{\void}
257 Returns a pointer to the internal variant data. To take ownership
258 of this data, you must call its
\helpref{IncRef
}{wxvariantdataincref
}
259 method. When you stop using it,
\helpref{DecRef
}{wxvariantdatadecref
}
260 must be likewise called.
262 \membersection{wxVariant::GetDateTime
}\label{wxvariantgetdatetime
}
264 \constfunc{wxDateTime
}{GetDateTime
}{\void}
266 Returns the date value.
268 \membersection{wxVariant::GetDouble
}\label{wxvariantgetdouble
}
270 \constfunc{double
}{GetDouble
}{\void}
272 Returns the floating point value.
274 \membersection{wxVariant::GetList
}\label{wxvariantgetlist
}
276 \constfunc{wxVariantList &
}{GetList
}{\void}
278 Returns a reference to the wxVariantList class used by
279 wxVariant if this wxVariant is currently a list of variants.
281 \membersection{wxVariant::GetLong
}\label{wxvariantgetlong
}
283 \constfunc{long
}{GetLong
}{\void}
285 Returns the integer value.
287 \membersection{wxVariant::GetName
}\label{wxvariantgetname
}
289 \constfunc{const wxString\&
}{GetName
}{\void}
291 Returns a constant reference to the variant name.
293 \membersection{wxVariant::GetString
}\label{wxvariantgetstring
}
295 \constfunc{wxString
}{GetString
}{\void}
297 Gets the string value.
299 \membersection{wxVariant::GetType
}\label{wxvariantgettype
}
301 \constfunc{wxString
}{GetType
}{\void}
303 Returns the value type as a string. The built-in types are: bool, char, datetime, double, list, long, string, arrstring, void*.
305 If the variant is null, the value type returned is the string ``null" (not the empty string).
307 \membersection{wxVariant::GetVoidPtr
}\label{wxvariantgetvoidptr
}
309 \constfunc{void*
}{GetVoidPtr
}{\void}
311 Gets the void pointer value.
313 \membersection{wxVariant::GetWxObjectPtr
}\label{wxvariantgetwxobjectptr
}
315 \constfunc{wxObject*
}{GetWxObjectPtr
}{\void}
317 Gets the wxObject pointer value.
319 \membersection{wxVariant::Insert
}\label{wxvariantinsert
}
321 \func{void
}{Insert
}{\param{const wxVariant\&
}{ value
}}
323 Inserts a value at the front of the list.
325 \membersection{wxVariant::IsNull
}\label{wxvariantisnull
}
327 \constfunc{bool
}{IsNull
}{\void}
329 Returns true if there is no data associated with this variant, false if there is data.
331 \membersection{wxVariant::IsType
}\label{wxvariantistype
}
333 \constfunc{bool
}{IsType
}{\param{const wxString\&
}{ type
}}
335 Returns true if
{\it type
} matches the type of the variant, false otherwise.
337 \membersection{wxVariant::IsValueKindOf
}\label{wxvariantisvaluekindof
}
339 \constfunc{bool
}{IsValueKindOf
}{\param{const wxClassInfo* type
}{ type
}}
341 Returns true if the data is derived from the class described by
{\it type
}, false otherwise.
343 \membersection{wxVariant::MakeNull
}\label{wxvariantmakenull
}
345 \func{void
}{MakeNull
}{\void}
347 Makes the variant null by deleting the internal data.
349 \membersection{wxVariant::MakeString
}\label{wxvariantmakestring
}
351 \constfunc{wxString
}{MakeString
}{\void}
353 Makes a string representation of the variant value (for any type).
355 \membersection{wxVariant::Member
}\label{wxvariantmember
}
357 \constfunc{bool
}{Member
}{\param{const wxVariant\&
}{ value
}}
359 Returns true if
{\it value
} matches an element in the list.
361 \membersection{wxVariant::NullList
}\label{wxvariantnulllist
}
363 \func{void
}{NullList
}{\void}
365 Makes an empty list. This differs from a null variant which has no data; a null list
366 is of type list, but the number of elements in the list is zero.
368 \membersection{wxVariant::SetData
}\label{wxvariantsetdata
}
370 \func{void
}{SetData
}{\param{wxVariantData*
}{ data
}}
372 Sets the internal variant data, deleting the existing data if there is any.
374 \membersection{wxVariant::Unshare
}\label{wxvariantunshare
}
376 \func{bool
}{Unshare
}{\void}
378 Makes sure that any data associated with this variant is not shared with other
379 variants. For this to work,
\helpref{wxVariantData::Clone
}{wxvariantdataclone
} must
380 be implemented for the data types you are working with. Clone is implemented
381 for all the default data types.
383 \membersection{wxVariant::operator $=$
}\label{wxvariantassignment
}
385 \func{void
}{operator $=$
}{\param{const wxVariant\&
}{value
}}
387 \func{void
}{operator $=$
}{\param{wxVariantData*
}{value
}}
389 \func{void
}{operator $=$
}{\param{const wxString\&
}{value
}}
391 \func{void
}{operator $=$
}{\param{const wxChar*
}{value
}}
393 \func{void
}{operator $=$
}{\param{wxChar
}{value
}}
395 \func{void
}{operator $=$
}{\param{const long
}{value
}}
397 \func{void
}{operator $=$
}{\param{const bool
}{value
}}
399 \func{void
}{operator $=$
}{\param{const double
}{value
}}
401 \func{void
}{operator $=$
}{\param{void*
}{value
}}
403 \func{void
}{operator $=$
}{\param{wxObject*
}{value
}}
405 \func{void
}{operator $=$
}{\param{const wxVariantList\&
}{value
}}
407 \func{void
}{operator $=$
}{\param{const wxDateTime\&
}{value
}}
409 \func{void
}{operator $=$
}{\param{const wxArrayString\&
}{value
}}
411 \func{void
}{operator $=$
}{\param{const DATE
\_STRUCT*
}{value
}}
413 \func{void
}{operator $=$
}{\param{const TIME
\_STRUCT*
}{value
}}
415 \func{void
}{operator $=$
}{\param{const TIMESTAMP
\_STRUCT*
}{value
}}
417 Assignment operators, using
\helpref{reference counting
}{trefcount
} when possible.
419 \membersection{wxVariant::operator $==$
}\label{wxvarianteq
}
421 \constfunc{bool
}{operator $==$
}{\param{const wxVariant\&
}{value
}}
423 \constfunc{bool
}{operator $==$
}{\param{const wxString\&
}{value
}}
425 \constfunc{bool
}{operator $==$
}{\param{const wxChar*
}{value
}}
427 \constfunc{bool
}{operator $==$
}{\param{wxChar
}{value
}}
429 \constfunc{bool
}{operator $==$
}{\param{const long
}{value
}}
431 \constfunc{bool
}{operator $==$
}{\param{const bool
}{value
}}
433 \constfunc{bool
}{operator $==$
}{\param{const double
}{value
}}
435 \constfunc{bool
}{operator $==$
}{\param{void*
}{value
}}
437 \constfunc{bool
}{operator $==$
}{\param{wxObject*
}{value
}}
439 \constfunc{bool
}{operator $==$
}{\param{const wxVariantList\&
}{value
}}
441 \constfunc{bool
}{operator $==$
}{\param{const wxArrayString\&
}{value
}}
443 \constfunc{bool
}{operator $==$
}{\param{const wxDateTime\&
}{value
}}
445 Equality test operators.
447 \membersection{wxVariant::operator $!=$
}\label{wxvariantneq
}
449 \constfunc{bool
}{operator $!=$
}{\param{const wxVariant\&
}{value
}}
451 \constfunc{bool
}{operator $!=$
}{\param{const wxString\&
}{value
}}
453 \constfunc{bool
}{operator $!=$
}{\param{const wxChar*
}{value
}}
455 \constfunc{bool
}{operator $!=$
}{\param{wxChar
}{value
}}
457 \constfunc{bool
}{operator $!=$
}{\param{const long
}{value
}}
459 \constfunc{bool
}{operator $!=$
}{\param{const bool
}{value
}}
461 \constfunc{bool
}{operator $!=$
}{\param{const double
}{value
}}
463 \constfunc{bool
}{operator $!=$
}{\param{void*
}{value
}}
465 \constfunc{bool
}{operator $!=$
}{\param{wxObject*
}{value
}}
467 \constfunc{bool
}{operator $!=$
}{\param{const wxVariantList\&
}{value
}}
469 \constfunc{bool
}{operator $!=$
}{\param{const wxArrayString\&
}{value
}}
471 \constfunc{bool
}{operator $!=$
}{\param{const wxDateTime\&
}{value
}}
473 Inequality test operators.
475 \membersection{wxVariant::operator $
[]$
}\label{wxvariantarray
}
477 \constfunc{wxVariant
}{operator $
[]$
}{\param{size
\_t }{idx
}}
479 Returns the value at
{\it idx
} (zero-based).
481 \func{wxVariant\&
}{operator $
[]$
}{\param{size
\_t }{idx
}}
483 Returns a reference to the value at
{\it idx
} (zero-based). This can be used
484 to change the value at this index.
486 \membersection{wxVariant::operator wxChar
}\label{wxvariantchar
}
488 \constfunc{char
}{operator wxChar
}{\void}
490 Operator for implicit conversion to a wxChar, using
\helpref{wxVariant::GetChar
}{wxvariantgetchar
}.
492 \membersection{wxVariant::operator double
}\label{wxvariantdouble
}
494 \constfunc{double
}{operator double
}{\void}
496 Operator for implicit conversion to a double, using
\helpref{wxVariant::GetDouble
}{wxvariantgetdouble
}.
498 \constfunc{long
}{operator long
}{\void}
500 Operator for implicit conversion to a long, using
\helpref{wxVariant::GetLong
}{wxvariantgetlong
}.
502 \membersection{wxVariant::operator wxString
}\label{wxvariantwxstring
}
504 \constfunc{wxString
}{operator wxString
}{\void}
506 Operator for implicit conversion to a string, using
\helpref{wxVariant::MakeString
}{wxvariantmakestring
}.
508 \membersection{wxVariant::operator void*
}\label{wxvariantvoid
}
510 \constfunc{void*
}{operator void*
}{\void}
512 Operator for implicit conversion to a pointer to a void, using
\helpref{wxVariant::GetVoidPtr
}{wxvariantgetvoidptr
}.
514 \membersection{wxVariant::operator wxDateTime
}\label{wxvariantdatetime
}
516 \constfunc{void*
}{operator wxDateTime
}{\void}
518 Operator for implicit conversion to a pointer to a
\helpref{wxDateTime
}{wxdatetime
}, using
\helpref{wxVariant::GetDateTime
}{wxvariantgetdatetime
}.
525 \section{\class{wxVariantData
}}\label{wxvariantdata
}
527 The
{\bf wxVariantData
} class is used to implement a new type for
\helpref{wxVariant
}{wxvariant
}.
528 Derive from wxVariantData, and override the pure virtual functions.
530 wxVariantData is
\helpref{reference counted
}{refcount
}, but you don't normally have to care about this,
531 as wxVariant manages the count automatically. However, in case your application needs to take
532 ownership of wxVariantData, be aware that the object is created with reference count of
1,
533 and passing it to wxVariant will not increase this. In other words,
\helpref{IncRef
}{wxvariantdataincref
}
534 needs to be called only if you both take ownership of wxVariantData and pass it to a wxVariant.
535 Also note that the destructor is protected, so you can never explicitly delete a wxVariantData
536 instance. Instead,
\helpref{DecRef
}{wxvariantdatadecref
} will delete the object automatically
537 when the reference count reaches zero.
539 \wxheading{Include files
}
543 \wxheading{Derived from
}
549 \helpref{wxBase
}{librarieslist
}
553 \helpref{wxVariant
}{wxvariant
}
555 \latexignore{\rtfignore{\wxheading{Members
}}}
557 \membersection{wxVariantData::wxVariantData
}\label{wxvariantdatactor
}
559 \func{}{wxVariantData
}{\void}
563 \membersection{wxVariantData::Clone
}\label{wxvariantdataclone
}
565 \constfunc{wxVariantData*
}{Clone
}{\void}
567 This function can be overridden to clone the data.
568 Implement Clone if you wish
\helpref{wxVariant::Unshare
}{wxvariantunshare
} to work
569 for your data. This function is implemented for all built-in data types.
571 \membersection{wxVariantData::DecRef
}\label{wxvariantdatadecref
}
573 \func{void
}{DecRef
}{\void}
575 Decreases reference count. If the count reaches zero, the object is
576 automatically deleted.
578 Note that destructor of wxVariantData is protected, so delete
579 cannot be used as normal. Instead,
\helpref{DecRef
}{wxvariantdatadecref
} should be called.
582 \membersection{wxVariantData::Eq
}\label{wxvariantdataeq
}
584 \constfunc{bool
}{Eq
}{\param{wxVariantData\&
}{ data
}}
586 Returns true if this object is equal to
{\it data
}.
588 \membersection{wxVariantData::GetType
}\label{wxvariantdatagettype
}
590 \constfunc{wxString
}{GetType
}{\void}
592 Returns the string type of the data.
594 \membersection{wxVariantData::GetValueClassInfo
}\label{wxvariantdatagetvalueclassinfo
}
596 \constfunc{wxClassInfo*
}{GetValueClassInfo
}{\void}
598 If the data is a wxObject returns a pointer to the objects wxClassInfo structure, if
599 the data isn't a wxObject the method returns NULL.
601 \membersection{wxVariantData::IncRef
}\label{wxvariantdataincref
}
603 \func{void
}{IncRef
}{\void}
605 Increases reference count. Note that initially wxVariantData has reference count of
1.
607 \membersection{wxVariantData::Read
}\label{wxvariantdataread
}
609 \func{bool
}{Read
}{\param{ostream\&
}{ stream
}}
611 \func{bool
}{Read
}{\param{wxString\&
}{ string
}}
613 Reads the data from
{\it stream
} or
{\it string
}.
615 \membersection{wxVariantData::Write
}\label{wxvariantdatawrite
}
617 \constfunc{bool
}{Write
}{\param{ostream\&
}{ stream
}}
619 \constfunc{bool
}{Write
}{\param{wxString\&
}{ string
}}
621 Writes the data to
{\it stream
} or
{\it string
}.
624 \membersection{wxGetVariantCast
}\label{wxgetvariantcast
}
626 \func{classname *
}{wxGetVariantCast
}{wxVariant\&, classname
}
628 This macro returns the data stored in
{\it variant
} cast to the type
{\it classname *
} if
629 the data is of this type (the check is done during the run-time) or
630 {\tt NULL
} otherwise.
635 \helpref{RTTI overview
}{runtimeclassoverview
}\\
636 \helpref{wxDynamicCast
}{wxdynamiccast
}