Classes | |
| class | Block |
| Interface to a format block. More... | |
| class | Format |
| Main Interface to the drawing format. More... | |
Typedefs | |
| typedef void(*) | InsertBlockCB (const std::string &) |
| typedef void(*) | AppendEntryCB (const std::string &, int) |
| typedef std::vector< std::string >(*) | GetDisabledFieldsCB (const std::string &) |
|
typedef boost::shared_ptr< Block > | BlockPtr |
| Pointer to the block object. | |
| typedef std::vector< BlockPtr > | BlockList |
| List of block objects. | |
Functions | |
| void | registerInsertBlockCB (const std::string &blockId, InsertBlockCB callback) |
| void | registerAppendEntryCB (const std::string &blockId, AppendEntryCB callback) |
| void | registerGetDisabledFieldsCB (const std::string &blockId, GetDisabledFieldsCB callback) |
| typedef void(*) DphFormat::InsertBlockCB(const std::string &) |
Function type of callback when a block is inserted
| typedef void(*) DphFormat::AppendEntryCB(const std::string &, int) |
Function type of callback when an entry is appended
| typedef std::vector<std::string>(*) DphFormat::GetDisabledFieldsCB(const std::string &) |
Function type of callback when user is editing a block. A list of field IDs to be disabled is returned.
| void DPHFMTAPIEXPORT DphFormat::registerInsertBlockCB | ( | const std::string & | blockId, | |
| InsertBlockCB | callback | |||
| ) |
Register a callback to when a block is inserted.
Example usage:
void blockInserted( const std::string& blockId ) { std::cout << "Inserted block " << blockId << std::endl; } // some function or class method void setup() { // ... DphFormat::registerInsertBlockCB("dphTitle", &blockInserted); // ... }
| blockId | the block that will trigger the callback when inserted | |
| callback | the function to call |
| void DPHFMTAPIEXPORT DphFormat::registerAppendEntryCB | ( | const std::string & | blockId, | |
| AppendEntryCB | callback | |||
| ) |
Register a callback to when an entry is appended
Example usage:
void entryAppended( const std::string& blockId, int entryIndex ) { std::cout << "Appended entry " << entryIndex << " in block " << blockId << std::endl; } // some function or class method void setup() { // ... DphFormat::registerAppendEntryCB("dphRevision", &entryAppended); // ... }
| blockId | the block that will trigger the callback when an entry is added | |
| callback | the function to call |
| void DPHFMTAPIEXPORT DphFormat::registerGetDisabledFieldsCB | ( | const std::string & | blockId, | |
| GetDisabledFieldsCB | callback | |||
| ) |
Register a callback to when an user edits the block to return list of fields that the user can't edit.
Example usage:
std::vector<std::string> getDisabledTitleblockFields( const std::string& blockId ) { std::vector<std::string> disabledFields; // user should not be able to edit Drawing Number since it was // pulled and entered from a database disabledFields.push_back("drawingNumber"); return ( disabledFields ); } // some function or class method void setup() { // ... DphFormat::registerGetDisabledFieldsCB("dphTitle", &getDisabledTitleblockFields); // ... }
| blockId | the block that will trigger the callback when the user edits the block | |
| callback | the function to call |
1.4.7