示例#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();
}
示例#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);
}
示例#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);
}
示例#4
0
void WBorderLayout::setParentWidget(WWidget *parent)
{
  WLayout::setParentWidget(parent);

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