From Genome Analysis Wiki
Jump to navigationJump to search
23 bytes removed
, 15:30, 17 September 2010
Line 5: |
Line 5: |
| | | |
| === NOTES From Meeting === | | === NOTES From Meeting === |
− | *InputFile should not use <code>long int</code>. Should instead use: <code>long long</code> | + | * General Notes: |
− | *Anytime have an error could call handleError which would have a switch to return the error, throw exception, or abort. Call it with an error code and a string. Maybe an error handler class where you could use everywhere. Each class would have a member of that class type that would contain that information. | + | **InputFile should not use <code>long int</code>. Should instead use: <code>long long</code> |
| + | * Error Handling Notes: |
| + | **Anytime have an error could call handleError which would have a switch to return the error, throw exception, or abort. Call it with an error code and a string. Maybe an error handler class where you could use everywhere. Each class would have a member of that class type that would contain that information. |
| + | *Returning values of Strings Notes: |
| + | ** Problems with returning const char* |
| + | *** If the pointer is stored when returned, it becomes invalid if the class modifies the underlying string. |
| + | ** Problems with passing in std::string& as a parameter to be set. |
| + | *** people typically want to operate on the return of the method. |
| | | |
| ==== Useful Links ==== | | ==== Useful Links ==== |
Line 88: |
Line 95: |
| setSequenceAndQualityFromBuffer(); | | setSequenceAndQualityFromBuffer(); |
| } | | } |
− | return mySequence.c_str();
| |
− | }
| |
− |
| |
− |
| |
− |
| |
− | const char* SamRecord::getSequence(std::string& sequence)
| |
− | {
| |
− | myStatus = SamStatus::SUCCESS;
| |
− | if(mySequence.Length() == 0)
| |
− | {
| |
− | // 0 Length, means that it is in the buffer, but has not yet
| |
− | // been synced to the string, so do the sync.
| |
− | setSequenceAndQualityFromBuffer(); // Can fail.
| |
− | }
| |
− | sequence = mySequence;
| |
| return mySequence.c_str(); | | return mySequence.c_str(); |
| } | | } |