示例#1
0
 constexpr inline typename std::enable_if<
   !std::is_same<U,std::initializer_list<typename basic_val<T>::pair_t>>::value
   ,typename basic_val<T>::pair_t
 >::type basic_val<T>::k::operator=(U&& t) const
 {
   return pair_t(key, std::forward<U>(t));
 }
示例#2
0
int64_t& VersionVector::operator[]( int64_t key )
{
    auto it = find(key);
    if( it != end() )
        return it->second;
    else
    {
        std::pair< map_t::iterator,bool > result =
            insert( pair_t(key,0) );
        return result.first->second;
    }
}
示例#3
0
 void 
 well_obj::add_branch (const std::string &branch_name, sp_branch_t branch)
 {
    branches.insert (pair_t(branch_name, branch));
 }
示例#4
0
	void LongevityManager::Register( unsigned int longevity, LongevityObjectBase* ptr )
	{
		longevityObj.push_back( pair_t( longevity,ptr ) );
		std::sort( longevityObj.begin(), longevityObj.end(), &Less );
		
	};
示例#5
0
	void SQLiteRow::AddColumn(Common::Object::unique_ptr value, 
		const std::string& name)
	{
		columns.insert(pair_t(name, std::move(value)));
	}
示例#6
0
 constexpr inline typename basic_val<T>::pair_t
 basic_val<T>::k::operator=(std::initializer_list<pair_t> list) const
 {
   return pair_t(key, list);
 }
示例#7
0
#include <zeug/memory_map.hpp>
#include <zeug/platform.hpp>
#include <zeug/window.hpp>
#include <zeug/zipreader.hpp>
#include <zeug/opengl/buffer.hpp>
#include <zeug/opengl/program.hpp>
#include <zeug/opengl/shader.hpp>
#include <zeug/opengl/texture.hpp>

#include <GLES2/gl2.h>

#include "external/json11/json11.hpp"

const Statestring_enum::vec_t Statestring_enum::en2str_vec = 
{
        pair_t(SpriteState::None, "None"),
        pair_t(SpriteState::IdleRight, "IdleRight"),
        pair_t(SpriteState::IdleLeft, "IdleLeft"),
        pair_t(SpriteState::WalkRight, "WalkRight"),
        pair_t(SpriteState::WalkLeft, "WalkLeft"),
};

Sprite::Sprite(const std::shared_ptr<zeug::window> &base_window, std::string sprite_path, std::int32_t id) :
    base_window(base_window), 
    id(id),
    frame_number(0)
{
    // load zip/apk archive
    auto pakpath = [] () 
    {
        if (zeug::this_app::apkpath() == "Unknown")