本文整理汇总了C++中FName::GetPlainANSIString方法的典型用法代码示例。如果您正苦于以下问题:C++ FName::GetPlainANSIString方法的具体用法?C++ FName::GetPlainANSIString怎么用?C++ FName::GetPlainANSIString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FName
的用法示例。
在下文中一共展示了FName::GetPlainANSIString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
FJavaClassObject::FJavaClassObject(FName ClassName, const char* CtorSig, ...)
{
JNIEnv* JEnv = FAndroidApplication::GetJavaEnv();
Class = FAndroidApplication::FindJavaClass(ClassName.GetPlainANSIString());
check(Class);
jmethodID Constructor = JEnv->GetMethodID(Class, "<init>", CtorSig);
check(Constructor);
va_list Params;
va_start(Params, CtorSig);
jobject object = JEnv->NewObjectV(Class, Constructor, Params);
va_end(Params);
VerifyException();
check(object);
// Promote local references to global
Object = JEnv->NewGlobalRef(object);
JEnv->DeleteLocalRef(object);
}
示例2: Init
bool OSVRInterface::Init(OSVR_ClientContext OSVRClientContext, const FName& InterfaceName)
{
bool Result(true);
#if OSVR_ENABLED
OSVR_ReturnCode ReturnCode = osvrClientGetInterface(OSVRClientContext, InterfaceName.GetPlainANSIString(), &OSVRClientInterface);
Result = ReturnCode == OSVR_RETURN_SUCCESS;
this->OSVRClientContext = OSVRClientContext;
RefreshCapabilities();
RegisterCallbacks();
#endif // OSVR_ENABLED
Name = InterfaceName;
return Result;
}
示例3: SendOsc
void UOscFunctionLibrary::SendOsc(FName Address, const TArray<FOscDataElemStruct> & Data, int32 TargetIndex)
{
if(Address.GetDisplayNameEntry()->IsWide())
{
const auto tmp = Address.GetPlainNameString();
UE_LOG(LogOSC, Error, TEXT("Invalid OSC address \"%s\": ASCII only"), *tmp);
return;
}
static_assert(sizeof(uint8) == sizeof(char), "Cannot cast uint8 to char");
uint8 buffer[1024];
osc::OutboundPacketStream output((char *)buffer, sizeof(buffer));
output << osc::BeginMessage(Address.GetPlainANSIString());
for(const auto & elem : Data)
{
if(elem.IsFloat())
{
output << (float)elem.AsFloatValue();
}
else if(elem.IsInt())
{
output << (int32)elem.AsIntValue();
}
else if(elem.IsBool())
{
output << elem.AsBoolValue();
}
else if(elem.IsString())
{
output << elem.AsStringValue().GetPlainANSIString();
}
}
output << osc::EndMessage;
check(reinterpret_cast<const void *>(buffer) == reinterpret_cast<const void *>(output.Data()));
GetMutableDefault<UOscSettings>()->Send(buffer, output.Size(), TargetIndex);
}