Variant.cpp
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package ArmarXCore::core
19 * @author Kai Welke (welke at kit dot edu)
20 * @date 2011
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#include <limits>
26#include <unordered_map>
27
35
36template class ::IceInternal::Handle<::armarx::Variant>;
37
38namespace armarx
39{
40 template <>
41 Variant::Variant(const std::int8_t& var, void*) : Variant(static_cast<std::int32_t>(var))
42 {
43 }
44
45 template <>
46 std::int8_t
48 {
49 int i = getInt();
50 ARMARX_CHECK_GREATER_EQUAL(i, std::numeric_limits<std::int8_t>::min());
51 ARMARX_CHECK_LESS_EQUAL(i, std::numeric_limits<std::int8_t>::max());
52 return static_cast<std::int8_t>(i);
53 }
54
55 template <>
56 void
57 Variant::set<std::int8_t>(const std::int8_t& value)
58 {
59 setInt(static_cast<int>(value));
60 }
61
62 template <>
63 Variant::Variant(const std::int16_t& var, void*) : Variant(static_cast<std::int32_t>(var))
64 {
65 }
66
67 template <>
68 std::int16_t
70 {
71 int i = getInt();
72 ARMARX_CHECK_GREATER_EQUAL(i, std::numeric_limits<std::int16_t>::min());
73 ARMARX_CHECK_LESS_EQUAL(i, std::numeric_limits<std::int16_t>::max());
74 return static_cast<std::int16_t>(i);
75 }
76
77 template <>
78 void
79 Variant::set<std::int16_t>(const std::int16_t& value)
80 {
81 setInt(static_cast<int>(value));
82 }
83
84 template <>
85 Variant::Variant(const std::int32_t& var, void*)
86 {
87 data = new IntVariantData(static_cast<int>(var));
88 typeId = VariantType::Int;
89 initialized = true;
90 }
91
92 template <>
93 std::int32_t
95 {
96 int i = getInt();
97 ARMARX_CHECK_GREATER_EQUAL(i, std::numeric_limits<std::int32_t>::min());
98 ARMARX_CHECK_LESS_EQUAL(i, std::numeric_limits<std::int32_t>::max());
99 return static_cast<std::int32_t>(i);
100 }
101
102 template <>
103 void
104 Variant::set<std::int32_t>(const std::int32_t& value)
105 {
106 setInt(static_cast<int>(value));
107 }
108
109 template <>
110 Variant::Variant(const std::int64_t& var, void*)
111 {
112 data = new LongVariantData(static_cast<long>(var));
113 typeId = VariantType::Long;
114 initialized = true;
115 }
116
117 template <>
118 std::int64_t
120 {
121 long i = getLong();
122 return static_cast<std::int64_t>(i);
123 }
124
125 template <>
126 void
127 Variant::set<std::int64_t>(const std::int64_t& value)
128 {
129 setLong(static_cast<long>(value));
130 }
131
132 template <>
133 Variant::Variant(const std::uint8_t& var, void*) : Variant(static_cast<std::uint32_t>(var))
134 {
135 }
136
137 template <>
138 std::uint8_t
140 {
141 int i = getInt();
142 ARMARX_CHECK_GREATER_EQUAL(i, std::numeric_limits<std::uint8_t>::min());
143 ARMARX_CHECK_LESS_EQUAL(i, std::numeric_limits<std::uint8_t>::max());
144 return static_cast<std::uint8_t>(i);
145 }
146
147 template <>
148 void
149 Variant::set<std::uint8_t>(const std::uint8_t& value)
150 {
151 setInt(static_cast<int>(value));
152 }
153
154 template <>
155 Variant::Variant(const std::uint16_t& var, void*) : Variant(static_cast<std::uint32_t>(var))
156 {
157 }
158
159 template <>
160 std::uint16_t
162 {
163 int i = getInt();
164 ARMARX_CHECK_GREATER_EQUAL(i, std::numeric_limits<std::uint16_t>::min());
165 ARMARX_CHECK_LESS_EQUAL(i, std::numeric_limits<std::uint16_t>::max());
166 return static_cast<std::uint16_t>(i);
167 }
168
169 template <>
170 void
171 Variant::set<std::uint16_t>(const std::uint16_t& value)
172 {
173 setInt(static_cast<int>(value));
174 }
175
176 template <>
177 Variant::Variant(const std::uint32_t& var, void*)
178 {
179 ARMARX_CHECK_LESS_EQUAL(var, std::numeric_limits<int>::max());
180 data = new IntVariantData(static_cast<int>(var));
181 typeId = VariantType::Int;
182 initialized = true;
183 }
184
185 template <>
186 std::uint32_t
188 {
189 int i = getInt();
191 ARMARX_CHECK_LESS_EQUAL(static_cast<std::uint32_t>(i),
192 std::numeric_limits<std::uint32_t>::max());
193 return static_cast<std::uint32_t>(i);
194 }
195
196 template <>
197 void
198 Variant::set<std::uint32_t>(const std::uint32_t& value)
199 {
200 setInt(static_cast<int>(value));
201 }
202
203 template <>
204 Variant::Variant(const std::uint64_t& var, void*)
205 {
206 ARMARX_CHECK_LESS_EQUAL(var, std::numeric_limits<long>::max());
207 data = new LongVariantData(static_cast<long>(var));
208 typeId = VariantType::Long;
209 initialized = true;
210 }
211
212 template <>
213 std::uint64_t
215 {
216 long i = getLong();
218 return static_cast<std::uint64_t>(i);
219 }
220
221 template <>
222 void
223 Variant::set<std::uint64_t>(const std::uint64_t& value)
224 {
225 ARMARX_CHECK_LESS_EQUAL(value, std::numeric_limits<long>::max());
226 setLong(static_cast<long>(value));
227 }
228
229 template <>
230 Variant::Variant(const float& var, void*)
231 {
232 data = new FloatVariantData(var);
233 typeId = VariantType::Float;
234 initialized = true;
235 }
236
237 template <>
238 Variant::Variant(const double& var, void*)
239 {
240 data = new DoubleVariantData(var);
241 typeId = VariantType::Double;
242 initialized = true;
243 }
244
245 template <>
246 Variant::Variant(const bool& var, void*)
247 {
248 data = new BoolVariantData(var);
249 typeId = VariantType::Bool;
250 initialized = true;
251 }
252
253 template <>
254 Variant::Variant(const std::string& var, void*)
255 {
256 data = new StringVariantData(var);
257 typeId = VariantType::String;
258 initialized = true;
259 }
260
261 template <>
262 bool
263 Variant::get<bool>() const
264 {
265 return getBool();
266 }
267
268 template <>
269 float
270 Variant::get<float>() const
271 {
272 return getFloat();
273 }
274
275 template <>
276 double
278 {
279 return getDouble();
280 }
281
282 template <>
283 std::string
285 {
286 return getString();
287 }
288
289 template <>
290 void
291 Variant::set<bool>(const bool& value)
292 {
293 setBool(value);
294 }
295
296 template <>
297 void
298 Variant::set<float>(const float& value)
299 {
300 setFloat(value);
301 }
302
303 template <>
304 void
305 Variant::set<double>(const double& value)
306 {
307 setDouble(value);
308 }
309
310 template <>
311 void
312 Variant::set<std::string>(const std::string& value)
313 {
314 setString(value);
315 }
316
317 Variant::Variant() : IceUtil::Shared(), VariantBase()
318 {
319 invalidate();
320 }
321
322 Variant::Variant(const Variant& source) :
323 IceUtil::Shared(source), Ice::Object(source), VariantBase(source)
324 {
325 ARMARX_CHECK_EXPRESSION(source.data);
326
327 data = VariantDataPtr::dynamicCast(source.data->ice_clone());
328 setType(source.typeId);
329 initialized = source.initialized;
330 }
331
334 {
335 return new Variant(*this);
336 }
337
338 // *******************************************************
339 // setter
340 // *******************************************************
341
342 void
343 Variant::setType(VariantTypeId typeId, const Ice::Current&)
344 {
345 if (getType() != VariantType::Invalid && (getType() != typeId))
346 throw LocalException(
347 "A Variant's type cannot be changed after it was set! Current Variant type: ")
349 << " Requested Type: " << Variant::typeToString(typeId);
350
351 this->typeId = typeId;
352 }
353
354 void
355 Variant::setInt(int n, const Ice::Current&)
356 {
358 {
360 }
361
362 if (!getInitialized())
363 {
364 data = new IntVariantData();
365 }
366
368 IntVariantDataPtr::dynamicCast(this->data)->n = n;
369 }
370
371 void
372 Variant::setLong(long n, const Ice::Current&)
373 {
375 {
377 getType(), VariantType::Long, __FUNCTION__);
378 }
379
380 if (!getInitialized())
381 {
382 data = new LongVariantData();
383 }
384
386 LongVariantDataPtr::dynamicCast(this->data)->n = n;
387 }
388
389 void
390 Variant::setFloat(float f, const Ice::Current&)
391 {
393 {
395 getType(), VariantType::Float, __FUNCTION__);
396 }
397
398 if (!getInitialized())
399 {
400 data = new FloatVariantData();
401 }
402
404
405 FloatVariantDataPtr::dynamicCast(this->data)->f = f;
406 }
407
408 void
409 Variant::setDouble(double d, const Ice::Current&)
410 {
412 {
414 getType(), VariantType::Double, __FUNCTION__);
415 }
416
417 if (!getInitialized())
418 {
419 data = new DoubleVariantData();
420 }
421
423
424 DoubleVariantDataPtr::dynamicCast(this->data)->d = d;
425 }
426
427 void
428 Variant::setString(const std::string& s, const Ice::Current&)
429 {
431 {
433 getType(), VariantType::String, __FUNCTION__);
434 }
435
436 if (!getInitialized())
437 {
438 data = new StringVariantData();
439 }
440
442
443 StringVariantDataPtr::dynamicCast(this->data)->s = s;
444 }
445
446 void
447 Variant::setBool(bool b, const Ice::Current&)
448 {
450 {
452 getType(), VariantType::Bool, __FUNCTION__);
453 }
454
455 if (!getInitialized())
456 {
457 data = new BoolVariantData();
458 }
459
461
462 BoolVariantDataPtr::dynamicCast(this->data)->b = b;
463 }
464
465 void
466 Variant::setClass(const VariantDataClassPtr& variantDataClass)
467 {
468 if (getType() != VariantType::Invalid && (getType() != variantDataClass->getType()))
469 {
471 getType(), variantDataClass->getType(), __FUNCTION__);
472 }
473
474 data = variantDataClass /*->clone()*/;
475 setType(variantDataClass->getType());
476 }
477
478 void
479 Variant::setClass(const VariantDataClass& variantDataClass)
480 {
481 if (getType() != VariantType::Invalid && (getType() != variantDataClass.getType()))
482 {
484 getType(), variantDataClass.getType(), __FUNCTION__);
485 }
486
487 data = variantDataClass.clone();
488 setType(variantDataClass.getType());
489 }
490
491 // *******************************************************
492 // getter
493 // *******************************************************
494 int
495 Variant::getInt(const Ice::Current&) const
496 {
497 if (getType() != VariantType::Int)
498 {
500 }
501
502 if (!getInitialized())
503 {
505 }
506
507 IntVariantData* dataPtr = static_cast<IntVariantData*>(this->data.get());
508
509 return dataPtr->n;
510 }
511
512 long
513 Variant::getLong(const Ice::Current&) const
514 {
515 if (getType() != VariantType::Long)
516 {
518 getType(), VariantType::Long, __FUNCTION__);
519 }
520
521 if (!getInitialized())
522 {
524 }
525
526 LongVariantData* dataPtr = static_cast<LongVariantData*>(this->data.get());
527
528 return dataPtr->n;
529 }
530
531 float
532 Variant::getFloat(const Ice::Current&) const
533 {
535 {
537 getType(), VariantType::Float, __FUNCTION__);
538 }
539
540 if (!getInitialized())
541 {
543 }
544
545 FloatVariantData* dataPtr = static_cast<FloatVariantData*>(this->data.get());
546
547 return dataPtr->f;
548 }
549
550 double
551 Variant::getDouble(const Ice::Current&) const
552 {
554 {
556 getType(), VariantType::Double, __FUNCTION__);
557 }
558
559 if (!getInitialized())
560 {
562 }
563
564 DoubleVariantData* dataPtr = static_cast<DoubleVariantData*>(this->data.get());
565
566 return dataPtr->d;
567 }
568
569 std::string
570 Variant::getString(const Ice::Current&) const
571 {
573 {
575 getType(), VariantType::String, __FUNCTION__);
576 }
577
578 if (!getInitialized())
579 {
581 }
582
583 StringVariantData* dataPtr = static_cast<StringVariantData*>(this->data.get());
584
585 return dataPtr->s;
586 }
587
588 bool
589 Variant::getBool(const Ice::Current&) const
590 {
591 if (getType() != VariantType::Bool)
592 {
594 getType(), VariantType::Bool, __FUNCTION__);
595 }
596
597 if (!getInitialized())
598 {
600 }
601
602 BoolVariantData* dataPtr = static_cast<BoolVariantData*>(this->data.get());
603
604 return dataPtr->b;
605 }
606
607 std::string
609 {
610 VariantTypeId type = getType();
611 std::stringstream stream;
612 stream.precision(std::numeric_limits<double>::digits10);
613
614 if (!getInitialized())
615 {
616 stream << "Not Initialized";
617 }
618 else if (type == VariantType::Invalid)
619 {
620 stream << "n/a";
621 }
622 else if (type == VariantType::Int)
623 {
624 stream << getInt();
625 }
626 else if (type == VariantType::Long)
627 {
628 stream << getLong();
629 }
630 else if (type == VariantType::Float)
631 {
632 stream << getFloat();
633 }
634 else if (type == VariantType::Double)
635 {
636 stream << getDouble();
637 }
638 else if (type == VariantType::String)
639 {
640 stream << getString();
641 }
642 else if (type == VariantType::Bool)
643 {
644 if (getBool() == true)
645 {
646 stream << "True";
647 }
648 else
649 {
650 stream << "False";
651 }
652 }
653 else
654 {
655
656 VariantDataClassPtr ptr = VariantDataClassPtr::dynamicCast(this->data);
657
658 if (!data)
659 {
660 stream << "NULLDATA (" << typeToString(type) << ")";
661 }
662 else if (ptr)
663 {
664 stream << ptr->output();
665 }
666 else
667 {
668 stream << data.get() << "(NULLCAST for" << typeToString(type) << ")";
669 }
670 }
671
672 return stream.str();
673 }
674
675 // *******************************************************
676 // properties
677 // *******************************************************
679 Variant::getType(const Ice::Current&) const
680 {
681 return typeId;
682 }
683
684 std::string
685 Variant::getTypeName(const Ice::Current&) const
686 {
687 try
688 {
689 return typeToString(typeId);
690 }
692 {
693 return "UnknownType";
694 }
695 }
696
697 bool
698 Variant::getInitialized(const Ice::Current&) const
699 {
700 if (!initialized)
701 {
703 }
704 return initialized;
705 }
706
707 bool
708 Variant::validate(const Ice::Current&) const
709 {
710 if (!getInitialized())
711 {
712 return false;
713 }
714
715 if (data->ice_id() == VariantData::ice_staticId())
716 {
718 }
719
720 VariantDataClassPtr classPtr = VariantDataClassPtr::dynamicCast(data);
721
722 if (classPtr)
723 {
724 return classPtr->validate();
725 }
726
727 return true; // basic variant types are always valid
728 }
729
730 // *******************************************************
731 // operator
732 // *******************************************************
733 Variant&
734 Variant::operator=(const VariantDataClass& prototype)
735 {
736 if (getType() != VariantType::Invalid && (getType() != prototype.getType()))
737 {
739 getType(), prototype.getType(), __FUNCTION__);
740 }
741
742 data = VariantDataPtr::dynamicCast(prototype.ice_clone());
743 setType(hashTypeName(prototype.ice_id()));
744
745 return *this;
746 }
747
748 Variant&
749 Variant::operator=(const VariantDataClassPtr& prototype)
750 {
751 if (getType() != VariantType::Invalid && (getType() != prototype->getType()))
752 {
754 getType(), prototype->getType(), __FUNCTION__);
755 }
756
757 data = VariantDataPtr::dynamicCast(prototype->ice_clone());
758 setType(hashTypeName(prototype->ice_id()));
759
760 return *this;
761 }
762
763 Variant&
764 Variant::operator=(const Variant& prototype)
765 {
766 if (getType() != VariantType::Invalid && (getType() != prototype.getType()))
767 {
769 getType(), prototype.getType(), __FUNCTION__);
770 }
771
772 data = VariantDataPtr::dynamicCast(prototype.data->ice_clone());
773 setType(prototype.typeId);
774
775 return *this;
776 }
777
778 // *******************************************************
779 // private methods
780 // *******************************************************
781 void
782 Variant::output(std::ostream& stream) const
783 {
784 VariantTypeId type = getType();
785
786 try
787 {
788 stream << "(" << Variant::typeToString(type) << ") ";
789 }
791 {
792 stream << "(UNKNOWNTYPE) ";
793 }
794
795 if (!getInitialized())
796 {
797 stream << "not Initialized ";
798 return;
799 }
800
801 stream << getOutputValueOnly();
802 }
803
804 void
805 Variant::invalidate()
806 {
807 data = new InvalidVariantData();
808 typeId = VariantType::Invalid;
809 initialized = false;
810 }
811
812 int
813 Variant::hashTypeName(const std::string& typeName)
814 {
815 static std::unordered_map<std::string, VariantTypeId> idMap;
816 auto it = idMap.find(typeName);
817
818 if (it != idMap.end())
819 {
820 return it->second;
821 }
822
823 int hash = 0;
824 int index = 0;
825 int ch;
826
827 while ((ch = typeName[index++]))
828 {
829 /* hash = hash * 33 ^ c */
830 hash = ((hash << 5) + hash) ^ ch;
831 }
832
833 idMap[typeName] = hash;
834 return hash;
835 }
836
837 std::map<VariantTypeId, std::string>&
838 Variant::types()
839 {
840 static std::map<VariantTypeId, std::string> types = std::map<VariantTypeId, std::string>();
841 return types;
842 }
843
844 // *******************************************************
845 // static methods for type handling
846 // *******************************************************
847 std::string
849 {
850 auto& typeMap = types();
851 std::map<VariantTypeId, std::string>::iterator it = typeMap.find(type);
852
853
854 if (it == types().end())
855 {
857 }
858
859 return it->second;
860 }
861
862 const std::map<VariantTypeId, std::string>&
864 {
865 return types();
866 }
867
869 Variant::addTypeName(const std::string& typeName)
870 {
871 int hash = hashTypeName(typeName);
872 std::pair<unsigned int, std::string> entry;
873 entry.first = hash;
874 entry.second = typeName;
875 // std::cout << typeName << ": " << hash << std::endl;
876 // if(types().find(hash) != types().end())
877 // throw LocalException("A Type with this string ('" +typeName + "') is already added. It has to be renamed.");
878 std::map<VariantTypeId, std::string>::iterator it = types().find(hash);
879
880 if (it != types().end() && typeName != it->second)
881 {
882 throw LocalException("A Type with the same hash value is already added. It has to be "
883 "renamed. TypeName: " +
884 typeName);
885 }
886
887 Variant::types().insert(entry);
888
889 return hash;
890 }
891
892 bool
894 {
895 if (id == VariantType::Bool || id == VariantType::Float || id == VariantType::Double ||
897 {
898 return true;
899 }
900 else
901 {
902 return false;
903 }
904 }
905
906 std::ostream&
907 operator<<(std::ostream& stream, const VariantDataClass& variant)
908 {
909 stream << variant.output();
910 return stream;
911 }
912
913} // namespace armarx
uint8_t index
The Variant class is described here: Variants.
Definition Variant.h:224
bool getInitialized(const Ice::Current &c=Ice::emptyCurrent) const override
Tells if the Variant is properly initialized.
Definition Variant.cpp:698
std::enable_if_t< std::is_base_of_v< VariantDataClass, T > > set(const VariantDataClassPtr &variantDataClass)
Template-based setter for the Variant's value for VariantDataClass-instances.
Definition Variant.h:504
VariantTypeId getType(const Ice::Current &c=Ice::emptyCurrent) const override
Return the Variant's internal type.
Definition Variant.cpp:679
static const std::map< VariantTypeId, std::string > & getTypes()
Returns the mapping of currently registered types.
Definition Variant.cpp:863
void setClass(const VariantDataClassPtr &variantDataClass)
Sets the Variant's value to variantDataClass.
Definition Variant.cpp:466
Variant & operator=(int n)
Definition Variant.h:609
virtual std::string getOutputValueOnly() const
Returns the formatted content of the Variant as a string.
Definition Variant.cpp:608
void setLong(long n, const Ice::Current &c=Ice::emptyCurrent) override
Sets the Variant's value to n.
Definition Variant.cpp:372
void setFloat(float f, const Ice::Current &c=Ice::emptyCurrent) override
Sets the Variant's value to f.
Definition Variant.cpp:390
std::string getString(const Ice::Current &c=Ice::emptyCurrent) const override
Return the Variant's value as string.
Definition Variant.cpp:570
void setInt(int n, const Ice::Current &c=Ice::emptyCurrent) override
Sets the Variant's value to n.
Definition Variant.cpp:355
virtual VariantPtr clone() const
Returns a copy of the Variant.
Definition Variant.cpp:333
int getInt(const Ice::Current &c=Ice::emptyCurrent) const override
Return the Variant's value as int.
Definition Variant.cpp:495
static VariantTypeId addTypeName(const std::string &typeName)
Register a new type for the use in a Variant.
Definition Variant.cpp:869
bool getBool(const Ice::Current &c=Ice::emptyCurrent) const override
Return the Variant's value as bool.
Definition Variant.cpp:589
void setString(const std::string &s, const Ice::Current &c=Ice::emptyCurrent) override
Sets the Variant's value to s.
Definition Variant.cpp:428
std::enable_if_t< std::is_base_of_v< VariantDataClass, T >, IceInternal::Handle< T > > get() const
Template-based getter for the Variant's value.
Definition Variant.h:553
void setBool(bool b, const Ice::Current &c=Ice::emptyCurrent) override
Sets the Variant's value to b.
Definition Variant.cpp:447
std::string getTypeName(const Ice::Current &c=Ice::emptyCurrent) const override
Return the Variant's internal type.
Definition Variant.cpp:685
static int hashTypeName(const std::string &typeName)
Compute and return a hash value for a given type name.
Definition Variant.cpp:813
long getLong(const Ice::Current &c=Ice::emptyCurrent) const override
Return the Variant's value as long.
Definition Variant.cpp:513
double getDouble(const Ice::Current &c=Ice::emptyCurrent) const override
Return the Variant's value as double.
Definition Variant.cpp:551
static std::string typeToString(VariantTypeId typeId)
Return the name of the registered type typeId.
Definition Variant.cpp:848
void output(std::ostream &stream) const
Outputs a formatted representation of the Variant to stream.
Definition Variant.cpp:782
void setType(VariantTypeId typeId, const Ice::Current &c=Ice::emptyCurrent) override
Sets the Variant's type to typeId.
Definition Variant.cpp:343
float getFloat(const Ice::Current &c=Ice::emptyCurrent) const override
Return the Variant's value as float.
Definition Variant.cpp:532
bool validate(const Ice::Current &c=Ice::emptyCurrent) const override
Checks if the Variant is initialized and the stored value is valid with respect to the Variant's type...
Definition Variant.cpp:708
void setDouble(double d, const Ice::Current &c=Ice::emptyCurrent) override
Sets the Variant's value to d.
Definition Variant.cpp:409
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#define ARMARX_CHECK_LESS_EQUAL(lhs, rhs)
This macro evaluates whether lhs is less or equal (<=) rhs and if it turns out to be false it will th...
#define ARMARX_CHECK_GREATER_EQUAL(lhs, rhs)
This macro evaluates whether lhs is greater or equal (>=) rhs and if it turns out to be false it will...
const VariantTypeId String
Definition Variant.h:921
const VariantTypeId Invalid
Definition Variant.h:915
const VariantTypeId Int
Definition Variant.h:917
const VariantTypeId Long
Definition Variant.h:918
const VariantTypeId Bool
Definition Variant.h:916
bool IsBasicType(VariantTypeId id)
Definition Variant.cpp:893
const VariantTypeId Double
Definition Variant.h:920
const VariantTypeId Float
Definition Variant.h:919
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::ostream & operator<<(std::ostream &os, const PythonApplicationManager::Paths &paths)
IceInternal::Handle< Variant > VariantPtr
Definition Variant.h:41
Ice::Int VariantTypeId
Definition Variant.h:43