Contains useful data about the type in order for code generation to happen in an easy manner. More...
#include <types.h>
Public Member Functions | |
TypeInfo (DataType d) | |
The type to get info for. More... | |
bool | isTemplated () const |
Returns true if this type is templated. More... | |
std::vector< std::string > | includeFilesForType () const |
Returns the needed includes in order to use this type. More... | |
std::string | cppType () const |
Returns the C++ type of this DataType. More... | |
bool | is_basic () const |
True if the element type is a basic type. More... | |
bool | is_fixed () const |
True if the element type is a fixed type. More... | |
bool | is_container () const |
True if the element type is a container. More... | |
int32_t | alignment () const |
Return the alignment of the type. More... | |
char | to_dbus_char () const |
Turn this type into a DBus char. More... | |
Private Attributes | |
DataType | m_type |
Contains useful data about the type in order for code generation to happen in an easy manner.
DBus::TypeInfo::TypeInfo | ( | DataType | d | ) |
The type to get info for.
int32_t DBus::TypeInfo::alignment | ( | ) | const |
Return the alignment of the type.
References DBus::ARRAY, DBus::BOOLEAN, DBus::BYTE, DBus::DICT_ENTRY, DBus::DOUBLE, DBus::INT16, DBus::INT32, DBus::INT64, m_type, DBus::OBJECT_PATH, DBus::SIGNATURE, DBus::STRING, DBus::STRUCT, DBus::UINT16, DBus::UINT32, DBus::UINT64, DBus::UNIX_FD, and DBus::VARIANT.
Referenced by DBus::Variant::createFromDemarshal(), DBus::MessageAppendIterator::open_container(), DBus::priv::VariantAppendIterator::open_container(), DBus::Variant::recurseArray(), and DBus::Variant::remarshal().
std::string DBus::TypeInfo::cppType | ( | ) | const |
Returns the C++ type of this DataType.
References DBus::ARRAY, DBus::BOOLEAN, DBus::BYTE, DBus::DICT_ENTRY, DBus::DOUBLE, DBus::INT16, DBus::INT32, DBus::INT64, DBus::INVALID, m_type, DBus::OBJECT_PATH, DBus::SIGNATURE, DBus::STRING, DBus::STRUCT, DBus::UINT16, DBus::UINT32, DBus::UINT64, DBus::UNIX_FD, and DBus::VARIANT.
std::vector< std::string > DBus::TypeInfo::includeFilesForType | ( | ) | const |
Returns the needed includes in order to use this type.
References DBus::ARRAY, DBus::BYTE, DBus::DICT_ENTRY, DBus::INT16, DBus::INT32, DBus::INT64, m_type, DBus::STRING, DBus::STRUCT, DBus::UINT16, DBus::UINT32, DBus::UINT64, and DBus::VARIANT.
bool DBus::TypeInfo::is_basic | ( | ) | const |
True if the element type is a basic type.
References DBus::BYTE, DBus::INT16, DBus::INT32, DBus::INT64, m_type, DBus::OBJECT_PATH, DBus::SIGNATURE, DBus::STRING, DBus::UINT16, DBus::UINT32, DBus::UINT64, and DBus::UNIX_FD.
Referenced by DBus::Signature::create_signature_tree(), and DBus::SignatureIterator::is_basic().
bool DBus::TypeInfo::is_container | ( | ) | const |
True if the element type is a container.
References DBus::ARRAY, DBus::DICT_ENTRY, m_type, DBus::STRUCT, and DBus::VARIANT.
Referenced by DBus::Signature::create_signature_tree(), DBus::MessageIterator::is_container(), DBus::SignatureIterator::is_container(), and DBus::priv::VariantIterator::is_container().
bool DBus::TypeInfo::is_fixed | ( | ) | const |
True if the element type is a fixed type.
References DBus::BYTE, DBus::INT16, DBus::INT32, DBus::INT64, m_type, DBus::UINT16, DBus::UINT32, and DBus::UINT64.
Referenced by DBus::MessageIterator::is_fixed(), DBus::SignatureIterator::is_fixed(), and DBus::priv::VariantIterator::is_fixed().
bool DBus::TypeInfo::isTemplated | ( | ) | const |
Returns true if this type is templated.
References DBus::ARRAY, DBus::DICT_ENTRY, m_type, and DBus::STRUCT.
char DBus::TypeInfo::to_dbus_char | ( | ) | const |
Turn this type into a DBus char.
References DBus::ARRAY, DBus::BOOLEAN, DBus::BYTE, DBus::DOUBLE, DBus::INT16, DBus::INT32, DBus::INT64, DBus::INVALID, m_type, DBus::OBJECT_PATH, DBus::SIGNATURE, DBus::STRING, DBus::UINT16, DBus::UINT32, DBus::UINT64, DBus::UNIX_FD, and DBus::VARIANT.
Referenced by DBus::SignatureIterator::iterate_over_subsig(), and DBus::SignatureIterator::signature().
|
private |
Referenced by alignment(), cppType(), includeFilesForType(), is_basic(), is_container(), is_fixed(), isTemplated(), and to_dbus_char().