IsObject
如果 CDocBuilderValue 对象是对象,则返回 true。
请注意,对于
.docbuilder文件,不使用CDocBuilderValue.IsObject方法。
语法
- Python
- C++
- COM
- Java
- .Net
def IsObject(self) -> bool
bool IsObject();
HRESULT IsObject([out, retval] VARIANT_BOOL* result);
boolean isObject();
bool IsObject();
参数
- COM
| 名称 | 类型 | 描述 |
|---|---|---|
| result | VARIANT_BOOL* | 指定 CDocBuilderValue 对象是否为对象。 |
示例
- Python
- C++
- COM
- Java
- .Net
builder = docbuilder.CDocBuilder()
context = builder.GetContext()
globalObj = context.GetGlobal()
bObject = globalObj.IsObject()
std::wstring sWorkDirectory = NSUtils::GetBuilderDirectory();
CDocBuilder::Initialize(sWorkDirectory.c_str());
CDocBuilder oBuilder;
CContext oContext = oBuilder.GetContext();
CValue oGlobal = oContext.GetGlobal();
bool bObject = oGlobal.IsObject();
CDocBuilder::Dispose();
CoInitialize(NULL);
IONLYOFFICEDocBuilder* oBuilder = NULL;
IONLYOFFICEDocBuilderContext* oContext = NULL;
IONLYOFFICEDocBuilderValue* oGlobal = NULL;
VARIANT_BOOL b;
oBuilder->Initialize();
oBuilder->GetContext(&oContext);
oContext->GetGlobal(&oGlobal);
oGlobal->IsObject(&b);
oBuilder->Dispose();
CDocBuilder.initialize("");
CDocBuilder builder = new CDocBuilder();
CDocBuilderContext context = builder.getContext();
CDocBuilderValue global = context.getGlobal();
boolean bObject = global.isObject();
CDocBuilder.dispose();
string workDirectory = "C:/Program Files/ONLYOFFICE/documentBuilder";
CDocBuilder.Initialize(workDirectory);
CDocBuilder oBuilder = new CDocBuilder();
CContext oContext = oBuilder.GetContext();
CValue oGlobal = oContext.GetGlobal();
bool bObject = oGlobal.IsObject();
CDocBuilder.Destroy();