FRX SDK Documentation 2025 SP0
Loading...
Searching...
No Matches
AcGiVariant.h
Go to the documentation of this file.
1#pragma once
2
3//
4// (C) Copyright 2005-2024 by Graebert GmbH.
5//
6// Permission to use, copy, modify, and distribute this software in
7// object code form for any purpose and without fee is hereby granted,
8// provided that the above copyright notice appears in all copies and
9// that both that copyright notice and the limited warranty and
10// restricted rights notice below appear in all supporting
11// documentation.
12//
13// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
14// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
15// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
16// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
17// UNINTERRUPTED OR ERROR FREE.
18
19#include "..\acad\Acad.h"
20
21class AcCmColor;
22class AcRxClass;
23class AcRxObject;
24class AcString;
25
27{
28public:
29
30 double red;
31 double green;
32 double blue;
34 AcGiColorRGB(double, double, double);
35};
36
38{
39public:
41 {
42 kUndefined = 0,
48 kTable
49 };
50
51 public:
53 {
54 public:
55 explicit EnumType(int value) : m_value(value) { }
56 template <typename T> operator T() { return static_cast<T>(m_value); }
57 template <typename T> bool operator ==(T right) const { return static_cast<int>(right) == m_value; }
58 template <typename T> bool operator !=(T right) const { return !(*this == right); }
59 protected:
61 };
62
63public:
68 AcGiVariant(double);
71 AcGiVariant(wchar_t const *);
72 bool asBoolean(void)const ;
73 AcCmColor asColor(void)const ;
75 AcGiVariant * getElemAt(int,wchar_t * &)const ;
76 AcGiVariant const * getElem(wchar_t * const)const ;
77 AcString asString(void)const ;
78 double asDouble(void)const ;
79 VariantType type(void)const ;
80 Acad::ErrorStatus getElem(wchar_t * const, AcGiVariant &)const ;
81 Acad::ErrorStatus getElemAt(int,wchar_t * &, AcGiVariant &)const ;
82 int asInt(void)const ;
83 int getElemCount(void)const ;
84
85
87 virtual bool operator==( AcGiVariant const &)const ;
88
89 virtual Acad::ErrorStatus copyFrom( AcRxObject const *);
90 void deleteElem(wchar_t * const);
91 void set(bool);
92 void set( AcCmColor const &);
93 void set(double);
94 void set(long);
95 void set(wchar_t const *);
96 void setElem(wchar_t * const, AcGiVariant const &);
97
98};
ARX_API bool operator!=(wchar_t, AcString const &)
ARX_API bool operator==(wchar_t, AcString const &)
Acad::ErrorStatus ErrorStatus
Definition acdbabb.h:21
#define ACRX_DECLARE_MEMBERS(classname)
Definition addmacro.h:756
AcGiColorRGB(double, double, double)
AcGiColorRGB(void)