Skip to content

Commit

Permalink
Combined Auto:: and autowiring:: namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
gtremper committed Aug 7, 2014
1 parent 50025ad commit 46b0670
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions autowiring/CoreContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,9 @@ class CoreContext:
}
};

/// <summary>
/// Forward-declarable version of CoreContext::InjectCurrent
/// </summary>
namespace autowiring {
template<typename T>
void InjectCurrent(void){
Expand Down
2 changes: 1 addition & 1 deletion autowiring/Deserialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// <summary>
/// Support class for deserializing byte-streams input as std::string into a variety of formats
/// </summary>
namespace Auto {
namespace autowiring {
struct SerializableSigil{};

struct Serialize:
Expand Down
2 changes: 1 addition & 1 deletion autowiring/EventInputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct Expression<R(W::*)(ToBindArgs...) >: public ExpressionBase
void DeserializeAndForward(std::deque<std::string> & d, index_tuple<I...>){
auto it = d.begin();
AutoFired<W> sender;
sender(m_memfunc)(Auto::deser<ToBindArgs>::deserialize(it[I])...);
sender(m_memfunc)(autowiring::deser<ToBindArgs>::deserialize(it[I])...);
}
};

Expand Down
7 changes: 5 additions & 2 deletions autowiring/EventOutputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,17 @@ class EventOutputStreamBase {

template <class Arg>
//stub out such that if ARGUMENT defines a static method called AutoSerialize which returns an std::string,
typename std::enable_if<std::is_base_of<Auto::Serialize, Arg>::value, void >::type
typename std::enable_if<std::is_base_of<autowiring::Serialize, Arg>::value, void >::type
SerializeMethod(Arg & arg){
m_OutputStream << "\xD8" << arg.AutoSerialize();
}

template <class Arg1>
//SFINAE STUB OUT: replace with check_if overloads <<
typename std::enable_if<!std::is_same<Arg1, std::basic_string<char> const *>::value && !std::is_base_of<Auto::Serialize, Arg1>::value, void >::type
typename std::enable_if<
!std::is_same<Arg1, std::basic_string<char> const *>::value &&
!std::is_base_of<autowiring::Serialize, Arg1>::value,
void>::type
SerializeMethod(Arg1 & arg1){
assert(false);
//static_assert(false, "Fundamental belief about serialized argument types violated");
Expand Down
2 changes: 1 addition & 1 deletion src/autowiring/test/MarshalingTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If the types aren't POD. At the very least, tests need to be written which viola
"I can do everything with stringstreams" implementation currently passing
*/

struct StandardType : public Auto::Serialize{
struct StandardType : public autowiring::Serialize{
std::string m_str1;
std::string m_str2;
std::string m_str3;
Expand Down

0 comments on commit 46b0670

Please sign in to comment.