Skip to content

Commit

Permalink
3.6.28
Browse files Browse the repository at this point in the history
  • Loading branch information
cainhuang committed Apr 10, 2017
1 parent 98cfa66 commit 3d228e7
Show file tree
Hide file tree
Showing 163 changed files with 6,049 additions and 769 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cmake_minimum_required (VERSION 2.8)
# set(CMAKE_CONFIGURATION_TYPES "Debug;Release;Profile" CACHE STRING "" FORCE)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)

set (BEHAVIAC_PACKAGE_VERSION 3.6.27)
set (BEHAVIAC_PACKAGE_VERSION 3.6.28)

#option( BUILD_SHARED_LIBS "set to OFF to build static libraries" ON )
SET(BUILD_SHARED_LIBS ON CACHE BOOL "set to OFF to build static libraries")
Expand Down Expand Up @@ -420,15 +420,17 @@ if (NOT BEHAVIAC_ANDROID_STUDIO)
endif()
endif()

#add_subdirectory ("${PROJECT_SOURCE_DIR}/example/airbattledemo")
#add_subdirectory ("${PROJECT_SOURCE_DIR}/example/airbattledemo")

add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_1/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_1_1/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_1_2/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_1/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_1_1/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_1_2/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_2/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_3/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_4/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_5/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_6/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_7/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_8/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_9/cpp")
endif()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/Tencent/behaviac/blob/master/license.txt)
[![Release Version](https://img.shields.io/badge/release-3.6.27-red.svg)](https://github.com/Tencent/behaviac/releases)
[![Release Version](https://img.shields.io/badge/release-3.6.28-red.svg)](https://github.com/Tencent/behaviac/releases)
[![Updates](https://img.shields.io/badge/Platform-%20iOS%20%7C%20OS%20X%20%7C%20Android%20%7C%20Windows%20%7C%20Linux%20-brightgreen.svg)](https://github.com/Tencent/behaviac/blob/master/history.txt)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/behaviac/pulls)

Expand Down
Binary file modified docs/behaviac.chm
Binary file not shown.
6 changes: 6 additions & 0 deletions history.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2017-4-10 3.6.28
Improve generating the codes for the struct.
Add tutorial_8 and tutorial_9.
Fix a bug for editting the member of the struct.
Fix a bug for creating an enum as a property.

2017-4-1 3.6.27
Improve setting the properties of the node.
Supporpt removing all instances when debugging.
Expand Down
3 changes: 3 additions & 0 deletions inc/behaviac/behaviortree/behaviortree.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,4 +392,7 @@ namespace behaviac {
};
} // namespace behaviac

DECLARE_BEHAVIAC_ENUM_EX(behaviac::EBTStatus, EBTStatus);
BEHAVIAC_DECLARE_TYPE_VECTOR_HANDLER(behaviac::EBTStatus);

#endif//_BEHAVIAC_BEHAVIORTREE_NODE_H_
2 changes: 0 additions & 2 deletions inc/behaviac/behaviortree/behaviortree_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,4 @@ namespace behaviac {
};
} // namespace behaviac

DECLARE_BEHAVIAC_ENUM(behaviac::EBTStatus, EBTStatus);

#endif//_BEHAVIAC_BEHAVIORTREE_TASK_H_
2 changes: 1 addition & 1 deletion inc/behaviac/common/_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#define BEHAVIAC_RELEASE 0
#endif

#define BEHAVIAC_VERSION_STRING "3.6.27"
#define BEHAVIAC_VERSION_STRING "3.6.28"

10 changes: 9 additions & 1 deletion inc/behaviac/common/member.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,11 @@ namespace behaviac {
BEHAVIAC_ASSERT(false);
}

virtual bool Equal(const behaviac::CTagObject* lhs, const behaviac::CTagObject* rhs) const {
virtual bool Equal(const behaviac::Agent* lhs, const behaviac::Agent* rhs) const {
BEHAVIAC_UNUSED_VAR(lhs);
BEHAVIAC_UNUSED_VAR(rhs);
BEHAVIAC_ASSERT(false);

return false;
}

Expand Down Expand Up @@ -850,6 +851,13 @@ namespace behaviac {
return result;
}

virtual bool Equal(const behaviac::Agent* lhs, const behaviac::Agent* rhs) const {
T* lhsValue = (T*)this->GetValue(lhs);
T* rhsValue = (T*)this->GetValue(rhs);

return behaviac::PrivateDetails::Equal(*lhsValue, *rhsValue);
}

virtual void SetValueFromString(behaviac::Agent* self, const char* valueStr) const {
T value;

Expand Down
66 changes: 40 additions & 26 deletions inc/behaviac/common/meta/hasfunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,57 @@

namespace behaviac {
namespace Meta {
template<typename Type>
struct HasToString {
private:
template<typename Type>
struct HasToString {
enum {
Result = 0
};
};

template<typename U, behaviac::string(U::*)() const> struct TPROTOTYPE {};
template<typename Type>
struct HasFromString {
enum {
Result = 0
};
};

template< typename U >
static Yes TYesNoTester(TPROTOTYPE<U, &U::ToString>*);
//template<typename Type>
//struct HasToString {
//private:

template<typename U>
static No TYesNoTester(...);
// template<typename U, behaviac::string(U::*)() const> struct TPROTOTYPE {};

public:
// template< typename U >
// static Yes TYesNoTester(TPROTOTYPE<U, &U::ToString>*);

enum {
Result = sizeof(TYesNoTester<Type>(0)) == sizeof(Yes)
};
};
// template<typename U>
// static No TYesNoTester(...);

template<typename Type>
struct HasFromString {
private:
//public:

template<typename U, bool (U::*)(const char*)> struct TPROTOTYPE {};
// enum {
// Result = sizeof(TYesNoTester<Type>(0)) == sizeof(Yes)
// };
//};

template< typename U >
static Yes TYesNoTester(TPROTOTYPE<U, &U::ParseString>*);
//template<typename Type>
//struct HasFromString {
//private:

template<typename U>
static No TYesNoTester(...);
// template<typename U, bool (U::*)(const char*)> struct TPROTOTYPE {};

public:
// template< typename U >
// static Yes TYesNoTester(TPROTOTYPE<U, &U::ParseString>*);

enum {
Result = sizeof(TYesNoTester<Type>(0)) == sizeof(Yes)
};
};
// template<typename U>
// static No TYesNoTester(...);

//public:

// enum {
// Result = sizeof(TYesNoTester<Type>(0)) == sizeof(Yes)
// };
//};
}
}

Expand Down
14 changes: 7 additions & 7 deletions inc/behaviac/common/meta/metatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ namespace behaviac {
};
};

template <typename T>
class IsRefTypeStruct<T, true> {
public:
enum {
Result = T::ms_bIsRefType
};
};
//template <typename T>
//class IsRefTypeStruct<T, true> {
//public:
// enum {
// Result = T::ms_bIsRefType
// };
//};

template <typename T>
struct IsRefType {
Expand Down
Loading

0 comments on commit 3d228e7

Please sign in to comment.