Shaka Player Embedded
|
#include <test_type.h>
Public Member Functions | |
TestType () | |
void | Trace (memory::HeapTracer *tracer) const override |
void | AcceptNumber (double) const |
void | AcceptBoolean (bool) const |
void | AcceptString (const std::string &) const |
void | AcceptOptionalString (optional< std::string >) const |
void | AcceptOptionalStruct (optional< TestTypeOptions >) const |
void | AcceptIntOrStruct (variant< int, TestTypeOptions >) const |
void | AcceptStringEnumOrAnyNumber (variant< TestStringEnum, double >) const |
void | AcceptStruct (TestTypeOptions) const |
void | AcceptNumberEnum (TestNumberEnum) const |
void | AcceptStringEnum (TestStringEnum) const |
void | AcceptArrayOfStrings (std::vector< std::string >) const |
void | AcceptCallback (Callback) const |
void | AcceptAnything (Any) const |
void | AcceptByteBuffer (ByteBuffer) const |
bool | IsExpectedString (const std::string &arg) const |
bool | IsOptionalPresent (optional< std::string > arg) const |
bool | IsExpectedIntWithOr (variant< int, Any > arg) const |
bool | IsExpectedStructWithOr (variant< int, TestTypeOptions > arg) const |
bool | IsExpectedConvertedStruct (TestTypeOptions opts) const |
bool | IsConvertedStructEmpty (TestTypeOptions opts) const |
bool | IsExpectedNumberEnum (TestNumberEnum e) const |
bool | IsExpectedStringEnum (TestStringEnum e) const |
bool | IsExpectedArrayOfStrings (const std::vector< std::string > &data) const |
bool | IsExpectedStringWithAny (Any anything) const |
bool | IsTruthy (Any anything) const |
void | InvokeCallbackWithString (Callback callback) const |
void | StoreByteBuffer (ByteBuffer buffer) |
TestTypeOptions | ChangeStringField (TestTypeOptions opts) |
ExceptionOr< void > | ThrowException (const std::string &message) const |
Promise | PromiseAcceptString (const std::string &value) const |
Promise | PromiseResolveWith (Any value) const |
Promise | PromiseResolveAfter (uint64_t delay) const |
std::string | GetString () const |
optional< std::string > | GetOptionalString (bool has_value) const |
variant< int, std::string > | GetIntOrString (bool get_int) const |
TestTypeOptions | GetStruct () const |
TestNumberEnum | GetNumberEnum () const |
TestStringEnum | GetStringEnum () const |
std::vector< std::string > | GetArrayOfStrings () const |
std::unordered_map< std::string, std::string > | GetMapOfStrings () const |
const ByteBuffer & | GetByteBuffer () const |
std::string | ToPrettyString (Any anything) const |
![]() | |
BackingObject () | |
void | Trace (memory::HeapTracer *tracer) const override |
bool | IsRootedAlive () const override |
std::string | name () const |
virtual BackingObjectFactoryBase * | factory () const =0 |
bool | DerivedFrom (const std::string &base) |
ReturnVal< JsValue > | JsThis () const |
void | SetJsThis (Handle< JsObject > this_) |
![]() | |
virtual | ~Traceable () |
virtual bool | IsShortLived () const |
Static Public Member Functions | |
static TestType * | Create () |
![]() | |
static void * | operator new[] (size_t size)=delete |
static void | operator delete[] (void *)=delete |
Public Attributes | |
optional< Any > | optional_object |
variant< int, Any > | int_or_object |
TestTypeOptions | struct_ |
std::vector< Any > | array |
Callback | callback |
Any | any |
ByteBuffer | buffer |
Additional Inherited Members | |
![]() | |
static constexpr const size_t | kInternalFieldCount = 2 |
![]() | |
static constexpr const uint64_t | kShortLiveDurationMs = 5000 |
![]() | |
~BackingObject () override | |
Defines a backing type that is used to test the registering framework. Methods are called in JavaScript tests to test the conversion functions.
Definition at line 69 of file test_type.h.
shaka::js::TestType::TestType | ( | ) |
Definition at line 46 of file test_type.cc.
|
inline |
Definition at line 93 of file test_type.h.
|
inline |
Definition at line 91 of file test_type.h.
|
inline |
Definition at line 82 of file test_type.h.
|
inline |
Definition at line 94 of file test_type.h.
|
inline |
Definition at line 92 of file test_type.h.
|
inline |
Definition at line 86 of file test_type.h.
|
inline |
Definition at line 81 of file test_type.h.
|
inline |
Definition at line 89 of file test_type.h.
|
inline |
Definition at line 84 of file test_type.h.
|
inline |
Definition at line 85 of file test_type.h.
|
inline |
Definition at line 83 of file test_type.h.
|
inline |
Definition at line 90 of file test_type.h.
|
inline |
Definition at line 87 of file test_type.h.
|
inline |
Definition at line 88 of file test_type.h.
TestTypeOptions shaka::js::TestType::ChangeStringField | ( | TestTypeOptions | opts | ) |
Definition at line 119 of file test_type.cc.
|
inlinestatic |
Definition at line 75 of file test_type.h.
std::vector< std::string > shaka::js::TestType::GetArrayOfStrings | ( | ) | const |
Definition at line 178 of file test_type.cc.
const ByteBuffer & shaka::js::TestType::GetByteBuffer | ( | ) | const |
Definition at line 189 of file test_type.cc.
variant< int, std::string > shaka::js::TestType::GetIntOrString | ( | bool | get_int | ) | const |
Definition at line 157 of file test_type.cc.
std::unordered_map< std::string, std::string > shaka::js::TestType::GetMapOfStrings | ( | ) | const |
Definition at line 182 of file test_type.cc.
TestNumberEnum shaka::js::TestType::GetNumberEnum | ( | ) | const |
Definition at line 170 of file test_type.cc.
optional< std::string > shaka::js::TestType::GetOptionalString | ( | bool | has_value | ) | const |
Definition at line 151 of file test_type.cc.
std::string shaka::js::TestType::GetString | ( | ) | const |
Definition at line 147 of file test_type.cc.
TestStringEnum shaka::js::TestType::GetStringEnum | ( | ) | const |
Definition at line 174 of file test_type.cc.
TestTypeOptions shaka::js::TestType::GetStruct | ( | ) | const |
Definition at line 163 of file test_type.cc.
void shaka::js::TestType::InvokeCallbackWithString | ( | Callback | callback | ) | const |
Definition at line 109 of file test_type.cc.
bool shaka::js::TestType::IsConvertedStructEmpty | ( | TestTypeOptions | opts | ) | const |
Definition at line 83 of file test_type.cc.
bool shaka::js::TestType::IsExpectedArrayOfStrings | ( | const std::vector< std::string > & | data | ) | const |
Definition at line 95 of file test_type.cc.
bool shaka::js::TestType::IsExpectedConvertedStruct | ( | TestTypeOptions | opts | ) | const |
Definition at line 79 of file test_type.cc.
Definition at line 70 of file test_type.cc.
bool shaka::js::TestType::IsExpectedNumberEnum | ( | TestNumberEnum | e | ) | const |
Definition at line 87 of file test_type.cc.
bool shaka::js::TestType::IsExpectedString | ( | const std::string & | arg | ) | const |
Definition at line 62 of file test_type.cc.
bool shaka::js::TestType::IsExpectedStringEnum | ( | TestStringEnum | e | ) | const |
Definition at line 91 of file test_type.cc.
bool shaka::js::TestType::IsExpectedStringWithAny | ( | Any | anything | ) | const |
Definition at line 100 of file test_type.cc.
bool shaka::js::TestType::IsExpectedStructWithOr | ( | variant< int, TestTypeOptions > | arg | ) | const |
Definition at line 74 of file test_type.cc.
bool shaka::js::TestType::IsOptionalPresent | ( | optional< std::string > | arg | ) | const |
Definition at line 66 of file test_type.cc.
bool shaka::js::TestType::IsTruthy | ( | Any | anything | ) | const |
Definition at line 105 of file test_type.cc.
Promise shaka::js::TestType::PromiseAcceptString | ( | const std::string & | value | ) | const |
Definition at line 128 of file test_type.cc.
Promise shaka::js::TestType::PromiseResolveAfter | ( | uint64_t | delay | ) | const |
Definition at line 138 of file test_type.cc.
Definition at line 133 of file test_type.cc.
void shaka::js::TestType::StoreByteBuffer | ( | ByteBuffer | buffer | ) |
Definition at line 115 of file test_type.cc.
ExceptionOr< void > shaka::js::TestType::ThrowException | ( | const std::string & | message | ) | const |
Definition at line 124 of file test_type.cc.
std::string shaka::js::TestType::ToPrettyString | ( | Any | anything | ) | const |
Definition at line 193 of file test_type.cc.
|
overridevirtual |
Called during a GC run. This should call HeapTracer::Trace on all Traceable members. Be sure to call the base method when overriding.
Implements shaka::memory::Traceable.
Definition at line 51 of file test_type.cc.
Any shaka::js::TestType::any |
Definition at line 137 of file test_type.h.
std::vector<Any> shaka::js::TestType::array |
Definition at line 135 of file test_type.h.
ByteBuffer shaka::js::TestType::buffer |
Definition at line 138 of file test_type.h.
Callback shaka::js::TestType::callback |
Definition at line 136 of file test_type.h.
Definition at line 133 of file test_type.h.
Definition at line 132 of file test_type.h.
TestTypeOptions shaka::js::TestType::struct_ |
Definition at line 134 of file test_type.h.