/** * Appends this name entry to the passed in string. * * @param String String to append this name to */ void FNameEntry::AppendNameToString( FString& String ) const { if( IsWide() ) { String += WideName; } else { String += AnsiName; } }
/** * @return FString of name portion minus number. */ FString FNameEntry::GetPlainNameString() const { if( IsWide() ) { return FString(WideName); } else { return FString(AnsiName); } }
/** * @return length of name */ int32 FNameEntry::GetNameLength() const { if( IsWide() ) { return FCStringWide::Strlen( WideName ); } else { return FCStringAnsi::Strlen( AnsiName ); } }
/** * Compares name using the compare method provided. * * @param InName Name to compare to * @return true if equal, false otherwise */ bool FNameEntry::IsEqual( const WIDECHAR* InName, const ENameCase CompareMethod ) const { if( !IsWide() ) { // Matching wide-ness means strings are not equal. return false; } else { return ( (CompareMethod == ENameCase::CaseSensitive) ? FCStringWide::Strcmp( WideName, InName ) : FCStringWide::Stricmp( WideName, InName ) ) == 0; } }
std::string GetName() const { if (IsWide()) { auto length = std::wcslen(WideName); std::string str(length, '\0'); std::use_facet<std::ctype<wchar_t>>(std::locale()).narrow(WideName, WideName + length, '?', &str[0]); return str; } else { return AnsiName; } }
/** Set the RecordingDate of the frame. This updates the calendar date and time and the timecode. However, timecode is derived from the time in the datetime parameter and frame number. Use SetTimeCode for more control over timecode. \param datetime A simple time value containing the RecordingDate and time information. The time in this structure is automatically incremented by one second depending on the frame parameter and updatded. \param frame A zero-based running frame sequence/serial number. This is used both in the timecode as well as a timestamp on dif block headers. */ void DVFrame::SetRecordingDate( time_t * datetime, int frame ) { dv_encode_metadata( data, IsPAL(), IsWide(), datetime, frame ); }