text
stringlengths
0
2.2M
enum { VALUE = 1 };
};
} // close namespace bdlat_ChoiceFunctions
} // close enterprise namespace
struct MyCustomizedType {
enum { SELECTION = bdlat_TypeCategory::e_CUSTOMIZED_TYPE_CATEGORY };
typedef bdlat_TypeCategory::CustomizedType Category;
};
namespace BloombergLP {
namespace bdlat_CustomizedTypeFunctions {
template <>
struct IsCustomizedType<MyCustomizedType> {
enum { VALUE = 1 };
};
} // close namespace bdlat_CustomizedTypeFunctions
} // close enterprise namespace
struct MyEnumerationType {
enum { SELECTION = bdlat_TypeCategory::e_ENUMERATION_CATEGORY };
typedef bdlat_TypeCategory::Enumeration Category;
};
namespace BloombergLP {
namespace bdlat_EnumFunctions {
template <>
struct IsEnumeration<MyEnumerationType> {
enum { VALUE = 1 };
};
} // close namespace bdlat_EnumFunctions
} // close enterprise namespace
struct MyNullableValueType {
enum { SELECTION = bdlat_TypeCategory::e_NULLABLE_VALUE_CATEGORY };
typedef bdlat_TypeCategory::NullableValue Category;
};
namespace BloombergLP {
namespace bdlat_NullableValueFunctions {
template <>
struct IsNullableValue<MyNullableValueType> {
enum { VALUE = 1 };
};
} // close namespace bdlat_NullableValueFunctions
} // close enterprise namespace
struct MySequenceType {
enum { SELECTION = bdlat_TypeCategory::e_SEQUENCE_CATEGORY };
typedef bdlat_TypeCategory::Sequence Category;
};
namespace BloombergLP {
namespace bdlat_SequenceFunctions {
template <>
struct IsSequence<MySequenceType> {
enum { VALUE = 1 };
};
} // close namespace bdlat_SequenceFunctions
} // close enterprise namespace
struct MyDeclaredDynamicType {
enum { SELECTION = 0 };
typedef bdlat_TypeCategory::DynamicType Category;
bdlat_TypeCategory::Value d_currentCategory;
void makeChoice()
{
d_currentCategory = bdlat_TypeCategory::e_CHOICE_CATEGORY;
}
void makeSequence()
{
d_currentCategory = bdlat_TypeCategory::e_SEQUENCE_CATEGORY;
}
};
namespace BloombergLP {
template <>
struct bdlat_TypeCategoryDeclareDynamic<MyDeclaredDynamicType> {
enum { VALUE = 1 };
};
} // close enterprise namespace
bdlat_TypeCategory::Value
bdlat_typeCategorySelect(const MyDeclaredDynamicType& object)
{
(void)object;
return object.d_currentCategory;
}
template <class MANIPULATOR>
int bdlat_typeCategoryManipulateChoice(MyDeclaredDynamicType *object,
MANIPULATOR& manipulator)
{
(void)object;
return manipulator(object, bdlat_TypeCategory::Choice());
}