dgodfrey206 / fastcast Goto Github PK
View Code? Open in Web Editor NEWThis project forked from opencollab/fastcast
Provide a fast alternative to dynamic_cast with C++11
This project forked from opencollab/fastcast
Provide a fast alternative to dynamic_cast with C++11
FASTCAST -------- The goal of fastcast is to provide a fast alternative to dynamic_cast. Each class in the hierarchy has an integer identifier. This identifier is built to make instanceof operation very fast. Usage : ----- Fastcast is easy to use: i) include fastcast.hxx ii) the root class (say A) must inherit from fastcast::fcast<A, uint64_t> (or an other integer type) iii) each class in the hierarchy having children must typedef a fcast_hierarchy: // typedef for the root class typedef fastcast::hierarchy<fastcast::root, fastcast::children<B, C>> fcast_hierarchy; // typedef for a class other than root // The first template parameter gives the parent // and the second define the children typedef fastcast::hierarchy<A, fastcast::children<D>> fcast_hierarchy; // here there is no child typedef fastcast::hierarchy<D> fcast_hierarchy; iv) Each ctor must set the identifier for the class: struct B : public A { typedef fastcast::hierarchy<A, fastcast::children<D>> fcast_hierarchy; B() { fastcast::fcast<A, uint32_t>::set_id<B>(); } }; v) the file test.cpp could be compiled in using: clang++ -std=c++11 -oout test/test.cpp -I. && ./out or g++ -std=c++11 -oout test/test.cpp -I. && ./out
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.