Пример #1
0
int main(){
  ptr<int> p; //new_ptr<int>();
  ptr<int> x = createPtr();

  takePtr(x);

  takeLHS(p);
  takeLHS(x);
  takeRHS(createPtr());

  return 0;
}
Пример #2
0
RprMidiTakePtr RprMidiTake::createFromMidiEditor(bool readOnly)
{
    void *midiEditor = SWS_MIDIEditor_GetActive();
    if(midiEditor == NULL)
    {
        throw RprLibException(__LOCALIZE("No active MIDI editor","sws_mbox"), true);
    }

    RprTake take(SWS_MIDIEditor_GetTake(midiEditor));
    const char *sourceFilename = take.getSource()->GetFileName();
    if(!*sourceFilename)
    {
        RprMidiTakePtr takePtr(new RprMidiTake(take, readOnly));
        return takePtr;
    }
    throw RprLibException(__LOCALIZE("Only in-project MIDI can be modified","sws_mbox"), true);
}