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 Type
Name Value
BOOLEAN 0
INT8 1
INT32 2
INT64 3
ARRAY 4
CHARACTER 5
STRING 6
REF 7
FLOATING 8
UNARY 9
BINARY 10
ERROR 11

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

Friends

class AidlConstantReference
class AidlBinaryConstExpression
class AidlUnaryConstExpression