im::floo::floolib::BMXLocationAttachment

Location message attachment

Inherits from im.floo.floolib.BMXMessageAttachment, BMXBaseObject

Public Functions

Name
synchronized void delete()
BMXLocationAttachment(double latitude, double longitude, String address)
Constructor
BMXMessageAttachment.Type type()
Return the type of location attachment
BMXMessageAttachment clone()
Cloning function
double latitude()
Latitude
double longitude()
Longitude
String address()
Address
BMXLocationAttachment dynamic_cast(BMXMessageAttachment attachment)

Protected Functions

Name
BMXLocationAttachment(long cPtr, boolean cMemoryOwn)
void finalize()
long getCPtr(BMXLocationAttachment obj)

Additional inherited members

Protected Functions inherited from im.floo.floolib.BMXMessageAttachment

Name
BMXMessageAttachment(long cPtr, boolean cMemoryOwn)

Public Functions Documentation

function delete

inline synchronized void delete()

Reimplements: im::floo::floolib::BMXMessageAttachment::delete

Example:

function BMXLocationAttachment

inline BMXLocationAttachment(
    double latitude,
    double longitude,
    String address
)

Constructor

Parameters:

  • latitude Latitude
  • longitude Longitude
  • address Address name

Example:

function type

inline BMXMessageAttachment.Type type()

Return the type of location attachment

Return: Type

Reimplements: im::floo::floolib::BMXMessageAttachment::type

Example:

function clone

inline BMXMessageAttachment clone()

Cloning function

Return: BMXMessageAttachmentPtr

Reimplements: im::floo::floolib::BMXMessageAttachment::clone

Example:

function latitude

inline double latitude()

Latitude

Return: double

Example:

    messageBean.setDisplayName(body.displayName());
    return messageBean;
}
if (contentType == BMXMessage.ContentType.Location) {
    // 地图
    BMXLocationAttachment body = BMXLocationAttachment
            .dynamic_cast(mBmxMessage.attachment());
    if (body == null) {
        return null;
    }
    messageBean.setLatitude(body.latitude());
    messageBean.setLongitude(body.longitude());
    messageBean.setDisplayName(body.address());
    return messageBean;
}
return null;

function longitude

inline double longitude()

Longitude

Return: double

Example:

    return messageBean;
}
if (contentType == BMXMessage.ContentType.Location) {
    // 地图
    BMXLocationAttachment body = BMXLocationAttachment
            .dynamic_cast(mBmxMessage.attachment());
    if (body == null) {
        return null;
    }
    messageBean.setLatitude(body.latitude());
    messageBean.setLongitude(body.longitude());
    messageBean.setDisplayName(body.address());
    return messageBean;
}
return null;

function address

inline String address()

Address

Return: std::string

Example:

private void showLocation() {
    if (mMaxMessage == null || mMaxMessage.contentType() != BMXMessage.ContentType.Location) {
        return;
    }
    BMXLocationAttachment body = BMXLocationAttachment.dynamic_cast(mMaxMessage.attachment());
    if (body == null) {
        return;
    }
    String title = body.address();
    mLocationAddr.setText(title);
}
if (contentType == BMXMessage.ContentType.Location) {
    // 地图
    BMXLocationAttachment body = BMXLocationAttachment
            .dynamic_cast(mBmxMessage.attachment());
    if (body == null) {
        return null;
    }
    messageBean.setLatitude(body.latitude());
    messageBean.setLongitude(body.longitude());
    messageBean.setDisplayName(body.address());
    return messageBean;
}
return null;

function dynamic_cast

static inline BMXLocationAttachment dynamic_cast(
    BMXMessageAttachment attachment
)

Protected Functions Documentation

Example:

private void showLocation() {
    if (mMaxMessage == null || mMaxMessage.contentType() != BMXMessage.ContentType.Location) {
        return;
    }
    BMXLocationAttachment body = BMXLocationAttachment.dynamic_cast(mMaxMessage.attachment());
    if (body == null) {
        return;
    }
    String title = body.address();
    mLocationAddr.setText(title);
    BMXFileAttachment body = BMXFileAttachment.dynamic_cast(mBmxMessage.attachment());
    if (body == null || TextUtils.isEmpty(body.path())) {
        return null;
    }
    messageBean.setPath(body.path());
    messageBean.setDisplayName(body.displayName());
    return messageBean;
}
if (contentType == BMXMessage.ContentType.Location) {
    // 地图
    BMXLocationAttachment body = BMXLocationAttachment
            .dynamic_cast(mBmxMessage.attachment());
    if (body == null) {
        return null;
    }
    messageBean.setLatitude(body.latitude());
    messageBean.setLongitude(body.longitude());
    messageBean.setDisplayName(body.address());
    return messageBean;

function BMXLocationAttachment

inline BMXLocationAttachment(
    long cPtr,
    boolean cMemoryOwn
)

Example:

function finalize

inline void finalize()

Reimplements: im::floo::floolib::BMXMessageAttachment::finalize

Example:

function getCPtr

static inline long getCPtr(
    BMXLocationAttachment obj
)

Example:


Updated on 2022-01-26 at 17:18:31 +0800

© 2019-2024 MaximTop | Homepage | Site Map Last modified time: 2024-12-07 06:49:06