Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
codemercenary committed Jan 28, 2015
2 parents da6fbd1 + dae89ed commit b0035e0
Show file tree
Hide file tree
Showing 723 changed files with 9,173 additions and 59,118 deletions.
21 changes: 13 additions & 8 deletions CMakeLists.txt
Expand Up @@ -50,9 +50,21 @@ if(APPLE)
message("Parent project has set autowiring_USE_LIBCXX = OFF -> Build Autowiring using c++98")
endif()
endif()

# Install autoboost when using libstdc++
if(autowiring_USE_LIBCXX)
set(autowiring_INSTALL_AUTOBOOST OFF)
else()
set(autowiring_INSTALL_AUTOBOOST ON)
endif()
else()
# Always use libc++ on other platforms
set(autowiring_USE_LIBCXX ON)

# Don't install autoboost unless otherwise specified
if(NOT DEFINED autowiring_INSTALL_AUTOBOOST)
set(autowiring_INSTALL_AUTOBOOST OFF)
endif()
endif()

if(CMAKE_COMPILER_IS_GNUCC)
Expand Down Expand Up @@ -101,13 +113,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
include(AddPCH)
include(ConditionalSources)

if(autowiring_BUILD_ARM)
# Currently cannot build Autonet for ARM, so default this off on that platform
set(AUTOWIRING_BUILD_AUTONET_DEFAULT OFF)
else()
set(AUTOWIRING_BUILD_AUTONET_DEFAULT ON)
endif()

# We don't build tests unless we're being built by ourselves in our own source tree
# When we're embedded in someone else's subtree, it's not likely that they will want
# us to bring all of our unit tests in with us. Though, if they do desire this, they
Expand Down Expand Up @@ -220,7 +225,7 @@ if(NOT AUTOWIRING_IS_EMBEDDED)
)

# Install autoboost headers
if(NOT autowiring_USE_LIBCXX)
if(autowiring_INSTALL_AUTOBOOST)
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/contrib/autoboost/autoboost
DESTINATION include
Expand Down
2,726 changes: 1,127 additions & 1,599 deletions Doxyfile

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions autowiring/AnySharedPointer.h
@@ -1,15 +1,21 @@
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved.
#pragma once
#include "SharedPointerSlot.h"

/// \file SharedPointerSlot.h
/// \internal

/// AnySharedPointer
struct AnySharedPointer {
public:
AnySharedPointer(void);
AnySharedPointer(AnySharedPointer&& rhs);
explicit AnySharedPointer(const AnySharedPointer& rhs);
AnySharedPointer(const AnySharedPointer& rhs);
AnySharedPointer(const SharedPointerSlot&& rhs);
AnySharedPointer(const SharedPointerSlot& rhs);

template<class T>
explicit AnySharedPointer(const std::shared_ptr<T>& rhs) {
AnySharedPointer(const std::shared_ptr<T>& rhs) {
// Delegate the remainder to the assign operation:
new (m_space) SharedPointerSlotT<T>(rhs);
}
Expand Down
81 changes: 0 additions & 81 deletions autowiring/AutoCheckout.h

This file was deleted.

3 changes: 2 additions & 1 deletion autowiring/AutoConfig.h
@@ -1,4 +1,4 @@
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved.
#pragma once
#include "Autowired.h"
#include "AutoConfigManager.h"
Expand All @@ -9,6 +9,7 @@

struct AnySharedPointer;

/// \internal
/// <summary>
/// Utility base type for configuration members
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion autowiring/AutoConfigManager.h
@@ -1,4 +1,4 @@
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved.
#pragma once
#include "autowiring_error.h"
#include "ConfigRegistry.h"
Expand Down
59 changes: 13 additions & 46 deletions autowiring/AutoFilterDescriptor.h
@@ -1,8 +1,8 @@
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved.
#pragma once
#include "AnySharedPointer.h"
#include "AutoPacket.h"
#include "auto_arg.h"
#include "AutoFilterDescriptorInput.h"
#include "CallExtractor.h"
#include "Decompose.h"
#include "has_autofilter.h"
Expand All @@ -13,43 +13,7 @@ class AutoPacket;
class Deferred;

/// <summary>
/// AutoFilter argument disposition
/// </summary>
struct AutoFilterDescriptorInput {
AutoFilterDescriptorInput(void) :
is_input(false),
is_output(false),
is_shared(false),
ti(nullptr)
{}

template<class T>
AutoFilterDescriptorInput(auto_arg<T>*) :
is_input(auto_arg<T>::is_input),
is_output(auto_arg<T>::is_output),
is_shared(auto_arg<T>::is_shared),
ti(&typeid(typename auto_arg<T>::id_type))
{}

const bool is_input;
const bool is_output;
const bool is_shared;
const std::type_info* const ti;

operator bool(void) const {
return !!ti;
}

template<class T>
struct rebind {
operator AutoFilterDescriptorInput() {
return AutoFilterDescriptorInput((auto_arg<T>*)nullptr);
}
};
};

/// <summary>
/// The unbound part of an AutoFilter, includes everything except the AnySharedPointer
/// The unbound part of an AutoFilter, includes everything except the AnySharedPointer representing the filter proper
/// </summary>
struct AutoFilterDescriptorStub {
AutoFilterDescriptorStub(void) :
Expand All @@ -73,6 +37,10 @@ struct AutoFilterDescriptorStub {
/// <summary>
/// Constructs a new packet subscriber entry based on the specified call extractor and call pointer
/// </summary>
/// <param name="pType">The type of the underlying filter</param>
/// <param name="pArgs">The inputs accepted by the filter</param>
/// <param name="deferred">True if the filter is deferred</param>
/// <param name="pCall">A pointer to the AutoFilter call routine itself</param>
/// <remarks>
/// The caller is responsible for decomposing the desired routine into the target AutoFilter call. The extractor
/// is required to carry information about the type of the proper member function to be called; t_extractedCall is
Expand All @@ -88,7 +56,8 @@ struct AutoFilterDescriptorStub {
{
for(auto pArg = m_pArgs; *pArg; pArg++) {
m_arity++;


// time shifted arguments arn't required
if (pArg->is_input)
++m_requiredCount;
}
Expand Down Expand Up @@ -295,11 +264,6 @@ struct AutoFilterDescriptor:
m_autoFilter->reset();
}

/// <returns>
/// True if this subscriber instance is not empty.
/// </returns>
operator bool(void) const { return !empty(); }

/// <returns>True when both the AutoFilter method and subscriber instance are equal.</returns>
bool operator==(const AutoFilterDescriptor& rhs) const {
// AutoFilter methods are the same for all instances of a class,
Expand Down Expand Up @@ -351,8 +315,11 @@ class AutoFilterDescriptorSelect<T, false>:
};

/// <summary>
/// Utility routine to support the creation of an AutoFilterDescriptor from any member function
/// Utility routine to support the creation of an AutoFilterDescriptor from T::AutoFilter
/// </summary>
/// <remarks>
/// This method will return an empty descriptor in the case that T::AutoFilter is not defined
/// </remarks>
template<class T>
AutoFilterDescriptor MakeAutoFilterDescriptor(const std::shared_ptr<T>& ptr) {
return std::move(AutoFilterDescriptorSelect<T>(ptr).desc);
Expand Down
46 changes: 46 additions & 0 deletions autowiring/AutoFilterDescriptorInput.h
@@ -0,0 +1,46 @@
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved.
#pragma once
#include "auto_arg.h"
#include <typeinfo>

/// <summary>
/// AutoFilter argument disposition
/// </summary>
struct AutoFilterDescriptorInput {
AutoFilterDescriptorInput(void) :
is_input(false),
is_output(false),
is_shared(false),
is_multi(false),
ti(nullptr),
tshift(0)
{}

template<class T>
AutoFilterDescriptorInput(auto_arg<T>*) :
is_input(auto_arg<T>::is_input),
is_output(auto_arg<T>::is_output),
is_shared(auto_arg<T>::is_shared),
is_multi(auto_arg<T>::is_multi),
ti(&typeid(typename auto_arg<T>::id_type)),
tshift(auto_arg<T>::tshift)
{}

const bool is_input;
const bool is_output;
const bool is_shared;
const bool is_multi;
const std::type_info* const ti;
const int tshift;

operator bool(void) const {
return !!ti;
}

template<class T>
struct rebind {
operator AutoFilterDescriptorInput() {
return AutoFilterDescriptorInput((auto_arg<T>*)nullptr);
}
};
};
2 changes: 1 addition & 1 deletion autowiring/AutoFuture.h
@@ -1,4 +1,4 @@
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved.
#pragma once
#include "CoreThread.h"
#include "fast_pointer_cast.h"
Expand Down
3 changes: 2 additions & 1 deletion autowiring/AutoInjectable.h
@@ -1,7 +1,8 @@
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved.
#pragma once
#include "AutoFuture.h"
#include "CoreContext.h"
#include "index_tuple.h"

class AutoInjectableExpressionBase {
public:
Expand Down

0 comments on commit b0035e0

Please sign in to comment.