Defines methods which transform bytes obtained from HTTP requests into Yosokumo C++ objects (such as Catalog and Study) and vice versa.
More...
#include <YosokumoDIF.h>


Public Member Functions | |
| YosokumoDIF () | |
| virtual | ~YosokumoDIF () |
| virtual std::string | getContentType ()=0 |
| Return a content type string for use in Accept and Content-Type HTTP header lines. | |
| bool | isException () |
| Test if an exception has occurred. | |
| bool | getException (ServiceException &e) |
Return a ServiceException from the code-decode process. | |
| void | clearException () |
| Clear the exception. | |
| virtual bool | makeCatalogFromBytes (const std::vector< uint8_t > &catalogAsBytes, Catalog &catalog)=0 |
Make a Yosokumo Catalog object out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromCatalog (const Catalog &catalog, std::vector< uint8_t > &catalogAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Catalog object. | |
| virtual bool | makeStudyFromBytes (const std::vector< uint8_t > &studyAsBytes, Study &study)=0 |
Make a Yosokumo Study object out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromStudy (const Study &study, std::vector< uint8_t > &studyAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Study object. | |
| virtual bool | makeStudyNameFromBytes (const std::vector< uint8_t > &studyNameAsBytes, std::string &name)=0 |
Make a Yosokumo Study name out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromStudyName (const std::string &name, std::vector< uint8_t > &studyNameAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Study name. | |
| virtual bool | makeStudyStatusFromBytes (const std::vector< uint8_t > &studyStatusAsBytes, Study::Status &status)=0 |
Make a Yosokumo Study status out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromStudyStatus (const Study::Status status, std::vector< uint8_t > &studyStatusAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Study status. | |
| virtual bool | makeStudyVisibilityFromBytes (const std::vector< uint8_t > &studyVisibilityAsBytes, Study::Visibility &visibility)=0 |
Make a Yosokumo Study visibility out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromStudyVisibility (const Study::Visibility visibility, std::vector< uint8_t > &studyVisibilityAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Study visibility. | |
| virtual bool | makePanelFromBytes (const std::vector< uint8_t > &panelAsBytes, Panel &panel)=0 |
Make a Yosokumo Panel object out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromPanel (const Panel &panel, std::vector< uint8_t > &panelAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Panel object. | |
| virtual bool | makeRoleFromBytes (const std::vector< uint8_t > &roleAsBytes, Role &role)=0 |
Make a Yosokumo Role object out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromRole (const Role &role, std::vector< uint8_t > &roleAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Role object. | |
| virtual bool | makeRosterFromBytes (const std::vector< uint8_t > &rosterAsBytes, Roster &roster)=0 |
Make a Yosokumo Roster object out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromRoster (const Roster &roster, std::vector< uint8_t > &rosterAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Roster object. | |
| virtual bool | makePredictorFromBytes (const std::vector< uint8_t > &predictorAsBytes, Predictor &predictor)=0 |
Make a Yosokumo Predictor object out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromPredictor (const Predictor &predictor, std::vector< uint8_t > &predictorAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Predictor object. | |
| virtual bool | makeCellFromBytes (const std::vector< uint8_t > &cellAsBytes, Cell &cell)=0 |
Make a Yosokumo Cell object out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromCell (const Cell &cell, std::vector< uint8_t > &cellAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Cell object. | |
| virtual bool | makeSpecimenFromBytes (const std::vector< uint8_t > &specimenAsBytes, Specimen &specimen)=0 |
Make a Yosokumo Specimen object out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromSpecimen (const Specimen &specimen, std::vector< uint8_t > &specimenAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Specimen object. | |
| virtual bool | makeBlockFromBytes (const std::vector< uint8_t > &blockAsBytes, Block &block)=0 |
Make a Yosokumo Block object out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromBlock (const Block &block, std::vector< uint8_t > &blockAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Block object. | |
| virtual bool | makeMessageFromBytes (const std::vector< uint8_t > &messageAsBytes, Message &message)=0 |
Make a Yosokumo Message object out of the bytes of an HTTP Entity. | |
| virtual bool | makeBytesFromMessage (const Message &message, std::vector< uint8_t > &messageAsBytes)=0 |
Make the bytes for an HTTP Entity out of a Yosokumo Message object. | |
Static Public Member Functions | |
| static bool | isException (const ServiceException &e) |
| Test if really an exception. | |
Protected Attributes | |
| ServiceException | exception |
Defines methods which transform bytes obtained from HTTP requests into Yosokumo C++ objects (such as Catalog and Study) and vice versa.
Each class implementing this interface handles a different DIF, e.g., XML and Google Protocol Buffers.
Definition at line 29 of file YosokumoDIF.h.
| YosokumoDIF::YosokumoDIF | ( | ) |
Definition at line 10 of file YosokumoDIF.cpp.
References clearException().
| YosokumoDIF::~YosokumoDIF | ( | ) | [virtual] |
Definition at line 15 of file YosokumoDIF.cpp.
| void YosokumoDIF::clearException | ( | ) |
Clear the exception.
Definition at line 45 of file YosokumoDIF.cpp.
References exception.
Referenced by YosokumoDIF().
| virtual std::string Yosokumo::YosokumoDIF::getContentType | ( | ) | [pure virtual] |
Return a content type string for use in Accept and Content-Type HTTP header lines.
For example, "application/yosokumo+protobuf".
Implemented in Yosokumo::YosokumoProtobuf.
| bool YosokumoDIF::getException | ( | ServiceException & | e | ) |
Return a ServiceException from the code-decode process.
| e | if there is an exception, it is placed here. |
true means there is an exception, and it has been placed in e. false means there is no exception, e is unchanged. Definition at line 34 of file YosokumoDIF.cpp.
References exception, and isException().
| bool YosokumoDIF::isException | ( | const ServiceException & | e | ) | [static] |
Test if really an exception.
| e | the exception to be tested. |
true means e is an exception. false means e is not an exception. Definition at line 23 of file YosokumoDIF.cpp.
References Yosokumo::ServiceException::getFailedMethodName(), Yosokumo::ServiceException::getStatusCode(), and Yosokumo::ServiceException::what().
| bool YosokumoDIF::isException | ( | ) |
Test if an exception has occurred.
true means there is an exception. false means there is no exception. Definition at line 18 of file YosokumoDIF.cpp.
References exception.
Referenced by getException().
| virtual bool Yosokumo::YosokumoDIF::makeBlockFromBytes | ( | const std::vector< uint8_t > & | blockAsBytes, | |
| Block & | block | |||
| ) | [pure virtual] |
Make a Yosokumo Block object out of the bytes of an HTTP Entity.
| blockAsBytes | a block as bytes from an HTTP Entity. | |
| block | the output block created from the bytes. |
true means everything worked out fine. false means there was a problem; the output block may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromBlock | ( | const Block & | block, | |
| std::vector< uint8_t > & | blockAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Block object.
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromCatalog | ( | const Catalog & | catalog, | |
| std::vector< uint8_t > & | catalogAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Catalog object.
| catalog | a Yosokumo Catalog object. | |
| catalogAsBytes | the output bytes created from the catalog. |
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromCell | ( | const Cell & | cell, | |
| std::vector< uint8_t > & | cellAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Cell object.
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromMessage | ( | const Message & | message, | |
| std::vector< uint8_t > & | messageAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Message object.
| message | a Yosokumo Message object. | |
| messageAsBytes | the output bytes created from the message. |
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromPanel | ( | const Panel & | panel, | |
| std::vector< uint8_t > & | panelAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Panel object.
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromPredictor | ( | const Predictor & | predictor, | |
| std::vector< uint8_t > & | predictorAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Predictor object.
| predictor | a Yosokumo Predictor object. | |
| predictorAsBytes | the output bytes created from the predictor. |
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromRole | ( | const Role & | role, | |
| std::vector< uint8_t > & | roleAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Role object.
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromRoster | ( | const Roster & | roster, | |
| std::vector< uint8_t > & | rosterAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Roster object.
| roster | a Yosokumo Roster object. | |
| rosterAsBytes | the output bytes created from the roster. |
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromSpecimen | ( | const Specimen & | specimen, | |
| std::vector< uint8_t > & | specimenAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Specimen object.
| specimen | a Yosokumo Specimen object. | |
| specimenAsBytes | the output bytes created from the specimen. |
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromStudy | ( | const Study & | study, | |
| std::vector< uint8_t > & | studyAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Study object.
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromStudyName | ( | const std::string & | name, | |
| std::vector< uint8_t > & | studyNameAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Study name.
| name | a Yosokumo Study name. | |
| studyNameAsBytes | the output bytes created from the study name. |
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromStudyStatus | ( | const Study::Status | status, | |
| std::vector< uint8_t > & | studyStatusAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Study status.
| status | a Yosokumo Study status. | |
| studyStatusAsBytes | the output bytes created from the study status. |
true means everything worked out fine. false means there was a problem; the output bytes may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeBytesFromStudyVisibility | ( | const Study::Visibility | visibility, | |
| std::vector< uint8_t > & | studyVisibilityAsBytes | |||
| ) | [pure virtual] |
Make the bytes for an HTTP Entity out of a Yosokumo Study visibility.
| visibility | a Yosokumo Study visibility. | |
| studyVisibilityAsBytes | the output bytes created from the study visibility. |
Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeCatalogFromBytes | ( | const std::vector< uint8_t > & | catalogAsBytes, | |
| Catalog & | catalog | |||
| ) | [pure virtual] |
Make a Yosokumo Catalog object out of the bytes of an HTTP Entity.
| catalogAsBytes | a catalog as bytes from an HTTP Entity. | |
| catalog | the output catalog created from the bytes. |
true means everything worked out fine. false means there was a problem; the output catalog may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeCellFromBytes | ( | const std::vector< uint8_t > & | cellAsBytes, | |
| Cell & | cell | |||
| ) | [pure virtual] |
Make a Yosokumo Cell object out of the bytes of an HTTP Entity.
| cellAsBytes | a cell as bytes from an HTTP Entity. | |
| cell | the output cell created from the bytes. |
true means everything worked out fine. false means there was a problem; the output cell may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeMessageFromBytes | ( | const std::vector< uint8_t > & | messageAsBytes, | |
| Message & | message | |||
| ) | [pure virtual] |
Make a Yosokumo Message object out of the bytes of an HTTP Entity.
| messageAsBytes | a message as bytes from an HTTP Entity. | |
| message | the output message created from the bytes. |
Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makePanelFromBytes | ( | const std::vector< uint8_t > & | panelAsBytes, | |
| Panel & | panel | |||
| ) | [pure virtual] |
Make a Yosokumo Panel object out of the bytes of an HTTP Entity.
| panelAsBytes | a panel as bytes from an HTTP Entity. | |
| panel | the output panel created from the bytes. |
true means everything worked out fine. false means there was a problem; the output panel may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makePredictorFromBytes | ( | const std::vector< uint8_t > & | predictorAsBytes, | |
| Predictor & | predictor | |||
| ) | [pure virtual] |
Make a Yosokumo Predictor object out of the bytes of an HTTP Entity.
| predictorAsBytes | a predictor as bytes from an HTTP Entity. | |
| predictor | the output predictor created from the bytes. |
true means everything worked out fine. false means there was a problem; the output predictor may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeRoleFromBytes | ( | const std::vector< uint8_t > & | roleAsBytes, | |
| Role & | role | |||
| ) | [pure virtual] |
Make a Yosokumo Role object out of the bytes of an HTTP Entity.
| roleAsBytes | a role as bytes from an HTTP Entity. | |
| role | the output role created from the bytes. |
true means everything worked out fine. false means there was a problem; the output role may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeRosterFromBytes | ( | const std::vector< uint8_t > & | rosterAsBytes, | |
| Roster & | roster | |||
| ) | [pure virtual] |
Make a Yosokumo Roster object out of the bytes of an HTTP Entity.
| rosterAsBytes | a roster as bytes from an HTTP Entity. | |
| roster | the output roster created from the bytes. |
true means everything worked out fine. false means there was a problem; the output roster may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeSpecimenFromBytes | ( | const std::vector< uint8_t > & | specimenAsBytes, | |
| Specimen & | specimen | |||
| ) | [pure virtual] |
Make a Yosokumo Specimen object out of the bytes of an HTTP Entity.
| specimenAsBytes | a specimen as bytes from an HTTP Entity. | |
| specimen | the output specimen created from the bytes. |
true means everything worked out fine. false means there was a problem; the output specimen may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeStudyFromBytes | ( | const std::vector< uint8_t > & | studyAsBytes, | |
| Study & | study | |||
| ) | [pure virtual] |
Make a Yosokumo Study object out of the bytes of an HTTP Entity.
| studyAsBytes | a study as bytes from an HTTP Entity. | |
| study | the output study created from the bytes. |
true means everything worked out fine. false means there was a problem; the output study may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeStudyNameFromBytes | ( | const std::vector< uint8_t > & | studyNameAsBytes, | |
| std::string & | name | |||
| ) | [pure virtual] |
Make a Yosokumo Study name out of the bytes of an HTTP Entity.
| studyNameAsBytes | a study name as bytes from an HTTP Entity. | |
| name | the output study name created from the bytes. |
true means everything worked out fine. false means there was a problem; the output study name may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeStudyStatusFromBytes | ( | const std::vector< uint8_t > & | studyStatusAsBytes, | |
| Study::Status & | status | |||
| ) | [pure virtual] |
Make a Yosokumo Study status out of the bytes of an HTTP Entity.
| studyStatusAsBytes | a study status as bytes from an HTTP Entity. | |
| status | the output study status created from the bytes. |
true means everything worked out fine. false means there was a problem; the output study status may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
| virtual bool Yosokumo::YosokumoDIF::makeStudyVisibilityFromBytes | ( | const std::vector< uint8_t > & | studyVisibilityAsBytes, | |
| Study::Visibility & | visibility | |||
| ) | [pure virtual] |
Make a Yosokumo Study visibility out of the bytes of an HTTP Entity.
| studyVisibilityAsBytes | a study visibility as bytes from an HTTP Entity. | |
| visibility | the output study visibility created from the bytes. |
true means everything worked out fine. false means there was a problem; the output study visibility may be incomplete. Call getException() for details. Implemented in Yosokumo::YosokumoProtobuf.
ServiceException Yosokumo::YosokumoDIF::exception [protected] |
Definition at line 32 of file YosokumoDIF.h.
Referenced by clearException(), getException(), isException(), Yosokumo::YosokumoProtobuf::levelToProtobufLevel(), Yosokumo::YosokumoProtobuf::makeCatalogFromProtobufCatalog(), Yosokumo::YosokumoProtobuf::makeCellFromProtobufCell(), Yosokumo::YosokumoProtobuf::makeProtobufBlockFromBlock(), Yosokumo::YosokumoProtobuf::makeProtobufBlockFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufCatalogFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufCellFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufCellFromCell(), Yosokumo::YosokumoProtobuf::makeProtobufMessageFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufPanelFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufPredictorFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufRoleFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufRosterFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufSpecimenFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufSpecimenFromSpecimen(), Yosokumo::YosokumoProtobuf::makeProtobufStudyFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufStudyNameControlFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufStudyStatusControlFromBytes(), Yosokumo::YosokumoProtobuf::makeProtobufStudyVisibilityControlFromBytes(), Yosokumo::YosokumoProtobuf::makeRosterFromProtobufRoster(), Yosokumo::YosokumoProtobuf::makeSpecimenFromProtobufSpecimen(), Yosokumo::YosokumoProtobuf::protoLevelToLevel(), Yosokumo::YosokumoProtobuf::protoStatusToStatus(), Yosokumo::YosokumoProtobuf::protoTypeToType(), Yosokumo::YosokumoProtobuf::protoVisibilityToVisibility(), Yosokumo::YosokumoProtobuf::statusToProtobufStatus(), Yosokumo::YosokumoProtobuf::typeToProtobufType(), and Yosokumo::YosokumoProtobuf::visibilityToProtobufVisibility().
1.6.3