im::floo::floolib::BMXLocationAttachment

位置消息附件

Inherits from im.floo.floolib.BMXMessageAttachment, BMXBaseObject

Public Functions

Name
synchronized void delete()
BMXLocationAttachment(double latitude, double longitude, String address)
构造函数
BMXMessageAttachment.Type type()
返回位置附件类型
BMXMessageAttachment clone()
克隆函数
double latitude()
纬度
double longitude()
经度
String 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
)

构造函数

Parameters:

  • latitude 纬度
  • longitude 经度
  • address 地址名称

Example:

function type

inline BMXMessageAttachment.Type type()

返回位置附件类型

Return: Type

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

Example:

function clone

inline BMXMessageAttachment clone()

克隆函数

Return: BMXMessageAttachmentPtr

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

Example:

function latitude

inline double 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()

经度

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()

地址

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 美信拓扑 | 官网 | 网站地图 该文件修订时间: 2024-12-07 06:49:06