RDFVocab::RDFVocab() : d(new RDFVocabPrivate) { QString ns = QLatin1String("http://www.w3.org/1999/02/22-rdf-syntax-ns#"); d->namespaceURI = ns; d->seq = ResourcePtr(new Resource(ns + QLatin1String("Seq"))); d->type = PropertyPtr(new Property(ns + QLatin1String("type"))); d->li = PropertyPtr(new Property(ns + QLatin1String("li"))); }
SyndicationVocab::SyndicationVocab() : d(new SyndicationVocabPrivate) { QString ns = QLatin1String("http://purl.org/rss/1.0/modules/syndication/"); d->namespaceURI = ns; d->updatePeriod = PropertyPtr( new Property(ns + QLatin1String("updatePeriod")) ); d->updateFrequency = PropertyPtr( new Property(ns + QLatin1String("updateFrequency")) ); d->updateBase = PropertyPtr( new Property(ns + QLatin1String("updateBase")) ); }
void InputHandler::handleKeys() { //TProperty<int>* bla =static_cast<TProperty<int>*>(tmp); sf::Event sfmlEvent; while (m_app->pollEvent(sfmlEvent)) { EventPtr keyPressedEvent(new Event(KEY_PRESSED,0.0f)); EventPtr keyRepeatEvent(new Event(KEY_REPEAT,0.0f)); PropertyPtr key; switch (sfmlEvent.type) { case sf::Event::Closed: m_app->close(); break; case sf::Event::KeyPressed: key = PropertyPtr(new TProperty<sf::Keyboard::Key>(KEY,sfmlEvent.key.code)); keyPressedEvent->addProperty(key); std::cout << "Taste gedrueckt" << std::endl; break; case sf::Event::KeyReleased: default: break; } IBaseEventManager::Get()->VQueueEvent(keyPressedEvent); } }
PropertyPtr Component::getProperty(const std::string& name) const { auto it = m_properties.find(name); if (it != m_properties.end()) return it->second; else return PropertyPtr(); }
PropertyPtr Component::getProperty(const base::string& name) { Properties::iterator it = m_properties.find(name); if (it != m_properties.end()) return it->second; else return PropertyPtr(); }
ContentVocab::ContentVocab() : d(new ContentVocabPrivate) { QString ns = QStringLiteral("http://purl.org/rss/1.0/modules/content/"); d->namespaceURI = ns; d->encoded = PropertyPtr(new Property(ns + QLatin1String("encoded"))); }
DrawableActorWeakPtr ActorManager::getNewDrawableActor(const std::string& p_actorName, Pose* p_pPose) { pugi::xml_document doc; std::string fileName = Settings::getString("XML_PATH")+"DrawableActors.xml"; pugi::xml_parse_result result = doc.load_file(fileName.c_str()); pugi::xml_node root = doc.child("root"); for (pugi::xml_node actor = root.child("actor"); actor; actor = actor.next_sibling("actor")) { if ( p_actorName.compare(actor.attribute("name").value()) == 0) { DrawableActorStrongPtr movie = DrawableActorStrongPtr(new DrawableActor(m_globalId++)); PropertyPtr nameProp = PropertyPtr(new TProperty<std::string>(NAME,p_actorName)); movie->addProperty(nameProp); if (actor.child("texture").empty() == 0) { //std::cout << "texture " << attribute.attribute("value").value() << std::endl; movie->setTexture(*TextureLoader::getTexture(actor.child("texture").attribute("value").value())); } if (actor.child("scale").empty() == 0) { std::stringstream x_sstr; float x; x_sstr<<actor.child("scale").attribute("x").value(); x_sstr>>x; std::stringstream y_sstr; float y; y_sstr<<actor.child("scale").attribute("y").value(); y_sstr>>y; //std::cout << "scale " << x << "," << y << std::endl; movie->setScale(x,y); } if (actor.child("origin").empty() == 0) { //std::cout << "origin " << std::endl; std::stringstream x_sstr; float x; x_sstr<<actor.child("origin").attribute("x").value(); x_sstr>>x; std::stringstream y_sstr; float y; y_sstr<<actor.child("origin").attribute("y").value(); y_sstr>>y; movie->setOrigin(x,y); }
PropertyPtr Statement::predicate() const { const shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : shared_ptr<Model::ModelPrivate>(); return m ? m->propertyByID(d->predicateID) : PropertyPtr( new Property() ); }
PropertyPtr buildProperty( const std::string& name, const std::string& elementName, typename Type< T >::VectorType& vector ) { return PropertyPtr( SimpleVectorProperty< T >::create( name, elementName, vector )); }
PropertyPtr Property::CreateInstance(DataTypePropertyPtr _type, DataPtr _owner) { PropertyPtr result = PropertyPtr(new Property(_type, _owner)); result->mWeakThis = PropertyWeak(result); return result; }