Example #1
0
QString RouteMetadata::toString() const
{
	return QString("RouteMetadata %1 : %2 => %3")
					.arg(getName())
					.arg(getGUID())
					.arg(getTextureName()) ;
}
Example #2
0
bool RprTrack::operator==(RprTrack &rhs)
{
    GUID *lhsGuid = getGUID();
    GUID *rhsGuid = rhs.getGUID();

    return GuidsEqual(lhsGuid,rhsGuid);
}
Example #3
0
bool glBufferImpl::waitRange(size_t offsetInBytes, size_t rangeInBytes, bool blockClient) {
    if (_mappedBuffer != nullptr && !_unsynced) {
        //assert(!GL_API::s_glFlushQueued);

        return GL_API::getLockManager().WaitForLockedRange(getGUID(), offsetInBytes, rangeInBytes);
    }

    return true;
}
	void Entity::save(ofstream & myFile)
	{
		if (parent)
		{
			myFile << "Entity.addParent(" << getGUID() << " , " << parent->getGUID() << ") \n";
		}

		myFile << "Entity.setActive(" << getGUID() << " , " << btos(active) << ") \n";

		for (auto&x : tags)
		{
			myFile << "Entity.setTag(" << getGUID() << " , '" << x << "') \n";
		}


		for (auto &x : containerC)
		{
			x->save(myFile, guid);
		}
	}
Example #5
0
void glBufferImpl::lockRange(size_t offsetInBytes, size_t rangeInBytes, bool flush) {
    if (_mappedBuffer != nullptr && !_unsynced) {
        BufferWriteData data = {};
        data._bufferGUID = getGUID();
        data._offset = offsetInBytes;
        data._range = rangeInBytes;
        data._flush = flush;

        GL_API::registerBufferBind(data);
    }
}
bool IOHIKeyboard::resetKeyboard()
// Description:	Reset the keymapping to the default value and reconfigure
//		the keyboards.
{
    const unsigned char *defaultKeymap;
    UInt32	defaultKeymapLength;

    IOLockLock( _deviceLock);

    if ( _keyMap )
		_keyMap->release();

    // Set up default keymapping.
    defaultKeymap = defaultKeymapOfLength(&defaultKeymapLength);

    _keyMap = IOHIKeyboardMapper::keyboardMapper( this,
                                                  defaultKeymap,
                                                  defaultKeymapLength,
                                                  false );

    if (_keyMap)
    {
		// point the new keymap to the IOHIDSystem, so it can set properties in it
		_keyMap->setKeyboardTarget((IOService *) _keyboardEventTarget);

        clock_interval_to_absolutetime_interval( EV_DEFAULTKEYREPEAT,
                                                 kNanosecondScale, &_keyRepeat);
        clock_interval_to_absolutetime_interval( EV_DEFAULTINITIALREPEAT,
                                                 kNanosecondScale, &_initialKeyRepeat);
    }

    updateProperties();
    
    _interfaceType = interfaceID();
    _deviceType    = deviceType();
    _guid	   = getGUID();

    if (getProperty("HIDKeyboardKeysDefined"))
    {
        KeyboardReserved * reservedStruct = GetKeyboardReservedStructEventForService(this);
        
        if ( reservedStruct && !reservedStruct->keyboardNub)
            reservedStruct->keyboardNub = IOHIDKeyboardDevice::newKeyboardDeviceAndStart(this);
    }

    IOLockUnlock( _deviceLock);
    return (_keyMap) ? true : false;
}
Example #7
0
 void fmt::toPrettyString(std::ostream &o, size_t indent) const{
   o << std::string(indent, ' ') << "[" << getType() << "] (" << (getPayloadSize() + 8)
     << "b):" << std::endl;
   indent += 1;
   o << std::string(indent, ' ') << "Codec: " << getCodec() << " (" << getFormat() << ")"
     << std::endl;
   o << std::string(indent, ' ') << "Channels: " << getChannels() << std::endl;
   o << std::string(indent, ' ') << "Sample rate: " << getHz() << "Hz" << std::endl;
   o << std::string(indent, ' ') << "Bytes/s: " << getBPS() << std::endl;
   o << std::string(indent, ' ') << "Block size: " << getBlockSize() << " bytes" << std::endl;
   o << std::string(indent, ' ') << "Sample size: " << getSize() << " bits" << std::endl;
   if (getExtLen()){
     o << std::string(indent, ' ') << "-- extended " << getExtLen() << "bytes --" << std::endl;
     if (getExtLen() >= 2){
       o << std::string(indent, ' ') << "Valid bits: " << getValidBits() << std::endl;
     }
     if (getExtLen() >= 6){
       o << std::string(indent, ' ') << "Channel mask: " << getChannelMask() << std::endl;
     }
     if (getExtLen() >= 22){
       o << std::string(indent, ' ') << "GUID: " << getGUID() << std::endl;
     }
   }
 }
Example #8
0
GUID * RegistryGUID::load(GUID * def)
    {
     value = getGUID(id, def, root);
     return &value;
    } // RegistryGUID::load
Example #9
0
BOOL RegistryGUID::load(const GUID * def)
    {
     return getGUID(id, value, def, root);
    } // RegistryGUID::load
Example #10
0
void MaterialLib::appendMaterial(shared_ptr<Material> material)
{
    auto found = m_materials.find(material->getName());
    if (found != m_materials.end())
    {
        base::glog << "Trying to add duplicate material" << found->first << "to material library" << getGUID() << base::logwarn;
        return;
    }

    m_materials[material->getName()] = material;

    if (material->getTechniquesCount() == 0)
        base::glog << "Material without techniques" << material->getName() << "has been added to library" << getGUID() << base::logwarn;
}
Example #11
0
shared_ptr<Material> MaterialLib::getMaterial(const std::string &name) const
{
    auto found = m_materials.find(name);
    if (found == m_materials.end())
    {
        base::glog << "Material with name" << name << "wasn't found in material library" << getGUID() << base::logwarn;
        return nullptr;
    }

    return found->second;
}
Example #12
0
VertexDataInterface::VertexDataInterface(GFXDevice& context)
  : GraphicsResource(context, GraphicsResource::Type::VERTEX_BUFFER, getGUID())
{
}