nsIPropertyBag2 编辑

xpcom/ds/nsIPropertyBag2.idlScriptable This interface extends nsIPropertyBag with some methods for getting properties in specific formats. Inherits from: nsIPropertyBag Last changed in Gecko 1.0

Method overview

nsIVariant get(in AString prop);
ACString getPropertyAsACString(in AString prop);
AString getPropertyAsAString(in AString prop);
AUTF8String getPropertyAsAUTF8String(in AString prop);
boolean getPropertyAsBool(in AString prop);
double getPropertyAsDouble(in AString prop);
PRInt32 getPropertyAsInt32(in AString prop);
PRInt64 getPropertyAsInt64(in AString prop);
void getPropertyAsInterface(in AString prop, in nsIIDRef iid, [iid_is(iid), retval] out nsQIResult result);
PRUint32 getPropertyAsUint32(in AString prop);
PRUint64 getPropertyAsUint64(in AString prop);
PRBool hasKey(in AString prop);

Methods

get()

This method returns null if the value does not exist, or exists but is null.

nsIVariant get(
  in AString prop
);
Parameters
prop
Property to return the value of.
Return value

The property value as an nsIVariant.

getPropertyAsACString()

ACString getPropertyAsACString(
  in AString prop
);
Parameters
prop
Property to return the value of.
Return value

The property value as an ACString.

Note: Accessing a property of a different type may attempt conversion to this type.

getPropertyAsAString()

AString getPropertyAsAString(
  in AString prop
);
Parameters
prop
Property to return the value of.
Return value

The property value as a String.

Note: Accessing a property of a different type may attempt conversion to this type.

getPropertyAsAUTF8String()

AUTF8String getPropertyAsAUTF8String(
  in AString prop
);
Parameters
prop
Property to return the value of.
Return value

The property value as an AUTF8String.

Note: Accessing a property of a different type may attempt conversion to this type.

getPropertyAsBool()

boolean getPropertyAsBool(
  in AString prop
);
Parameters
prop
Property to return the value of.
Return value

The property value as a Boolean.

Note: Accessing a property of a different type may attempt conversion to this type.

getPropertyAsDouble()

double getPropertyAsDouble(
  in AString prop
);
Parameters
prop
Property to return the value of.
Return value

The property value as a Double.

Note: Accessing a property of a different type may attempt conversion to this type.

getPropertyAsInt32()

PRInt32 getPropertyAsInt32(
  in AString prop
);
Parameters
prop
Property to return the value of.
Return value

The property value as a PRInt32.

Note: Accessing a property of a different type may attempt conversion to this type.

getPropertyAsInt64()

PRInt64 getPropertyAsInt64(
  in AString prop
);
Parameters
prop
Property to return the value of.
Return value

The property value as a PRInt64.

Note: Accessing a property of a different type may attempt conversion to this type.

getPropertyAsInterface()

This method returns null if the value exists, but is null.

void getPropertyAsInterface(
  in AString prop,
  in nsIIDRef iid,
  [iid_is(iid), retval] out nsQIResult result
);
Parameters
prop
Property to return the value of.
iid
The interface type to be returned.
result
The resulting interface pointer.

getPropertyAsUint32()

PRUint32 getPropertyAsUint32(
  in AString prop
);
Parameters
prop
Property to return the value of.
Return value

The property value as a PRUint32.

Note: Accessing a property of a different type may attempt conversion to this type.

getPropertyAsUint64()

PRUint64 getPropertyAsUint64(
  in AString prop
);
Parameters
prop
Property to return the value of.
Return value

The property value as a PRUint64.

Note: Accessing a property of a different type may attempt conversion to this type.

hasKey()

Check for the existence of a key.

PRBool hasKey(
  in AString prop
);
Parameters
prop
Property to check for key existence.
Return value

true if a key for the property exists, false if it does not.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:99 次

字数:9879

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文