text
stringlengths
0
2.2M
int spacesPerLevel) const
{
return bdlb::PrintMethods::print(stream, d_value, level, spacesPerLevel);
}
inline
const int& CustomizedInt::toInt() const
{
return d_value;
}
} // close namespace s_baltst
// TRAITS
BDLAT_DECL_CUSTOMIZEDTYPE_TRAITS(test::CustomizedInt)
// FREE OPERATORS
inline
bool test::operator==(const CustomizedInt& lhs, const CustomizedInt& rhs)
{
return lhs.d_value == rhs.d_value;
}
inline
bool test::operator!=(const CustomizedInt& lhs, const CustomizedInt& rhs)
{
return lhs.d_value != rhs.d_value;
}
inline
bsl::ostream& test::operator<<(bsl::ostream& stream, const CustomizedInt& rhs)
{
return rhs.print(stream, 0, -1);
}
} // close enterprise namespace
// ----------------------------------------------------------------------------
// *End-of-file Block removed.*
// ----------------------------------------------------------------------------
// test_customizedint.cpp -*-C++-*-
namespace BloombergLP {
namespace s_baltst {
// ---------
// CONSTANTS
// ---------
const char CustomizedInt::CLASS_NAME[] = "CustomizedInt";
// the name of this class
// -------------
// CLASS METHODS
// -------------
// --------
// CREATORS
// --------
// ------------
// MANIPULATORS
// ------------
// ---------
// ACCESSORS
// ---------
} // close namespace s_baltst
} // close enterprise namespace
// ----------------------------------------------------------------------------
// *End-of-file Block removed.*
// ----------------------------------------------------------------------------
// ============================================================================
// USAGE EXAMPLE
// ----------------------------------------------------------------------------
// The following snippets of code illustrate the usage of this component. It
// parses a Base64 string into an 'bsl::vector<char>':
//..
// #include <balxml_typesparserutil.h>
//
// #include <cassert>
// #include <vector>
//
// using namespace BloombergLP;
//
void usageExample()
{
const char INPUT[] = "YWJjZA==X"; // "abcd" in Base64
const int INPUT_LENGTH = static_cast<int>(sizeof(INPUT)) - 2;
bsl::vector<char> vec;
int retCode = balxml::TypesParserUtil::parseBase64(&vec,