Esempio n. 1
0
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();
}
Esempio n. 2
0
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);
}
Esempio n. 3
0
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);
}
Esempio n. 4
0
void WBorderLayout::setParentWidget(WWidget *parent)
{
  WLayout::setParentWidget(parent);

  if (parent)
    setImpl(std::unique_ptr<WLayoutImpl>
	    (new StdGridLayoutImpl2(this, grid_)));
}
Esempio n. 5
0
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;
		}
	}
}
Esempio n. 6
0
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;
        }
    }
}
Esempio n. 7
0
 Proxy& operator=(const Proxy& rhs)
 {
   setImpl(rhs.impl_);
   return *this;
 } // operator=
Esempio n. 8
0
 ~Proxy() { setImpl(0); }
Esempio n. 9
0
 Proxy(const Proxy& rhs) : impl_(0) { setImpl(rhs.impl_); }
Esempio n. 10
0
 Proxy(ImplementationT* impl) : impl_(0) { setImpl(impl); }
Esempio n. 11
0
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);
}
Esempio n. 13
0
void WebGLUnsignedByteArray::set(WebGLUnsignedByteArray* array, unsigned offset, ExceptionCode& ec) {
    setImpl(array, offset * sizeof(unsigned char), ec);
}
Esempio n. 14
0
ArrayData *VectorVariant::set(CStrRef k, CVarRef v,
                              bool copy, int64 prehash /* = -1 */) {
  return setImpl(k, v, copy);
}
Esempio n. 15
0
void WebGLFloatArray::set(WebGLFloatArray* array, unsigned offset, ExceptionCode& ec) {
    setImpl(array, offset * sizeof(float), ec);
}
Esempio n. 16
0
Socket::Socket(Socket&& other)
    : impl(0)
{
    setImpl(new SocketImpl(other.getImpl()));
    other.clearImpl();
}
Esempio n. 17
0
Socket::Socket()
    : impl(0)
{
    setImpl();
}
Esempio n. 18
0
 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);
}
Esempio n. 21
0
//==============================================================================
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);
}