ADTF
Loading...
Searching...
No Matches
string_intf.h File Reference
#include <adtf_utils.h>
#include <string>
#include <string_view>
#include <optional>
#include <cstring>
#include "adtf_base_type_traits.h"
Include dependency graph for string_intf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  adtf::base::ant::IString
 
struct  adtf::base::ant::adtf_string_forward< T >
 
struct  adtf::base::ant::adtf_string_forward< std::string >
 
struct  adtf::base::ant::adtf_string_forward< const std::string >
 
struct  adtf::base::ant::adtf_string_forward< std::string_view >
 
struct  adtf::base::ant::adtf_string_forward< const std::string_view >
 
struct  adtf::base::ant::adtf_string_forward< adtf::util::cString >
 
struct  adtf::base::ant::adtf_string_forward< const adtf::util::cString >
 
struct  adtf::base::ant::adtf_string_forward< adtf::util::cFilename >
 
struct  adtf::base::ant::adtf_string_forward< const adtf::util::cFilename >
 
struct  adtf::base::ant::adtf_string_forward< const char >
 
class  adtf::base::ant::adtf_string< T >
 Wrapping template for a rvalue reference of an IString interface for the type T. More...
 
class  adtf::base::spider::cStringLengthProxy
 
class  adtf::base::spider::cStringRedirect
 
struct  adtf::base::adtf_string_forward< T >
 
class  adtf::base::adtf_string< T >
 Wrapping template for a rvalue reference of an IString interface for the type T. More...
 
class  adtf::base::IString
 bring latest IString to users scope More...
 
class  adtf::base::cStringRedirect
 

Namespaces

namespace  adtf
 Namespace for all functionality provided by ADTF and its SDKs.
 
namespace  adtf::base
 Namespace for the ADTF Base SDK.
 
namespace  adtf::base::ant
 Namespace for all functionality of the ADTF Base SDK provided since v3.0.
 
namespace  adtf::base::spider
 Namespace for all functionality of the ADTF Base SDK provided since v3.18.
 

Macros

#define adtf_string_intf(__string__)
 
#define adtf_char_intf(__const_char_ptr__)
 

Detailed Description

Copyright © Audi Electronics Venture GmbH. All rights reserved

Macro Definition Documentation

◆ adtf_char_intf

#define adtf_char_intf ( __const_char_ptr__)
Value:
static_cast<const ::adtf::base::IString&&>(::adtf::base::adtf_string<const char>(__const_char_ptr__))
Definition string_intf.h:29
Wrapping template for a rvalue reference of an IString interface for the type T.
Definition string_intf.h:281

Helper for const tchar to a IString interface if used for set value operations

Parameters
__const_char_ptr__valid const char pointer

◆ adtf_string_intf

#define adtf_string_intf ( __string__)
Value:
static_cast<std::conditional_t< \
::adtf::base::adtf_string_forward<typename std::remove_reference_t<decltype(__string__)>>::is_mutable, \
::adtf::base::IString&&, const ::adtf::base::IString&&>>( \
::adtf::base::adtf_string<typename std::remove_reference<decltype(__string__)>::type>(&(__string__)))
Definition string_intf.h:66

The adtf_string_intf Macro helps to easily create a rvalue reference of a adtf::util::cString. Use as follows:

struct foo
{
tResult GetString(IString&& strValue)
{
return strValue.Set("bar");
}
};
adtf::util::cString strMyValue = "foo";
foo oFooInst;
oFooInst.GetString(adtf_string_intf(strMyValue));
// strMyValue is now set to "bar"
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
bring latest IString to users scope
Definition string_intf.h:29
#define adtf_string_intf(__string__)
Definition string_intf.h:465
Parameters
__string__Valid instance of a adtf::util::cString
Remarks
  • Works with:
    • adtf::util::cString
    • std::string
    • QString (requires include of adtfui/qt_string_intf.h or adtfui/adtf_ui.h)