I hereby claim:
- I am alecthomas on github.
- I am alec (https://keybase.io/alec) on keybase.
- I have a public key whose fingerprint is DEB7 1627 8C8D 5DA9 8371 9C9C 8DFD C9B0 0260 EE3A
To claim this, I am signing this object:
| // Generated by https://github.com/alecthomas/prototemplate. DO NOT EDIT! | |
| import Foundation | |
| // This generated code relies on the serialization layer of | |
| // https://github.com/alexeyxo/protobuf-swift | |
| import ProtocolBuffers | |
| // Extend protobuf-swift's Message to include deserialization directly, rather | |
| // than via a MessageBuilder. | |
| public protocol ProtobufMessage: Message { |
| #pragma once | |
| #include <vector> | |
| #include <entityx/Entity.h> | |
| #include <entityx/System.h> | |
| namespace entityx { | |
| struct Notification : public Component<Notification> { | |
| EntityManager::ComponentMask components_added, components_removed; |
| public func dispatch_sync_result<T>(q: dispatch_queue_t, block: () -> T) -> T { | |
| var r: T? | |
| dispatch_sync(q, { | |
| r = block() | |
| }) | |
| return r! | |
| } |
I hereby claim:
To claim this, I am signing this object:
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "strconv" | |
| "github.com/alecthomas/kingpin" | |
| ) |
Table of Contents
| // Compile with: c++ -std=c++11 -lentityx -lsfml-graphics t.cc | |
| #include "SFML/Graphics.hpp" | |
| #include "entityx/entityx.h" | |
| using namespace entityx; | |
| struct Movement : public Component<Movement> { | |
| sf::Vector2f position, direction; | |
| }; |
| // CommitOrRollbackOnError commits or rolls back a transaction based on the | |
| // value of an error reference. It helps avoid error prone boilerplate | |
| // rollback calls. | |
| // | |
| // Most useful in a defer statement: | |
| // | |
| // tx, err := db.Begin() | |
| // if err != nil { | |
| // return err | |
| // } |
| import ( | |
| "encoding/json" | |
| "net/http" | |
| "reflect" | |
| "github.com/codegangsta/inject" | |
| "github.com/go-martini/martini" | |
| ) | |
| const ( |