CVarRef Array::set(CVarRef key, CVarRef v, bool isKey /* = false */) { if (key.getRawType() == KindOfInt64) { return setImpl(key.getNumData(), v); } if (isKey) return setImpl(key, v); VarNR k(key.toKey()); if (!k.isNull()) { return setImpl(k, v); } return Variant::lvalBlackHole(); }
ArrayData *VectorVariant::set(int64 k, CVarRef v, bool copy, int64 prehash /* = -1 */) { if (k == (int64)m_elems.size()) { return append(v, copy); } return setImpl(k, v, copy); }
ArrayData *VectorVariant::set(CVarRef k, CVarRef v, bool copy, int64 prehash /* = -1 */) { if (k.isInteger()) { return set(k.toInt64(), v, copy); } return setImpl(k, v, copy); }
void WBorderLayout::setParentWidget(WWidget *parent) { WLayout::setParentWidget(parent); if (parent) setImpl(std::unique_ptr<WLayoutImpl> (new StdGridLayoutImpl2(this, grid_))); }
AudioDevice::AudioDevice(const std::string& nameKeyword, bool input, bool output) : mID(-1), mImpl(0) { for(int i=0; i<numDevices(); ++i){ AudioDevice d(i); std::string n = d.name(); if( ((input & d.hasInput()) || (output & d.hasOutput())) && n.find(nameKeyword) != std::string::npos ){ setImpl(i); break; } } }
AudioDevice::AudioDevice(const std::string& nameKeyword, StreamMode stream) : mID(-1), mImpl(0) { for(int i=0; i<numDevices(); ++i) { AudioDevice d(i); bool bi = (stream & INPUT) && d.hasInput(); bool bo = (stream & OUTPUT) && d.hasOutput(); std::string n = d.name(); if( (bi || bo) && n.find(nameKeyword) != std::string::npos) { setImpl(i); break; } } }
Proxy& operator=(const Proxy& rhs) { setImpl(rhs.impl_); return *this; } // operator=
~Proxy() { setImpl(0); }
Proxy(const Proxy& rhs) : impl_(0) { setImpl(rhs.impl_); }
Proxy(ImplementationT* impl) : impl_(0) { setImpl(impl); }
ArrayData *VectorString::set(litstr k, CVarRef v, bool copy, int64 prehash /* = -1 */) { return setImpl(k, v, copy); }
CVarRef Array::set(litstr key, CVarRef v, bool isKey /* = false */) { if (isKey) return setImpl(String(key), v); return setImpl(String(key).toKey(), v); }
void WebGLUnsignedByteArray::set(WebGLUnsignedByteArray* array, unsigned offset, ExceptionCode& ec) { setImpl(array, offset * sizeof(unsigned char), ec); }
ArrayData *VectorVariant::set(CStrRef k, CVarRef v, bool copy, int64 prehash /* = -1 */) { return setImpl(k, v, copy); }
void WebGLFloatArray::set(WebGLFloatArray* array, unsigned offset, ExceptionCode& ec) { setImpl(array, offset * sizeof(float), ec); }
Socket::Socket(Socket&& other) : impl(0) { setImpl(new SocketImpl(other.getImpl())); other.clearImpl(); }
Socket::Socket() : impl(0) { setImpl(); }
Proxy& operator=(ImplementationT* const impl) { setImpl(impl); return *this; } // operator=
void WebGLUnsignedShortArray::set(WebGLUnsignedShortArray* array, unsigned offset, ExceptionCode& ec) { setImpl(array, offset * sizeof(unsigned short), ec); }
CVarRef Array::set(int64 key, CVarRef v) { return setImpl(key, v); }
//============================================================================== AudioDevice::AudioDevice(int deviceNum) : mID(-1), mImpl(0) { setImpl(deviceNum); }
HOT_FUNC_HPHP CVarRef Array::set(CStrRef key, CVarRef v, bool isKey /* = false */) { if (isKey) return setImpl(key, v); return setImpl(key.toKey(), v); }
Variant TempExpressionList::set(VariableEnvironment &env, CVarRef val) const { TempExpressionHelper helper(this, env); return setImpl(env, val); }