8 #include "Reflex/Reflex.h"
13 static const char*
fmt_oid =
"[OID=%08X-%08X]";
16 if( source.empty() )
ora::throwException(
"Provided token is empty.",
"PoolToken::parseToken");
18 std::pair<std::string,int> oid;
21 for(
char*
p1 = (
char*)tmp.c_str();
p1;
p1 = ::strchr(++
p1,
'[')) {
22 char*
p2 = ::strchr(
p1,
'=');
23 char*
p3 = ::strchr(
p1,
']');
26 if ( ::strncmp(
"[DB=",
p1, 4) == 0 ) {
28 }
else if ( ::strncmp(
"[CNT=",
p1, 5) == 0 ) {
31 }
else if ( ::strncmp(
fmt_oid,
p1, 5) == 0 ) {
44 std::string
writeToken(
const std::string& containerName,
50 ::sprintf(text,
fmt_oid, oid0, oid1);
59 std::string clguid(
"");
61 Reflex::Type containerType = Reflex::Type::ByName( className );
63 Reflex::PropertyList props = containerType.Properties();
64 if( props.HasProperty(
"ClassID")){
65 clguid = props.PropertyAsString(
"ClassID");
71 Guid* gd =
reinterpret_cast<Guid*
>(buff);
76 std::string str =
"[DB="+
Guid::null()+
"][CNT=" + containerName +
"][CLID="+clguid+
"]";
std::string toString() const
static std::string null()
std::pair< std::string, int > parseToken(const std::string &objectId)
static const char * fmt_oid
std::string writeTokenContainerFragment(const std::string &containerName, const std::string &className)
static const char * fmt_tech
void * genMD5(void *buffer, unsigned long len, void *code)
std::vector< std::vector< double > > tmp
void throwException(const std::string &message, const std::string &methodName)
char const * className(const std::type_info &t)
std::string writeToken(const std::string &containerName, int oid0, int oid1, const std::string &className)