S
shaun roe
A specific question, a design question, and a possible idea:
1) Is there a good open source library in C++ which will allow me to
grab the contents of a URL to a string, or Xerces DOM document or...
whatever. (a sort of in-program 'curl' or wget ?)
2) I have a service which retrieves cabling for an experiment from a
(oracle or mysql) database. Except at the moment it doesnt, it retrieves
it from file.
I'd like it to **try to** retrieve from the database, and if it fails,
to rollover to retrieve-from-file behaviour.
I had thought to make an ICablingSvc interface with derived classes
OracleCabling, MySQLCabling, FileCabling (XMLCabling? URLCabling?).
One method would be ICabling.setRollover(ICabling * secondMethod),
allowing me to chain rollover behaviours in case of failure.
I'd like to be able to do the following:
OracleCabling dbCabling(OracleResource);
FileCabling localCabling(LocalFileResource);
dbCabling.setRollover(localCabling);
myCableMap=dbCabling.cableMap();
Question: is this a reasonable method?
Question: Is there some general way to specify the resource I want to
initialise the derived class with? e.g. a local file, or a DB
connection, or even an in-memory object?
3) Is there such a thing as a URL for a database connection, or
something in memory, or an XML DOMDocument which could act as a
completely general resource locator?
e.g. urls like
oracleDB://connectionstring
inMemory://pointerToLocation
xmlDocument://pointerToNode
1) Is there a good open source library in C++ which will allow me to
grab the contents of a URL to a string, or Xerces DOM document or...
whatever. (a sort of in-program 'curl' or wget ?)
2) I have a service which retrieves cabling for an experiment from a
(oracle or mysql) database. Except at the moment it doesnt, it retrieves
it from file.
I'd like it to **try to** retrieve from the database, and if it fails,
to rollover to retrieve-from-file behaviour.
I had thought to make an ICablingSvc interface with derived classes
OracleCabling, MySQLCabling, FileCabling (XMLCabling? URLCabling?).
One method would be ICabling.setRollover(ICabling * secondMethod),
allowing me to chain rollover behaviours in case of failure.
I'd like to be able to do the following:
OracleCabling dbCabling(OracleResource);
FileCabling localCabling(LocalFileResource);
dbCabling.setRollover(localCabling);
myCableMap=dbCabling.cableMap();
Question: is this a reasonable method?
Question: Is there some general way to specify the resource I want to
initialise the derived class with? e.g. a local file, or a DB
connection, or even an in-memory object?
3) Is there such a thing as a URL for a database connection, or
something in memory, or an XML DOMDocument which could act as a
completely general resource locator?
e.g. urls like
oracleDB://connectionstring
inMemory://pointerToLocation
xmlDocument://pointerToNode