text
stringlengths 0
2.2M
|
---|
template <class MANIPULATOR>
|
int bdlat_typeCategoryManipulateSequence(MyDeclaredDynamicType *object,
|
MANIPULATOR& manipulator)
|
{
|
(void)object;
|
return manipulator(object, bdlat_TypeCategory::Sequence());
|
}
|
template <class ACCESSOR>
|
int bdlat_typeCategoryAccessChoice(const MyDeclaredDynamicType& object,
|
ACCESSOR& accessor)
|
{
|
(void)object;
|
return accessor(object, bdlat_TypeCategory::Choice());
|
}
|
template <class ACCESSOR>
|
int bdlat_typeCategoryAccessSequence(const MyDeclaredDynamicType& object,
|
ACCESSOR& accessor)
|
{
|
(void)object;
|
return accessor(object, bdlat_TypeCategory::Sequence());
|
}
|
struct MyAutoDetectDynamicType {
|
enum { SELECTION = 0 };
|
typedef bdlat_TypeCategory::DynamicType Category;
|
bdlat_TypeCategory::Value d_currentCategory;
|
void makeSequence()
|
{
|
d_currentCategory = bdlat_TypeCategory::e_SEQUENCE_CATEGORY;
|
}
|
void makeNullableValue()
|
{
|
d_currentCategory = bdlat_TypeCategory::e_NULLABLE_VALUE_CATEGORY;
|
}
|
};
|
namespace BloombergLP {
|
namespace bdlat_SequenceFunctions {
|
template <>
|
struct IsSequence<MyAutoDetectDynamicType> {
|
enum { VALUE = 1 };
|
};
|
} // close namespace bdlat_SequenceFunctions
|
namespace bdlat_NullableValueFunctions {
|
template <>
|
struct IsNullableValue<MyAutoDetectDynamicType> {
|
enum { VALUE = 1 };
|
};
|
} // close namespace bdlat_NullableValueFunctions
|
} // close enterprise namespace
|
bdlat_TypeCategory::Value
|
bdlat_typeCategorySelect(const MyAutoDetectDynamicType& object)
|
{
|
(void)object;
|
return object.d_currentCategory;
|
}
|
struct MyManipulator {
|
template <class TYPE>
|
int operator()(TYPE *object, bslmf::Nil)
|
{
|
(void)object;
|
return -1;
|
}
|
template <class TYPE>
|
int operator()(TYPE *object, bdlat_TypeCategory::DynamicType)
|
{
|
(void)object;
|
return 0;
|
}
|
template <class TYPE>
|
int operator()(TYPE *object, bdlat_TypeCategory::Array)
|
{
|
(void)object;
|
return bdlat_TypeCategory::e_ARRAY_CATEGORY;
|
}
|
template <class TYPE>
|
int operator()(TYPE *object, bdlat_TypeCategory::Choice)
|
{
|
(void)object;
|
return bdlat_TypeCategory::e_CHOICE_CATEGORY;
|
}
|
template <class TYPE>
|
int operator()(TYPE *object, bdlat_TypeCategory::CustomizedType)
|
{
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.