class AidlConstantValue

Defined at line 620 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

Public Methods

template <typename T>
T EvaluatedValue ()

Returns the evaluated value. T> should match to the actual type.

Defined at line 641 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

void ~AidlConstantValue ()

Defined at line 675 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

void AidlConstantValue (const AidlConstantValue & )

non-copyable, non-movable

Defined at line 678 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

void AidlConstantValue (AidlConstantValue && )

Defined at line 679 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

AidlConstantValue * Default (const AidlTypeSpecifier & specifier)

creates default value, when one isn't specified

nullptr if no default available

AidlConstantValue * Boolean (const AidlLocation & location, bool value)
AidlConstantValue * Character (const AidlLocation & location, const std::string & value)
AidlConstantValue * Integral (const AidlLocation & location, const std::string & value)

example: 123, -5498, maybe any size

AidlConstantValue * Floating (const AidlLocation & location, const std::string & value)
AidlConstantValue * Array (const AidlLocation & location, std::unique_ptr<vector<unique_ptr<AidlConstantValue>>> values)
AidlConstantValue * String (const AidlLocation & location, const string & value)

example: "\"asdf

"

"

bool Evaluate ()
bool CheckValid ()
AidlConstantValue & operator= (const AidlConstantValue & )

Defined at line 680 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

AidlConstantValue & operator= (AidlConstantValue && )

Defined at line 681 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

Type GetType ()

Defined at line 697 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

const std::string & Literal ()

Defined at line 698 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

void TraverseChildren (std::function<void (const AidlNode &)> traverse)

Defined at line 706 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

void DispatchVisit (AidlVisitor & visitor)

Defined at line 713 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

size_t Size ()

Defined at line 714 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

const AidlConstantValue & ValueAt (size_t index)

Defined at line 715 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

string ValueString (const AidlTypeSpecifier & type, const ConstantValueDecorator & decorator)

Raw value of type (currently valid in C++ and Java). Empty string on error.

string ToString (Type type)

Enumerations

enum class Type
Name Value Comments
BOOLEAN 0

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

INT8 1

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

INT32 2

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

INT64 3

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

ARRAY 4

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

CHARACTER 5

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

STRING 6

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

REF 7

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

FLOATING 8

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

UNARY 9

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

BINARY 10

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

ERROR 11

WARNING: Don't change this order! The order is used to determine type
promotion during a binary expression.

Defined at line 622 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h

Friends

class AidlConstantReference
class AidlBinaryConstExpression
class AidlUnaryConstExpression