4 #define epicsExportSharedSymbols 9 namespace epics {
namespace pvData {
14 new (_wrap.blob) std::string(*static_cast<const std::string*>(buf));
27 new (_wrap.blob) std::string(o._as<std::string>());
29 memcpy(_wrap.blob, o._wrap.blob,
sizeof(_largest_blob));
33 #if __cplusplus>=201103L 37 typedef std::string string;
39 new (_wrap.blob) std::string();
40 _as<std::string>() = std::move(o._as<std::string>());
41 o._as<
string>().~
string();
43 memcpy(_wrap.blob, o._wrap.blob,
sizeof(_largest_blob));
51 typedef std::string string;
52 _as<string>().~
string();
59 typedef std::string string;
62 switch((
int)o._stype) {
68 new (_wrap.blob) std::string();
69 _as<std::string>().
swap(o._as<std::string>());
70 o._as<std::string>().~
string();
74 memcpy(_wrap.blob, o._wrap.blob,
sizeof(_largest_blob));
79 switch((
int)o._stype) {
82 new (o._wrap.blob) std::string();
83 _as<std::string>().
swap(o._as<std::string>());
84 _as<std::string>().~
string();
88 _as<std::string>().
swap(o._as<std::string>());
93 temp.swap(_as<std::string>());
95 _as<std::string>().~
string();
97 memcpy(_wrap.blob, o._wrap.blob,
sizeof(_largest_blob));
99 new (o._wrap.blob) std::string();
100 temp.swap(o._as<std::string>());
106 switch((
int)o._stype) {
109 memcpy(o._wrap.blob, _wrap.blob,
sizeof(_largest_blob));
114 temp.swap(o._as<std::string>());
116 o._as<std::string>().~
string();
118 memcpy(o._wrap.blob, _wrap.blob,
sizeof(_largest_blob));
120 new (_wrap.blob) std::string();
121 temp.swap(_as<std::string>());
127 memcpy(&temp, _wrap.blob,
sizeof(_largest_blob));
128 memcpy(_wrap.blob, o._wrap.blob,
sizeof(_largest_blob));
129 memcpy(o._wrap.blob, &temp,
sizeof(_largest_blob));
139 return as<std::string>().c_str();
148 #define CASE(BASETYPE, PVATYPE, DBFTYPE, PVACODE) case pv ## PVACODE: strm<<v._as<PVATYPE>(); break; 149 #define CASE_REAL_INT64 153 #undef CASE_REAL_INT64 156 strm<<
"(nil)";
break;
size_t elementSize(ScalarType id)
gives sizeof(T) where T depends on the scalar type id.
An EPICS-specific replacement for ANSI C's assert.
pvd::StructureConstPtr type
TODO only here because of the Lockable.
friend epicsShareFunc std::ostream & operator<<(std::ostream &strm, const AnyScalar &v)
Mark external symbols and entry points for shared libraries.
const void * bufferUnsafe() const
ScalarType type() const
Type code of contained value. Or (ScalarType)-1 is empty.
void swap(shared_ptr< T > &a, shared_ptr< T > &b) BOOST_NOEXCEPT