repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
jeanleflambeur/silkopter | q/include/video/Shader_Source.h | <reponame>jeanleflambeur/silkopter
#pragma once
namespace q
{
namespace video
{
class Shader_Source
{
public:
struct Literal
{
Literal() = default;
Literal(std::string const& value, size_t start, size_t length) : value(value), start(start), length(length) {}
std::string v... |
jeanleflambeur/silkopter | silkopter/fc/src/generator/Oscillator.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "HAL.h"
#include "common/stream/IFloat.h"
#include "common/node/IGenerator.h"
#include "Basic_Output_Stream.h"
namespace silk
{
namespace hal
{
struct Oscillator_Descriptor;
struct Oscillator_Config;
}
}
namespace silk
{
namespace node
{
class Oscillator : ... |
jeanleflambeur/silkopter | qbase/include/Profiler.h | #ifndef __PROFILER_H__
#define __PROFILER_H__
//#define __PROFILER_ENABLED__
#define __PROFILER_FULL_TYPE_EXPANSION__
#undef noinline
#undef fastcall
#if defined(_MSC_VER)
#undef __PRETTY_FUNCTION__
#define __PRETTY_FUNCTION__ __FUNCSIG__
#define PROFILE_CONCAT( a, b ) a "/" b
#define noinline __d... |
jeanleflambeur/silkopter | def_lang/include/def_lang/IValue_Container.h | <gh_stars>10-100
#pragma once
#include <stdint.h>
#include <memory>
#include "Result.h"
namespace ts
{
class IValue;
class IValue_Container
{
public:
virtual ~IValue_Container() = default;
virtual size_t get_value_count() const = 0;
virtual std::shared_ptr<const IValue> get_value(size_t idx) const = 0... |
jeanleflambeur/silkopter | qbase/include/util/Encoder.h | #pragma once
namespace q
{
namespace util
{
extern const uint8_t s_char_64_rev[256];
extern const uint8_t s_char_64[64];
inline size_t compute_base64_encoded_size(size_t n)
{
return ((4 * n / 3) + 3) & (~3);
}
inline size_t compute_base64_max_decoded_size(size_t n)
{
... |
jeanleflambeur/silkopter | silkopter/fc/src/processor/Pressure_Velocity.h | #pragma once
#include "HAL.h"
#include "common/stream/IPressure.h"
#include "common/stream/IVelocity.h"
#include "common/node/IProcessor.h"
#include "Sample_Accumulator.h"
#include "Basic_Output_Stream.h"
namespace silk
{
namespace hal
{
struct Pressure_Velocity_Descriptor;
struct Pressure_Velocity_Config;
}
}
nam... |
jeanleflambeur/silkopter | qbase/include/mem/auto_buffer.h | <filename>qbase/include/mem/auto_buffer.h<gh_stars>10-100
// Copyright <NAME>, 2009.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CUSTOM_AUTO_BUFFER
#define BOOST_CUSTOM_AUTO_BUFFER
//#... |
jeanleflambeur/silkopter | silkopter/gs/src/stdafx.h | <filename>silkopter/gs/src/stdafx.h<gh_stars>10-100
#pragma once
#if defined __cplusplus
#include <memory>
#include <chrono>
#include <thread>
#include <mutex>
#include <algorithm>
#include <numeric>
#include <deque>
#include <unordered_map>
#include <asio.hpp>
#include <QtCore>
#include <QtWidgets/... |
jeanleflambeur/silkopter | q/include/scene/Scene_Node.h | #pragma once
#include "scene/Camera.h"
#include "video/Renderer.h"
#include "scene/Scene.h"
#include "video/Render_Job.h"
namespace q
{
namespace scene
{
struct Cull_Result
{
Cull_Result() : status(Cull_Status::OUTSIDE), camera_distance(0), projected_radius(0) {}
Cull_Status status;
float... |
jeanleflambeur/silkopter | silkopter/libs/common/stream/IProximity.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "Stream_Base.h"
namespace silk
{
namespace stream
{
class IProximity : public IScalar_Stream<Semantic::PROXIMITY>
{
public:
typedef std::false_type can_be_filtered_t;
struct Value
{
std::vector<math::vec3f> distances;
};
typedef s... |
jeanleflambeur/silkopter | qbase/include/QBase.h | <filename>qbase/include/QBase.h
#pragma once
#if defined _MSC_VER
# pragma warning(disable: 4201) //disable the nameless struct/union warning on W4
# pragma warning(disable: 4324) //disable the padding warning on W4
# pragma warning(disable: 4127) //disable the constant expression in conditional that pops up in t... |
jeanleflambeur/silkopter | def_lang/include/def_lang/IName_Attribute.h | #pragma once
#include "def_lang/IAttribute.h"
namespace ts
{
class IValue;
class IName_Attribute : public virtual IAttribute
{
public:
};
}
|
jeanleflambeur/silkopter | def_lang/include/def_lang/impl/Enum_Item_Initializer.h | #pragma once
#include "def_lang/IEnum_Item_Initializer.h"
namespace ts
{
class Enum_Item_Initializer : public virtual IEnum_Item_Initializer
{
public:
Enum_Item_Initializer(std::shared_ptr<const IEnum_Item> item);
std::shared_ptr<const IEnum_Item> get_enum_item() const override;
private:
std::shared_pt... |
jeanleflambeur/silkopter | def_lang/include/def_lang/ep/Value_Template_EP.h | #pragma once
#include <memory>
#include "def_lang/IValue.h"
#include "def_lang/IInitializer.h"
namespace ts
{
template<typename Traits>
class Value_Template_EP : public virtual Traits::value_interface
{
public:
typedef typename Traits::value_interface value_interface;
typedef typename Traits::type_interface... |
jeanleflambeur/silkopter | silkopter/libs/utils/comms/RF4463F30_Socket.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "ISocket.h"
#include <vector>
#include <string>
#include <chrono>
#include <thread>
#include "utils/Clock.h"
namespace util
{
namespace comms
{
class RF4463F30_Socket : public ISocket
{
public:
RF4463F30_Socket(std::string const& device, uint32_t speed, bo... |
jeanleflambeur/silkopter | silkopter/rc/src/stdafx.h | #pragma once
#if defined __cplusplus
#include <memory>
#include <chrono>
#include <thread>
#include <mutex>
#include <algorithm>
#include <numeric>
#include <deque>
#include <unordered_map>
#include <future>
#include "_qmath.h"
#include "QBase.h"
#include "def_lang/Result.h"
namespace std
{
... |
jeanleflambeur/silkopter | def_lang/include/def_lang/IMember.h | <filename>def_lang/include/def_lang/IMember.h
#pragma once
#include <memory>
#include "ISymbol.h"
namespace ts
{
class IMember_Def;
class IValue;
class IMember
{
public:
virtual ~IMember() = default;
virtual std::shared_ptr<IMember_Def const> get_member_def() const = 0;
virtual std::shared_ptr<const I... |
jeanleflambeur/silkopter | qbase/include/util/Result.h | #pragma once
namespace q
{
namespace util
{
//specialize this for your enum results
template<class ENUM> std::string get_result_description(ENUM value)
{
return format2<std::string>("Unknown result code: {}", static_cast<int>(value));
}
//This represents a result. IT needs an enum with codes an... |
jeanleflambeur/silkopter | qmath/include/qmath/func_trig.h | <filename>qmath/include/qmath/func_trig.h
#pragma once
namespace math
{
template<typename T> T radians(T const& degrees);
template<typename T> T degrees(T const& radians);
//////////////////////////////////////////////////////////////////////////
//component wise trig for vectors.
//vec3 val = s... |
jeanleflambeur/silkopter | def_lang/src/stdafx.h | #include <type_traits>
#include <typeinfo>
#include <memory>
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <boost/optional.hpp>
#include <boost/variant.hpp>
#include <stdint.h>
#include <cassert>
|
jeanleflambeur/silkopter | def_lang/include/def_lang/impl/String_Value.h | #pragma once
#include "def_lang/IString_Type.h"
#include "def_lang/IString_Value.h"
#include "def_lang/ep/Value_Template_EP.h"
namespace ts
{
class String_Value;
struct String_Traits : public IString_Traits
{
typedef String_Value value_implementation;
};
class String_Value final : public Value_Template_EP<Stri... |
jeanleflambeur/silkopter | silkopter/libs/embedded/utils/Atomic.h | #pragma once
namespace util
{
template <class T>
class Atomic
{
public:
Atomic() = default;
Atomic(Atomic<T> const& other)
{
set(other.get());
}
explicit Atomic(T val) : m_value(val) {}
Atomic<T>& operator=(Atomic<T> const& other)
{
set(other.get());
}
//sets a new value
void set... |
jeanleflambeur/silkopter | silkopter/gs_old/src/HAL_Window.h | #pragma once
#include <QMainWindow>
#include <QtWidgets>
#include "Render_Widget.h"
#include "qneblock.h"
#include "qnodeseditor.h"
#include "qneport.h"
#include "HAL.h"
#include "Comms.h"
class QNodesEditor;
class JSON_Model;
class Sim_Window;
class HAL_Window : public QMainWindow
{
public:
... |
jeanleflambeur/silkopter | silkopter/rc/def/gen_support.h | #pragma once
#include "qmath.h"
namespace silk
{
namespace settings
{
typedef ::math::vec2<int64_t> vec2i;
typedef ::math::vec2<float> vec2f;
typedef ::math::vec2<double> vec2d;
typedef ::math::vec3<int64_t> vec3i;
typedef ::math::vec3<float> vec3f;
typedef ::math::vec3<double> vec3d;
typedef ::math::vec4<int64_t>... |
jeanleflambeur/silkopter | q/include/video/Auto_Uniform_Def.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "Uniform.h"
namespace q
{
namespace video
{
class Auto_Uniform_Def
{
public:
Auto_Uniform_Def() = default;
Auto_Uniform_Def(data:Path const& link, size_t file_start_offset = 0, size_t file_end_offset = 0);
Path const& get_link()... |
jeanleflambeur/silkopter | silkopter/libs/utils/Serialization.h | #pragma once
#include <vector>
#include <string>
#include "qmath.h"
//#include "rapidjson/document.h"
//#include "rapidjson/stringbuffer.h"
//#include "rapidjson/writer.h"
#include "utils/Serialization.h"
namespace util
{
namespace serialization
{
typedef std::vector<uint8_t> Buffer_t;
template<class T> auto deseri... |
jeanleflambeur/silkopter | silkopter/fc/src/sink/PCA9685.h | #pragma once
#include "HAL.h"
#include "common/node/ISink.h"
#include "common/stream/IPWM.h"
#include "common/bus/II2C.h"
namespace silk
{
namespace hal
{
struct PCA9685_Descriptor;
struct PCA9685_Config;
}
}
namespace silk
{
namespace node
{
class PCA9685 : public ISink
{
public:
PCA9685(HAL& hal);
~PCA9... |
jeanleflambeur/silkopter | def_lang/include/def_lang/ILiteral.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include <memory>
#include "ITemplate_Argument.h"
#include "IInitializer.h"
namespace ts
{
class IValue;
class ILiteral : public virtual ITemplate_Argument
{
public:
virtual ~ILiteral() = default;
virtual std::shared_ptr<const IValue> get_value() const = 0;
}... |
jeanleflambeur/silkopter | q/src/res/Impl/QAnimation_Loader.h | <reponame>jeanleflambeur/silkopter
#pragma once
namespace q
{
namespace res
{
namespace impl
{
class QAnimation_Loader : public res::Loader<anim::Animation>
{
virtual void load(Path const& path, data::Source& source, anim::Animation& r) const;
virtual bool can_load_from_source(data::Source& source) ... |
jeanleflambeur/silkopter | qbase/include/Logger.h | #pragma once
namespace q
{
namespace logging
{
class Logger : util::Noncopyable
{
public:
virtual ~Logger() {}
// This function is responsible of logging the message.
virtual void log(Level level, std::string const& message) = 0;
};
typedef std::unique_ptr<q::logging::Logger> Logger... |
jeanleflambeur/silkopter | def_lang/include/def_lang/ISymbol.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include <string>
#include "Symbol_Path.h"
namespace ts
{
class IDeclaration_Scope;
class ISymbol
{
public:
virtual ~ISymbol() = default;
virtual std::string const& get_name() const = 0;
virtual Symbol_Path get_symbol_path() const = 0;
virtual IDecla... |
jeanleflambeur/silkopter | silkopter/fc/src/pilot/Multirotor_Pilot.h | <reponame>jeanleflambeur/silkopter<filename>silkopter/fc/src/pilot/Multirotor_Pilot.h<gh_stars>10-100
#pragma once
#include "common/node/IPilot.h"
#include "common/stream/ICamera_Commands.h"
#include "common/stream/IMultirotor_Commands.h"
#include "common/stream/IMultirotor_State.h"
#include "common/stream/IVideo.h"
... |
jeanleflambeur/silkopter | silkopter/gs/src/stream_viewers/video/Video_Decoder.h | <filename>silkopter/gs/src/stream_viewers/video/Video_Decoder.h<gh_stars>10-100
#pragma once
#include "Comms.h"
extern "C"
{
struct AVCodec;
struct AVCodecContext;
struct SwsContext;
struct AVFrame;
struct AVPicture;
}
class Video_Decoder : q::util::Noncopyable
{
public:
Video_Decoder();
virtual ~Video_Deco... |
jeanleflambeur/silkopter | q/include/video/Color.h | #pragma once
namespace q
{
namespace video
{
namespace color
{
struct A_8
{
A_8() = default;
explicit A_8(uint8_t a) : a(a) {}
uint8_t a = 0;
};
struct I_8
{
I_8() = default;
explicit I_8(uint8_t i) : i(i) {}
uint8_t i = 0;
};
union AI_8
{
AI_... |
jeanleflambeur/silkopter | qmath/include/qmath/mat3.h | #pragma once
namespace math
{
///////////////////////////////////////////////////////////////////////////////
// forward declarations
///////////////////////////////////////////////////////////////////////////////
template<typename T> struct vec2;
template<typename T> struct vec3;
template<typename T> struc... |
jeanleflambeur/silkopter | q/include/Ptr_Fw_Declaration.h | <filename>q/include/Ptr_Fw_Declaration.h
#pragma once
namespace q
{
template<class T>
inline void noop_deleter(T*)
{
;
}
namespace res
{
class Resource;
DECLARE_CLASS_PTR(Resource);
}
namespace anim
{
class Animation_Node;
DECLARE_CLASS_PTR(Animation_Node);
class Animation;
DEC... |
jeanleflambeur/silkopter | silkopter/libs/utils/comms/Channel.h | #pragma once
#include <vector>
#include <deque>
#include <mutex>
#include <cassert>
#include "utils/Crc.h"
namespace util
{
namespace comms
{
template<class MESSAGE_T, class SOCKET_T>
class Channel
{
Channel(Channel<MESSAGE_T, SOCKET_T> const&) = delete;
Channel<MESSAGE_T, SOCKET_T>& operato... |
jeanleflambeur/silkopter | silkopter/libs/utils/Pool.h | <filename>silkopter/libs/utils/Pool.h
#pragma once
#include <deque>
#include <map>
#include <vector>
#include <atomic>
#include <mutex>
#include <memory>
#include <functional>
#include <cassert>
template<class T> struct Pool
{
std::function<void(T&)> on_acquire;
std::function<void(T&)> on_release;
typede... |
jeanleflambeur/silkopter | silkopter/libs/common/node/IResampler.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "common/node/INode.h"
namespace silk
{
namespace node
{
class IResampler : public Node_Base<Type::RESAMPLER>
{
public:
};
}
}
|
jeanleflambeur/silkopter | silkopter/libs/utils/hw/I2C_Dev.h | #pragma once
#include "II2C.h"
#include <atomic>
#include <vector>
#include <string>
#include "def_lang/Result.h"
namespace util
{
namespace hw
{
class I2C_Dev : public II2C
{
public:
I2C_Dev();
~I2C_Dev() override;
ts::Result<void> init(std::string const& device);
bool read(uint8_t address, uint8... |
jeanleflambeur/silkopter | qbase/include/Types.h | <reponame>jeanleflambeur/silkopter
#pragma once
#define DEFINE_COPYING(ClassName) \
ClassName(const ClassName&) { QASSERT(0); } \
ClassName& operator=(const ClassName&) { QASSERT(0); return *this; }
#define DEFINE_CMP_OPERATORS(ClassName) \
bool operator>(ClassName const& other) const ... |
jeanleflambeur/silkopter | qmath/include/qmath/mat4.h | #pragma once
namespace math
{
///////////////////////////////////////////////////////////////////////////////
// forward declarations
///////////////////////////////////////////////////////////////////////////////
template<typename T> struct vec3;
template<typename T> struct vec4;
template<typename T> struc... |
jeanleflambeur/silkopter | silkopter/gs_old/src/Numeric_Viewer.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "HAL.h"
#include "Comms.h"
#include "ui_Numeric_Viewer.h"
class Numeric_Viewer : public QWidget
{
public:
Numeric_Viewer(std::string const& unit, uint32_t sample_rate, QWidget *parent);
~Numeric_Viewer();
void add_graph(std::string const& name, std:... |
jeanleflambeur/silkopter | def_lang/include/def_lang/impl/Literal_Attribute.h | #pragma once
#include "def_lang/ILiteral_Attribute.h"
#include <string>
#include <memory>
namespace ts
{
class IValue;
class Literal_Attribute : public virtual ILiteral_Attribute
{
public:
Literal_Attribute(std::string const& name, std::shared_ptr<IValue> value);
~Literal_Attribute();
std::string get_n... |
jeanleflambeur/silkopter | silkopter/gs_old/src/Axis.h | #pragma once
extern void render_arrow(math::vec3f const& start,
math::vec3f const& end,
q::video::Material const& material,
float width,
uint32_t color,
q::draw::Painter& painter);
extern v... |
jeanleflambeur/silkopter | q/include/res/Streamer.h | #pragma once
namespace q
{
namespace res
{
class Factory;
template<class Res>
class Streamer : public util::Noncopyable
{
friend class Factory;
public:
virtual ~Streamer() {}
protected:
//these are supposed to be called by a factory
virtual std::shared_ptr<Res> load(Factory co... |
jeanleflambeur/silkopter | def_lang/include/def_lang/impl/All_Numeric_Values.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "Numeric_Value_Template.h"
#include "def_lang/impl/All_Numeric_Types.h"
namespace ts
{
typedef Numeric_Value_Template<Scalar_Numeric_Traits<float>> Float_Value;
typedef Numeric_Value_Template<Scalar_Numeric_Traits<double>> Double_Value;
typedef Numeric_... |
jeanleflambeur/silkopter | def_lang/include/def_lang/impl/Variant_Type.h | #pragma once
#include "def_lang/IVariant_Type.h"
#include "def_lang/ep/Attribute_Container_EP.h"
#include "def_lang/ep/Symbol_EP.h"
namespace ts
{
class Variant_Type final: virtual public IVariant_Type, public Symbol_EP, public Attribute_Container_EP, public std::enable_shared_from_this<Variant_Type>
{
public:
t... |
jeanleflambeur/silkopter | silkopter/gs_old/src/Camera_Controller_3D.h | #pragma once
class Camera_Controller_3D
{
public:
typedef std::function<float(const math::vec2u32&)> Depth_Getter;
Camera_Controller_3D(q::scene::Camera& camera);
void set_depth_getter(Depth_Getter getter);
void mouse_press_event(QMouseEvent* event);
void mouse_release_event(QMouseEv... |
jeanleflambeur/silkopter | silkopter/fc/src/processor/Quad_Multirotor_Motor_Mixer.h | #pragma once
#include "common/node/IProcessor.h"
#include "common/stream/ITorque.h"
#include "common/stream/IFloat.h"
#include "common/stream/IThrottle.h"
#include "uav_properties/IMultirotor_Properties.h"
#include "HAL.h"
#include "Sample_Accumulator.h"
namespace silk
{
namespace hal
{
struct Quad_Multirotor_Moto... |
jeanleflambeur/silkopter | q/include/video/Dynamic_Image.h | #pragma once
#include "res/Resource.h"
#include "video/Color.h"
#include "Ptr_Fw_Declaration.h"
namespace q
{
namespace video
{
class Dynamic_Image : public res::Resource
{
public:
enum class Format : uint8_t
{
RGBA_4,
RGB_565,
RGBA_5551,
RGB_8,
RGB... |
jeanleflambeur/silkopter | def_lang/include/def_lang/IBool_Type.h | <gh_stars>10-100
#pragma once
#include "IType.h"
namespace ts
{
class IBool_Value;
class IBool_Type;
struct IBool_Traits
{
typedef IBool_Value value_interface;
typedef IBool_Type type_interface;
typedef bool fundamental_type;
};
class IBool_Type : virtual public IType
{
public:
virtual ~IBool_Type(... |
jeanleflambeur/silkopter | def_lang/include/def_lang/All_INumeric_Values.h | <reponame>jeanleflambeur/silkopter<filename>def_lang/include/def_lang/All_INumeric_Values.h<gh_stars>10-100
#pragma once
#include "INumeric_Value_Template.h"
#include "All_INumeric_Types.h"
namespace ts
{
typedef INumeric_Value_Template<Scalar_INumeric_Traits<float>> IFloat_Value;
typedef INumeric_Value_Template... |
jeanleflambeur/silkopter | qinput/include/Sensors.h | <filename>qinput/include/Sensors.h
#pragma once
namespace qinput
{
class Input_Mgr;
struct Sensor_Event
{
enum class Type
{
ACCELEROMETER_CHANGE
};
Type type;
q::Clock::time_point timestamp;
math::vec3f accelerometer_value;
};
class Sensors : q::util::Noncopyable
{
fri... |
jeanleflambeur/silkopter | silkopter/rc/src/HUD.h | <filename>silkopter/rc/src/HUD.h<gh_stars>10-100
#pragma once
#include "Comms.h"
namespace silk
{
///////////////////////////////////////////////////////////////////////////////////////////////////
class IHAL;
class HUD
{
public:
HUD(silk::IHAL& hal);
void draw();
private:
void draw_attitude(const str... |
jeanleflambeur/silkopter | q/src/res/Impl/QModel_Base_Loader.h | #pragma once
namespace q
{
namespace res
{
namespace impl
{
class QModel_Base_Loader : public res::Loader<scene::Model_Base>
{
virtual void load(Path const& path, data::Source& source, scene::Model_Base& r) const;
virtual bool can_load_from_source(data::Source& source) const;
};
}
}
} |
jeanleflambeur/silkopter | silkopter/fc/src/resampler/Resampler.h | #pragma once
#include "HAL.h"
#include "common/node/IResampler.h"
#include "utils/Butterworth.h"
#include <deque>
#include "Sample_Accumulator.h"
#include "Basic_Output_Stream.h"
#include "hal.def.h"
namespace silk
{
namespace node
{
template<class Stream_t>
class Resampler : public IResampler
{
public:
static... |
jeanleflambeur/silkopter | silkopter/libs/utils/Timed_Scope.h | <reponame>jeanleflambeur/silkopter<filename>silkopter/libs/utils/Timed_Scope.h
#pragma once
#include "Clock.h"
namespace util
{
class Timed_Scope
{
public:
Timed_Scope(char const* file, int line)
: m_file(file)
, m_line(line)
, m_start(Clock::now())
... |
jeanleflambeur/silkopter | silkopter/libs/common/bus/IBus.h | #pragma once
namespace silk
{
namespace hal
{
struct IBus_Descriptor;
}
}
namespace silk
{
namespace bus
{
class IBus
{
public:
virtual ~IBus() = default;
virtual ts::Result<void> init(hal::IBus_Descriptor const& descriptor) = 0;
virtual std::shared_ptr<const hal::IBus_Descriptor> get_descriptor() cons... |
jeanleflambeur/silkopter | def_lang/include/def_lang/Math.h | <gh_stars>10-100
#pragma once
#include <stdint.h>
#include <sstream>
//#include "qmath.h"
namespace ts
{
template<typename T>
struct vec2
{
vec2() = default;
explicit vec2(T v) : x(v), y(v) {}
vec2(T x, T y) : x(x), y(y) {}
bool operator==(vec2<T> const& other) const { return x == other.x && y == oth... |
jeanleflambeur/silkopter | q/include/draw/Sprite.h | #pragma once
namespace q
{
namespace draw
{
class Sprite : util::Noncopyable
{
friend class Painter;
public:
Sprite(SpriteBase_cptr const& base);
~Sprite();
SpriteBase const& getBase() const;
//////////////////////////////////////////////////////////////////////////
// Trans... |
jeanleflambeur/silkopter | silkopter/libs/utils/hw/RFM22B.h | #pragma once
#include <string>
#include "SPI_Dev.h"
#include "utils/Clock.h"
namespace util
{
namespace hw
{
class RFM22B
{
public:
RFM22B();
~RFM22B();
enum class Register : uint8_t
{
DEVICE_TYPE_00 = 0x00,
DEVICE_VERSION_01 = 0x01,
DEVICE_STATUS_02 = 0x0... |
jeanleflambeur/silkopter | def_lang/include/def_lang/IStruct_Value.h | <reponame>jeanleflambeur/silkopter<gh_stars>10-100
#pragma once
#include "IValue.h"
#include "IMember_Container.h"
namespace ts
{
class IStruct_Type;
class IStruct_Value : virtual public IValue, virtual public IMember_Container
{
public:
virtual ~IStruct_Value() = default;
virtual std::shared_ptr<IStruct_T... |
jeanleflambeur/silkopter | qmath/include/qmath/line3.h | #pragma once
namespace math
{
//! 3D line between two points with intersection methods.
template <typename T>
struct line3
{
///////////////////////////////////////////////////////////////////////////////
// constructors
///////////////////////////////////////////////////////////////////////////////
/** ... |
jeanleflambeur/silkopter | def_lang/include/def_lang/IInitializer_List.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include <memory>
#include "IInitializer.h"
namespace ts
{
class IInitializer_List : public virtual IInitializer
{
public:
virtual ~IInitializer_List() = default;
virtual size_t get_initializer_count() const = 0;
virtual std::shared_ptr<const IInitializer>... |
jeanleflambeur/silkopter | def_lang/include/def_lang/IType.h | <gh_stars>10-100
#pragma once
#include "ISymbol.h"
#include "IAttribute_Container.h"
#include "ITemplate_Argument.h"
namespace ts
{
class IValue;
class IType : virtual public ISymbol, virtual public IAttribute_Container
{
public:
IType() = default;
IType(IType const&) = delete;
IType& operator=(IType co... |
jeanleflambeur/silkopter | silkopter/fc/src/lpf/LPF.h | #pragma once
#include "HAL.h"
#include "common/node/ILPF.h"
#include "utils/Butterworth.h"
#include "Sample_Accumulator.h"
#include "Basic_Output_Stream.h"
#include "hal.def.h"
namespace silk
{
namespace node
{
template<class Stream_t>
class LPF : public ILPF
{
public:
LPF(HAL& hal);
ts::Result<void> init... |
jeanleflambeur/silkopter | qbase/include/util/Tween.h | #pragma once
namespace q
{
namespace tween
{
struct Tween
{
};
template<typename T>
struct Linear : public Tween
{
typedef T value_t;
T operator() (T val)
{
return val;
}
};
//Quadratic
template<typename T>
struct Quadratic_Ease_Out : public Tween
{
typedef T value_t;
... |
jeanleflambeur/silkopter | silkopter/gs/src/value_editors/Enum_Value_Editor.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "IValue_Editor.h"
#include "Qualified_Value.h"
class QComboBox;
class Enum_Value_Editor : public IValue_Editor
{
public:
Enum_Value_Editor(const Qualified_Value<ts::IEnum_Value>& qualified_value, std::string const& suffix_str);
~Enum_Value_Ed... |
jeanleflambeur/silkopter | silkopter/gs_old/src/calibration/Angular_Velocity_Calibration_Wizard.h | #pragma once
#include <QDialog>
#include "sz_math.hpp"
#include "sz_Calibration_Data.hpp"
#include "HAL.h"
#include "Comms.h"
class Angular_Velocity_Calibration_Wizard : public QDialog
{
public:
Angular_Velocity_Calibration_Wizard(silk::HAL& hal, silk::Comms& comms, silk::node::gs::Node_ptr node, size_t output_... |
jeanleflambeur/silkopter | silkopter/fc/src/controller/Rate_Controller.h | <gh_stars>10-100
#pragma once
#include "common/node/IController.h"
#include "common/stream/IAngular_Velocity.h"
#include "common/stream/ITorque.h"
#include "HAL.h"
#include "uav_properties/IMultirotor_Properties.h"
#include "utils/PID.h"
#include "Sample_Accumulator.h"
#include "Basic_Output_Stream.h"
namespace sil... |
jeanleflambeur/silkopter | q/include/video/Renderer.h | <gh_stars>10-100
#pragma once
#include "Render_Target.h"
#include "Capabilities.h"
#include "video/Uniform_Def.h"
#include "video/Sampler_Def.h"
#include "video/Shader.h"
namespace q
{
namespace scene
{
class Camera;
}
namespace video
{
class Uniform_Def;
class Sampler_Def;
class Attribute_Def;
... |
jeanleflambeur/silkopter | q/include/video/Render_Job.h | #pragma once
#include "video/Material.h"
#include "util/Bounds.h"
namespace q
{
namespace video
{
class Render_Job
{
public:
//////////////////////////////////////////////////////////////////////////
//what shader to ask from the ubershader?
void set_shader_type(Shader::Type type);
auto ... |
jeanleflambeur/silkopter | silkopter/gs/src/GS.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_GS.h"
#include "Comms.h"
#include "utils/Clock.h"
class Value_Editor_Factory;
class GS : public QMainWindow
{
public:
GS(QWidget *parent = 0);
~GS();
private:
void process();
// void keyPressEvent(QKeyEve... |
jeanleflambeur/silkopter | silkopter/libs/common/node/IGenerator.h | #pragma once
#include "common/node/INode.h"
namespace silk
{
namespace node
{
class IGenerator : public Node_Base<Type::GENERATOR>
{
public:
};
}
}
|
jeanleflambeur/silkopter | def_lang/include/def_lang/IPoly_Value.h | #pragma once
#include "IValue.h"
#include "IValue_Container.h"
namespace ts
{
class IPoly_Type;
class IPoly_Value : virtual public IValue
{
public:
virtual ~IPoly_Value() = default;
virtual std::shared_ptr<IPoly_Type const> get_specialized_type() const = 0;
virtual std::shared_ptr<const IValue> get_va... |
jeanleflambeur/silkopter | qinput/include/Input_Mgr.h | <reponame>jeanleflambeur/silkopter<filename>qinput/include/Input_Mgr.h
#pragma once
extern "C"
{
struct js_event;
}
namespace qinput
{
class Input_Mgr : q::util::Noncopyable
{
public:
Input_Mgr(q::String const& window_handle);
~Input_Mgr();
auto get_touchscreen() const... |
jeanleflambeur/silkopter | silkopter/gs_old/src/Multi_Config_Window.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include <QMainWindow>
#include <QtWidgets>
#include "ui_Multi_Config_Window.h"
#include "HAL.h"
#include "Comms.h"
class JSON_Model;
class Multi_Config_Window : public QMainWindow
{
public:
explicit Multi_Config_Window(silk::HAL& hal, silk::Comms& c... |
jeanleflambeur/silkopter | silkopter/libs/utils/PID.h | <gh_stars>10-100
#pragma once
#include "utils/Butterworth.h"
namespace util
{
namespace pid
{
template<typename Value, typename Factor>
Factor sub(Value const& a, Value const& b)
{
return Factor(a - b);
}
template<typename Factor>
Factor compute_integrator_mask(Factor const& output, Factor cons... |
jeanleflambeur/silkopter | silkopter/rc/src/IButton_Matrix.h | #pragma once
#include "IInput_Device.h"
namespace silk
{
class IButton;
class IButton_Matrix : public IInput_Device
{
public:
virtual ~IButton_Matrix() = default;
virtual size_t get_row_count() const = 0;
virtual size_t get_column_count() const = 0;
virtual IButton& get_button(size_t row, size_t col... |
jeanleflambeur/silkopter | silkopter/gs/src/value_editors/Qualified_Value.h | <filename>silkopter/gs/src/value_editors/Qualified_Value.h
#pragma once
template<typename T>
class Qualified_Value
{
public:
typedef typename std::remove_cv<T>::type value_type;
Qualified_Value(std::shared_ptr<value_type> mutable_value);
Qualified_Value(std::shared_ptr<const value_type> const_val... |
jeanleflambeur/silkopter | silkopter/gs/src/simulator/Render_Widget.h | <reponame>jeanleflambeur/silkopter
#pragma once
class QGLFunctions;
struct Render_Context
{
q::scene::Camera camera;
q::scene::Scene scene;
q::draw::Painter painter;
q::text::Texter texter;
q::text::Font_ptr font;
struct Materials
{
q::video::Material primitive_2d;
... |
jeanleflambeur/silkopter | silkopter/libs/common/Comm_Data.h | #pragma once
#include <cstdint>
namespace silk
{
namespace rc_comms
{
struct Video_Header
{
uint32_t width : 11;
uint32_t height : 11;
};
enum class Video_Message : uint8_t
{
FRAME_DATA,
COUNT //keep last
};
enum class Telemetry_Message : uint8_t
{
STREAM_DATA,
UAV_DATA,
COUNT //keep l... |
jeanleflambeur/silkopter | silkopter/gs_old/src/hud/IHUD_Widget.h | #pragma once
class IHUD_Widget : public QWidget, q::util::Noncopyable
{
public:
virtual ~IHUD_Widget() {}
virtual void process() = 0;
};
|
jeanleflambeur/silkopter | silkopter/fc/src/source/RC5T619.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "HAL.h"
#include "common/node/ISource.h"
#include "common/stream/IADC.h"
#include "common/bus/II2C.h"
namespace silk
{
namespace hal
{
struct RC5T619_Descriptor;
struct RC5T619_Config;
}
}
namespace silk
{
namespace node
{
class RC5T619 : public ISource
{
... |
jeanleflambeur/silkopter | silkopter/fc/src/Globals.h | <gh_stars>10-100
#pragma once
#include <future>
namespace silk
{
constexpr size_t MAX_MOTOR_COUNT = 12;
}
namespace std
{
template<typename T, typename ...Args>
std::unique_ptr<T> make_unique( Args&& ...args )
{
return std::unique_ptr<T>( new T( std::forward<Args>(args)... ) );
}
}
//ex... |
jeanleflambeur/silkopter | q/include/text/Font.h | <filename>q/include/text/Font.h<gh_stars>10-100
#pragma once
#include "res/Resource.h"
#include "video/Texture.h"
#include "video/Atlaser.h"
namespace q
{
namespace res
{
namespace impl
{
class Free_Type_Font_Loader;
}
}
namespace text
{
//This class represents a fontface.
class Font : public re... |
jeanleflambeur/silkopter | silkopter/gs/src/ITab_Widget.h | <reponame>jeanleflambeur/silkopter<gh_stars>10-100
#pragma once
#include <QWidget>
class ITab_Widget : public QWidget
{
public:
virtual ~ITab_Widget() = default;
virtual void set_active(bool active) = 0;
};
|
jeanleflambeur/silkopter | silkopter/libs/utils/comms/esp32/Phy.h | <gh_stars>10-100
#pragma once
#include <cstdint>
#include <memory>
#include <vector>
#include <deque>
#include <array>
#include <mutex>
#include <linux/spi/spidev.h>
class SPI_Query_Response_Header;
class Phy
{
public:
Phy();
enum class Init_Result
{
OK,
ALREADY_INITIALIZED,
BAD_... |
jeanleflambeur/silkopter | qdata/include/util/Folder_Walker.h | <reponame>jeanleflambeur/silkopter<filename>qdata/include/util/Folder_Walker.h
#pragma once
namespace q
{
namespace util
{
namespace fs
{
class Folder_Walker
{
public:
struct File_Info
{
Path full_path;
Path path; //relative to root
};
Folder_Walker();
Folder_Walker(Path const& ... |
jeanleflambeur/silkopter | silkopter/libs/utils/hw/I2C_BCM.h | <filename>silkopter/libs/utils/hw/I2C_BCM.h
#pragma once
#include "II2C.h"
#include <atomic>
#include <vector>
namespace util
{
namespace hw
{
class I2C_BCM : public II2C
{
public:
I2C_BCM();
~I2C_BCM();
ts::Result<void> init(uint32_t device, uint32_t baud);
bool read(uint8_t address, uint8_t* data... |
jeanleflambeur/silkopter | silkopter/libs/common/node/IProcessor.h | #pragma once
#include "common/node/INode.h"
namespace silk
{
namespace node
{
class IProcessor : public Node_Base<Type::PROCESSOR>
{
public:
};
}
}
|
jeanleflambeur/silkopter | silkopter/gs_old/src/qnodeseditor/qnodeseditor.h | <reponame>jeanleflambeur/silkopter
/* Copyright (c) 2012, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, t... |
jeanleflambeur/silkopter | silkopter/gs/src/QHexSpinBox.h | #pragma once
#include <QSpinBox>
class HexSpinBox : public QSpinBox
{
public:
HexSpinBox(QWidget *parent = 0) : QSpinBox(parent)
{
setPrefix("0x");
setDisplayIntegerBase(16);
setRange(INT_MIN, INT_MAX);
}
unsigned int hexValue() const
{
return u(value());
}
... |
jeanleflambeur/silkopter | silkopter/fc/src/MPL_Helper.h | #pragma once
namespace silk
{
namespace detail
{
template<int...> struct index_tuple{};
template<int I, typename IndexTuple, typename... Types>
struct make_indexes_impl;
template<int I, int... Indexes, typename T, typename ... Types>
struct make_indexes_impl<I, index_tuple<Indexes...>, T, Types...>
{
typedef ty... |
jeanleflambeur/silkopter | silkopter/gs/src/Internal_Telemetry_Widget.h | <filename>silkopter/gs/src/Internal_Telemetry_Widget.h
#pragma once
#include <QWidget>
#include "boost/signals2.hpp"
namespace silk
{
class Comms;
}
class Internal_Telemetry_Widget : public QWidget
{
public:
Internal_Telemetry_Widget(QWidget* parent = nullptr);
~Internal_Telemetry_Widget();
void init(si... |
jeanleflambeur/silkopter | silkopter/fc/src/source/MS5611.h | #pragma once
#include "HAL.h"
#include "common/node/ISource.h"
#include "common/stream/IPressure.h"
#include "common/stream/ITemperature.h"
#include "common/bus/II2C.h"
#include "common/bus/ISPI.h"
#include "Basic_Output_Stream.h"
namespace silk
{
namespace hal
{
struct MS5611_Descriptor;
struct MS5611_Config;
}
}
... |
jeanleflambeur/silkopter | def_lang/include/def_lang/impl/Namespace.h | #pragma once
#include <vector>
#include "def_lang/ep/Declaration_Scope_EP.h"
namespace ts
{
class Namespace final : public Declaration_Scope_EP
{
public:
Namespace(std::string const& name);
using Declaration_Scope_EP::get_name;
using Declaration_Scope_EP::add_symbol;
using Declaration_Scope_EP::get... |
jeanleflambeur/silkopter | q/src/res/Impl/Zup_Sprite_Loader.h | <filename>q/src/res/Impl/Zup_Sprite_Loader.h
#pragma once
#include "res/Loader.h"
#include "draw/Sprite_Base.h"
namespace q
{
namespace res
{
namespace impl
{
class ZupSpriteLoader : public res::Loader<draw::SpriteBase>
{
public:
virtual void load(Path const& path, data::Source& source, draw::Spr... |
jeanleflambeur/silkopter | def_lang/include/def_lang/IString_Value.h | #pragma once
#include "Result.h"
#include "IValue.h"
#include "IString_Type.h"
namespace ts
{
class IString_Value : virtual public IValue
{
public:
virtual ~IString_Value() = default;
typedef IString_Traits traits;
virtual std::shared_ptr<traits::type_interface const> get_specialized_type() const = 0;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.