++ed by:
XLAT

1 PAUSE user

Ilya Chelpanov

NAME

PowerBuilder::ORCA - Perl API äëÿ ðàáîòû ñ .pbl è îáúåêòàìè PowerBuider

SYNOPSIS

    use PowerBuilder::ORCA qw/:const/;

    #îòêðûâàåì ORCA-ñåññèþ
    my $ses=new PowerBuilder::ORCA(['d:\WORK\C\xs\PowerBuilder\ORCA\pbtest.pbl'],
        'd:\WORK\C\xs\PowerBuilder\ORCA\pbtest.pbl',
        'pbtest');

    #òåïåðü ìîæíî âûïîëíÿòü ìàíèïóëÿöèè ñ îáúåêòàìè
    my $rc=$ses->Export("pbtest.pbl","f_is_dir",PBORCA_FUNCTION,$buf);

    my %h;
    $ses->EntryInfo("pbtest.pbl","f_db_connect",PBORCA_FUNCTION,\%h);

    #çàêðûâàåì ñåññèþ
    $ses->Close();

DESCRIPTION

Ýòîò ìîäóëü äàåò âîçìîæíîñòü èñïîëüçîâàòü Powersoft Open Library API (ORCA) èç Perl. ORCA ïðåäñòàâëÿåò ñîáîé API äëÿ äîñòóïà ê ôóíêöèÿì PowerBuilder Library Manager. Èñïîëüçóÿ ORCA ìîæíî ïðîãðàììíî âûïîëíÿòü òå æå îïåðàöèè ïî óïðàâëåíèþ îáúåêòàìè è áèáëèîòåêàìè, ÷òî è â Powerbuilder Libarary painter. ORCA API áûëî ðàçðàáîòàíî äëÿ ïðîèçâîäèòåëåé CASE ñðåäñòâ, êîòîðûì íåîáõîäèì ïðîãðàììíûé äîñòóï ê ôàéëàì .pbl äëÿ ñîçäàíèÿ è ìîäèôèêàöèè îáúåêòîâ PowerBuilder. ERwin è S-Designor ðàáîòàþò ÷åðåç ORCA.

Äëÿ çàïóñêà ïðîãðàìì èñïîëüçóþùèõ ORCA API íåîáõîäèìà pborcNN.dll, êîòîðàÿ âõîäèò â ñîñòàâ professional è enterprise âåðñèé PB, ãäå NN - íîìåð âåðñèè PB. Äëÿ PB 6 - pborc60.dll.

Ïîäðîáíîå îïèñàíèå èäåîëîãèè è ôóíêöèé ORCA ìîæíî íàéòè â äîêóìåíòàöèè ïî PB (http://manuals.sybase.com/onlinebooks/group-pb/adt/orca/).

Ñîîòâåòñòâèå èìåí ôóíêöèé ORCA API è ôóíêöèé ïðåäîñòàâëÿåìûõ ORCA.pm:

    ORCA API                        ORCA.pm
    ------------------------------  ------------------
    PBORCA_SessionClose             Close
    PBORCA_SessionGetError          GetError
    PBORCA_SessionOpen              new
    PBORCA_SessionSetCurrentAppl    SetAppl
    PBORCA_SessionSetLibraryList    SetLibList
    PBORCA_LibraryCommentModify     LibCommentModify
    PBORCA_LibraryCreate            LibCreate
    PBORCA_LibraryDelete            LibDel
    PBORCA_LibraryDirectory         LibInfo,LibDir,LibDirList
    PBORCA_LibraryEntryCopy         Copy
    PBORCA_LibraryEntryDelete       Del
    PBORCA_LibraryEntryExport       Export
    PBORCA_LibraryEntryInformation  EntryInfo
    PBORCA_LibraryEntryMove         Move
    PBORCA_CheckOutEntry            CheckOut
    PBORCA_CheckInEntry             CheckIn
    PBORCA_ListCheckOutEntries      ListCheckOutEntries
    PBORCA_CompileEntryImport       Import
    PBORCA_CompileEntryImportList   ImportList
    PBORCA_CompileEntryRegenerate   Regenerate
    PBORCA_ExecutableCreate         ExeCreate
    PBORCA_DynamicLibraryCreate     DllCreate
    PBORCA_ObjectQueryHierarchy     ObjectQueryHierarchy
    PBORCA_ObjectQueryReference     ObjectQueryReference

FUNCTIONS

Áîëüøèíñòâî ôóíêöèé âîçâðàùàþò íåíóëåâîé êîä îøèáêè â ñëó÷àå íåóäà÷íîãî çàâåðøåíèÿ. Ñîîáùåíèå îá îøèáêå ìîæíî ïîëó÷èòü ô-åé GetError.

    Êîä  Îïèñàíèå
    ---  -----------------------------------
      0  Operation successful
     -1  Invalid parameter list
     -2  Duplicate operation
     -3  Object not found
     -4  Bad library name
     -5  Library list not set
     -6  Library not in library list
     -7  Library I/O error
     -8  Object exists
     -9  Invalid name
    -10  Buffer size is too small
    -11  Compile error
    -12  Link error
    -13  Current application not set
    -14  Object has no ancestors
    -15  Object has no references
    -16  Invalid # of PBDs
    -17  PBD create error
    -18  Source Management error

Äëÿ ôóíêöèé, â êîòîðûå ïàðìåòðîì ïåðåäàåòñÿ òèï îáúåêòà, çíà÷åíèåì ýòîãî ïàðàìåòðà äîëæåíà áûòü îäíà èç êîíñòàíò, îïèñàííûõ â ðàçäåëå "Exported constants".

Íà÷àëüíàÿ èíèöèàëèçàöèÿ

Ïåðåä íà÷àëîì ðàáîòû íåîáõîäèìî óêàçàòü èìÿ ORCA dll. Dll ORCA ðàçíûõ âåðñèé PB èìåþò ðàçíûå èìåíà.

PowerBuilder::ORCA::LoadDll($dll_file);
PowerBuilder::ORCA::LoadDll();

Çàãðóæàåò äëÿ ðàáîòû óêàçàííóþ dll. Åñëè ôàéë íå ñóùåñòâóåò è èìÿ ôàéëà óêàçàíî áåç ïóòè - èùåò åãî ïî PATH. Åñëè èìÿ ôàéëà íå çàäàíî - ïðîâåðÿåò ïåðåìåííóþ ñðåäû ORCA_DLL, åñëè îíà çàäàíà - çàãðóæàåò óêàçàíóþ â íåé dll. Åñëè ïåðåìåííàÿ ñðåäû íå çàäàíà - èùåò ïî PATH dll âåðñèè 9,8,7,6 èëè 5 è çàãðóæàåò ïåðâóþ íàéäåííóþ. Åñëè íè÷åãî íå ïîìîãëî - óìèðàåò.

Èìÿ çàãðóæåííîé dll ñîõðàíÿåòñÿ â ïåðåìåííîé $PowerBuilder::ORCA::ORCA_Dll.

Óïðàâëåíèå ñåññèåé

$ses=new PowerBuilder::ORCA;
$ses=new PowerBuilder::ORCA(\@lib_list);
$ses=new PowerBuilder::ORCA(\@lib_list, $app_pbl, $app_name);

Ñîçäàåò íîâûé îáúåêò, îòêðûâàåò ORCA ñåññèþ, âîçâðàùàåò óêàçàòåëü íà îáúåêò. Âòîðîé âàðèàíò âûçîâà óñòàíàâëèâàåò òàêæå library list, ïîñëåäíèé âàðèàíò óñòàíàâëèâàåò library list è òåêóùåå ïðèëîæåíèå. ×àñòü ôóíêöèé ORCA òðåáóþò óñòàíîâëåííîãî library list è òåêóùåãî ïðèëîæåíèÿ (ñì. SetLibList è SetAppl).

$rc=$ses->SetLibList($pbl1,$pbl2,...)

Óñòàíàâëèâàåò library list äëÿ ñåññèè. Library list èñïîëüçóåòñÿ äëÿ ïîèñêà ïðè ðàçðåøåíèè ññûëîê ì-äó îáúåêòàìè. Ïðè ïîèñêå áèáëèîòåêè ïðîñìàòðèâàþòñÿ â çàäàííîì ïîðÿäêå. Ïî âîçìîæíîñòè, ñëåäóåò óêàçûâàòü ïîëíûé ïóòü ê ôàéëàì. Ô-ÿ ìîæåò áûòü âûçâàíà äëÿ ñåññèè òîëüêî îäèí ðàç, åäèíñòâåííûé ñïîñîá èçìåíèòü ñïèñîê, ïîñëå òîãî êàê îí áûë óñòàíîâëåí, - çàêðûòü òåêóùóþ ñåññèþ è ñîçäàòü íîâóþ.

Ñëåäóþùèå ôóíêöèè ìîãóò èñïîëüçîâàòüñÿ áåç óñòàíîâêè library list:

    CommentModify
    LibCreate
    LibDel
    LibInfo,LibDir,LibDirList
    Copy
    Del
    Export
    EntryInfo
    Move
    CheckOut
    CheckIn

Ôóíêöèè âûïîëíÿþùèå êîìïèëÿöèþ è âîçâðàùàþùèå èíôîðìàöèþ î ñâÿçÿõ ì-äó îáúåêòàìè òðåáóþò çàäàíèÿ library list.

$rc=$ses->SetAppl($pbl,$obj)

Óñòàíàâëèâàåò òåêóùåå ïðèëîæåíèå. Ïåðåä âûçîâîì ýòîé ô-èè íåîáõîäèìî óñòàíîâèòü library list ô-åé SetLibList(). Ôóíêöèè âûïîëíÿþùèå êîìïèëÿöèþ è âîçâðàùàþùèå èíôîðìàöèþ î ñâÿçÿõ ì-äó îáúåêòàìè òðåáóþò âûçîâà ýòîé ô-èè. Ô-ÿ ìîæåò áûòü âûçâàíà äëÿ ñåññèè òîëüêî îäèí ðàç. Äëÿ ïåðåêëþ÷åíèÿ íà äðóãîå ïðèëîæåíèå íåîáõîäèìî çàêðûòü òåêóùóþ ñåññèþ è ñîçäàòü íîâóþ. Áèáëèîòåêè, ïî âîçìîæíîñòè, ñëåäóåò óêàçûâàòü ñ ïîëíûì ïóòåì. Áèáëèîòåêà $pbl äîëæíà âõîäèòü â Libarary list è åå èìÿ äîëæíî áûòü óêàçàíî â òî÷íîñòè òàêæå, êàê ïðè óñòàíîâêå Library list.

$ses->Close()

Çàêðûâàåò ñåññèþ, îñâîáîæäàåò ðåñóðñû.

$errmsg=$ses->GetError()

Âîçâðàùàåò îïèñàíèå ïîñëåäíåé îøèáêè ORCA ñåññèè. Ìîæåò áûòü âûçâàíà â ëþáîé ìîìåíò ïîñëå òîãî êàê êàêàÿ-ëèáî èç ô-èé ORCA çàâåðøèëàñü ñ ïðèçíàêîì îøèáêè. Âñå ôóíêöèè âîçâðàùàþò íåíóëåâîé êîä âîçâðàòà â ñëó÷àå îøèáêè. GetError âîçâðàùàåò ïîëíûé òåêñò ñîîáùåíèÿ îá îøèáêå. Åñëè îøèáîê íå áûëî, âîçâðàùàåòñÿ ïóñòàÿ ñòðîêà.

Ìàíèïóëÿöèè îáúåêòàìè

$rc=$ses->EntryInfo($pbl,$obj,$type,\%hbuf)

Âîçâðàùàåò èíôîðìàöèþ îá îáúåêòå $obj òèïà $type èç áèáëèîòåêè $pbl. Èíôîðìàöèÿ âêëþ÷àåò â ñåáÿ êîììåíòàðèé, ðàçìåð èñõîäíîãî òåêñòà, ðàçìåð îáúåêòà è âðåìÿ ïîñëåäíåãî èçìåíåíèÿ. Èíôîðìàöèÿ âîçâðàùàåòñÿ â õýøå %hbuf. Êëþ÷è õýøà ñîîòâåòñòâóþò ïàðàìåòðàì ñòðóêòóðû PBORCA_ENTRYINFO:

    Comments    Êîììåíòàðèé
    CreateTime  Âðåìÿ ñîçäàíèÿ
    ObjectSize  Ðàçìåð
    SourceSize  Ðàçìåð èñõîäíîãî òåêñòà

Íàáëþäåíèÿ: SourceSize ORCA âîçâðàùàåò íåêîððåêòíî.

$rc=$ses->Export($pbl,$obj,$type,$buf)

Ïîìåùàåò èñõîäíûé òåêñò îáúåêòà $obj òèïà $type èç áèáëèîòåêè pbl â áóôåð $buf.

Ïðè ýêñïîðòå èñõîäíîãî òåêñòà ñðåäñòâàìè PowerBuilder IDE â ôàéë ïîìèìî ñîáñòâåííî èñõîäíîãî òåêñòà äîïèñûâàþòñÿ äâå ñòðîêè çàãîëîâêà. Ôóíêöèÿ Export ýòîãî íå äåëàåò, $buf ñîäåðæèò òîëüêî èñõîäíûé òåêñò îáúåêòà.

$rc=$ses->Import($pbl,$obj,$type,$comment,$syntax,\$errbuf)

Èìïîðòèðóåò èñõîäíûé òåêñò $syntax îáúåêòà $obj òèïà $type â áèáëèîòåêó $pbl, êîìïèëèðóåò îáúåêò. $comment - êîììåíòàðèé ê îáúåêòó (òîò, ÷òî ïîêàçûâàåò library painter). Åñëè áûëè îøèáêè êîìïèëÿöèè $rc==-11, â $errbuf - ñîîáùåíèÿ îá îøèáêàõ. Áèáëèîòåêà $pbl äîëæíà âõîäèòü â Libarary list è åå èìÿ äîëæíî áûòü óêàçàíî â òî÷íîñòè òàêæå, êàê ïðè óñòàíîâêå Library list.

$rc=$ses->ImportList(\$errbuf, { Library=>'lib1.pbl', Name=>'f_func1', Type=>PBORCA_FUNCTION, Comment=>'comment 1', Syntax=>'source_code_of_f_func1' }, { Library=>'lib2.pbl', Name=>'another_object_name', Type=>PBORCA_type_of_object, Comment=>'comment 2', Syntax=>'source_code_for_object' } ... );

Àíàëîã Import, íî çà îäèí âûçîâ îáðàáàòûâàåòñÿ íåñêîëüêî îáúåêòîâ. Ïðåäíàçíà÷åíà äëÿ èìïîðòà íåñêîëüêèõ âçàèìîñâÿçàííûõ îáúåêòîâ, íàïðèìåð îêíà, åãî ìåíþ è user_object-à, êîòîðûé îíè èñïîëüçóþò. Âàæíî ñîáëþäàòü ïðàâèëà ïîñëåäîâàòåëüíîñòè ðàçìåùåíèå èíôîðìàöèè îá îáúåêòàõ â ìàññèâàõ. Ïðåäêè äîëæíû ðàçìåùàòüñÿ ïåðåä ïîòîìêàìè, user_object-û, íà êîòîðûå ññûëàþòñÿ äðóãèå îáúåêòû, äîëæíû ðàçìåùàòüñÿ ïåðåä ýòèìè îáúåêòàìè. $errbuf - áóôåð äëÿ âîçâðàòà èíôîðìàöèè îá îøèáêàõ, ìîæåò áûòü ñêàëÿðîì èëè ìàññèâîì (ñì. îïèñàíèå Regenerate). Áèáëèîòåêà $pbl äîëæíà âõîäèòü â Libarary list è åå èìÿ äîëæíî áûòü óêàçàíî â òî÷íîñòè òàêæå, êàê ïðè óñòàíîâêå Library list.

$rc=$ses->Regenerate($pbl,$obj,$type,\$errbuf)

Êîìïèëèðóåò îáúåêò $obj òèïà $type â áèáëèîòåêå $pbl. Åñëè áûëè îøèáêè êîìïèëÿöèè $rc==-11, â $errbuf - ñîîáùåíèÿ îá îøèáêàõ. $errbuf ìîæåò áûòü ññûëêîé íà ñêàëÿð èëè ññûëêîé íà ìàññèâ.  ïåðâîì ñëó÷àå ñêàëÿð ñîäåðæèò âñå ñîîáùåíèÿ îá îøèáêàõ, îáúåäèíåííûå â ñòðîêó. Âî âòîðîì ñëó÷àå âîçâðàùàåòñÿ ìàññèâ ñîîáùåíèé, ïîëó÷åííûõ îò PB â õýøàõ, ïîâòîðÿþùèõ ñòðóêòóðó pborca_comperr:

    Level
    MessageNumber
    MessageText
    ColumnNumber
    LineNumber
$rc=$ses->Copy($src_pbl,$dst_pbl,$obj,$type)

Êîïèðóåò îáúåêò $obj òèïà $type èç áèáëèîòåêå $src_pbl â áèáëèîòåêó $dst_pbl.

$rc=$ses->Move($src_pbl,$dst_pbl,$obj,$type)

Ïåðåíîñèò îáúåêò $obj òèïà $type èç áèáëèîòåêå $src_pbl â áèáëèîòåêó $dst_pbl.

$rc=$ses->Del($pbl,$obj,$type)

Óäàëÿåò îáúåêò $obj òèïà $type èç áèáëèîòåêè $pbl.

Ìàíèïóëÿöèè áèáëèîòåêàìè

$rc=LibInfo($pbl,$comment,$n_obj)

Âîçâðàùàåò èíôîðìàöèþ î áèáëèîòåêå $pbl. $comment - êîììåíòàðèé, $n_obj - ÷èñëî îáúåêòîâ â áèáëèîòåêå.

$rc=$ses->LibDir($pbl,\@objects);

Ìàññèâ @objects çàïîëíÿåòñÿ èíôîðìàöèåé îá îáúåêòàõ â áèáëèîòåêå $pbl. Êàæäûé ýëåìåíò @objects - ññûëêà íà õýø ñî ñëåäóþùèìè êëþ÷àìè:

    Name    èìÿ îáúåêòà
    Type    òèï îáúåêòà
    Size    ðàçìåð îáúåêòà
    CreateTime  âðåìÿ ñîçäàíèÿ îáúåêòà
    Comment êîììåíòàðèé
=$ses->LibDirList($pbl[,$type])

Âîçâðàùàåò ññûëêó íà ìàññèâ ñ èìåíàìè îáúåêòîâ çàäàííîãî òèïà â áèáëèîòåêå $pbl. Åñëè òèï íå çàäàí - âîçâðàùàþòñÿ èìåíà âñåõ îáúåêòîâ. Ìîæíî íåïîñðåäñòâåííî èñïîëüçîâàòü â öèêëàõ: for my $obj_name ( LibDirList('lib1.pbl') ) { ... }

$rc=$ses->LibCreate($pbl,$comment)

Ñîçäàåò áèáëèîòåêó ñ èìåíåì $pbl. Íå òðåáóåò óñòàíîâêè library list.

$rc=$ses->LibDel($pbl)

Óäàëÿåò áèáëèîòåêó ñ èìåíåì $pbl. Íå òðåáóåò óñòàíîâêè library list.

$rc=$ses->LibCommentModify($pbl,$new_comment);

Óñòàíàâëèâàåò êîììåíòàðèé äëÿ áèáëèîòåêè $pbl. Íå òðåáóåò óñòàíîâêè library list.

VCS èíòåðôåéñ

$rc=$ses->CheckOut($obj,$type,$master_pbl,$work_pbl,$user_id,$copy)

Âûïîëíÿåò check out äëÿ îáúåêòà $obj òèïà $type èç îñíîâíîé áèáëèîòåêè $master_pbl â ðàáî÷óþ áèáëèîòåêó $work_pbl. Çíà÷åíèå $copy: 0 - óñòàíîâèòü ñòàòóñ "check out" äëÿ îáúåêòà â master è work áèáëèîòåêàõ, îñòàâèâ îáúåêò â work áèáëèîòåêå áåç èçìåíåíèé; 1 - óñòàíîâèòü ñòàòóñ è ñêîïèðîâàòü îáúåêò èç master â work áèáëèîòåêó. $user_id - id ïîëüçîâàòåëÿ.

$rc=$ses->CheckIn($obj,$type,$master_pbl,$work_pbl,$user_id,$move)

Âûïîëíÿåò check in äëÿ îáúåêòà $obj òèïà $type èç ðàáî÷åé áèáëèîòåêè $work_pbl â îñíîâíóþ áèáëèîòåêó $master_pbl. $move: 0 - ñáðîñèòü check out ñòàòóñ îáúåêòîâ, íå îáíîâëÿòü îáúåêò â master áèáëèîòåêå è íå óäàëÿòü êîïèþ îáúåêòà èç work áèáëèîòåêè; 1 - ñáðîñèòü ñòàòóñ è ïåðåìåñòèòü êîïèþ îáúåêòà èç work áèáëèîòåêè â master. $user_id - id ïîëüçîâàòåëÿ, ñäåëàâøåãî check out.

$rc=$ses->ListCheckOutEntries($pbl,\@storage);

Ïîìåùàåò check out èíôîðìàöèþ îá îáúåêòàõ â ìàññèâ @storage. Êàæäûé ýëåìåíò ìàññèâà - õýø ñî ñëåäóþùèìè êëþ÷àìè:

    LibName èìÿ áèáëèîòåêè
    Name    èìÿ îáúåêòà
    UserID  èìÿ ïîëüçîâàòåëÿ
    Mode    ñòàòóñ (s - source, r - registered, d - distanation)

Õýø ñîîòâåòñòâóåò ñòðóêòóðå PBORCA_CHECKOUT.

Ññûëêè è íàñëåäîâàíèå

$rc=$ses->ObjectQueryHierarchy($pbl,$obj,$type,\@storage);

Ïîìåùàåò èíôîðìàöèþ îá èåðàðõèè ïðåäêîâ îáúåêòà $obj òèïà $type èç áèáëèîòåêè $pbl â ìàññèâ @storage. Îïåðàöèÿ ïðèìåíèìà òîëüêî ê îáúåêòàì òèïà window, menu è user_object. Äîëæåí áûòü óñòàíîâëåí library list, $pbl äîëæíà â íåãî âõîäèòü.

$rc=$ses->ObjectQueryReference($pbl,$obj,$type,\@storage);

Ïîìåùàåò èíôîðìàöèþ îá îáúåêòàõ, íà êîòîðûå ññûëàåòñÿ îáúåêò $obj òèïà $type èç áèáëèîòåêè $pbl â ìàññèâ @storage. Äîëæåí áûòü óñòàíîâëåí library list, $pbl äîëæíà â íåãî âõîäèòü. Êàæäûé ýëåìåíò ìàññèâà - õýø ñî ñëåäóþùèìè êëþ÷àìè:

    LibName èìÿ áèáëèîòåêè
    Name    èìÿ îáúåêòà
    Type    òèï îáúåêòà
    RefType òèï ññûëêè (o - open, s - simple) [íåäîêóìåíòèðîâàííî]

Õýø ñîîòâåòñòâóåò ñòðóêòóðå PBORCA_REFERENCE.

Ïîñòðîåíèå èñïîëíÿåìûõ ìîäóëåé

$rc=$ses->DllCreate($pbl,$pbr,$options);

Ñîçäàåò PowerBuilder Dynamic Library (PBD) èëè PowerBuilder Dll èç áèáëèîòåêè $pbl. $pbr - èìÿ ôàéëà ðåñóðñîâ èëè undef, åñëè ôàéëà ðåñóðñîâ íåò. $options - êîìáèíàöèÿ èç ôëàãîâ çàäàííûõ â "Ïàðàìåòðû ãåíåðàöèè êîäà". Library list è current application äîëæíû áûòü óñòàíîâëåíû. Åñëè ïëàíèðóåòñÿ ïðèëîæåíèå ñ äèíàìè÷åñêèìè áèáëèîòåêàìè, èõ íåîáõîäèìî ïîñòðîèòü ïåðåä ïîñòðîåíèåì exe ôàéëà.

$rc=$ses->ExeCreate($exe,$ico,$pbr,\@pbd_flags,$options,\$errors);

Ñîçäàåò exe ôàéë ïðèëîæåíèÿ â P-êîäå èëè â ìàøèííîì êîäå. Äëÿ ìàøèííîãî êîäà ìîæíî çàäàâàòü òèï îïòèìèçàöèè è âêëþ÷åíèå îòëàäî÷íîé èíôîðìàöèè. Ïðèëîæåíèå ñîçäàåòñÿ â ñîîòâåòñòâèè ñ library list.  ìàññèâå pbd_flags ìîæíî óêàçàòü, êàêèå áèáëèîòåêè áóäóò äèíàìè÷åñêèìè è óæå îòêîìïèëèðîâàíû â pbd/dll, à êàêèå ñëåäóåò âêëþ÷èòü â exe ôàéë. Library list è current application äîëæíû áûòü óñòàíîâëåíû.

Ïàðàìåòðû: $exe - èìÿ èñïîëíÿåìîãî ôàéëà (íå äîëæíî áûòü íà äèñêå, èíà÷å - îøèáêà) $ico - èêîíêà $pbr - ôàéë ðåñóðñîâ @pbd_flags - äëÿ êàæäîé pbl â library list 0 - âêëþ÷èòü îáúåêòû â .exe ôàéë; 1 - èñïîëüçîâàòü óæå ïîñòðîåííóþ pbd/dll ÷èñëî ýëåìåíòîâ â ìàññèâå äîëæíî ñîîòâåòñòâîâàòü ÷èñëó áèáëèîòåê â library list $options - ïàðàìåòðû ãåíåðàöèè êîäà (ñì. "Ïàðàìåòðû ãåíåðàöèè êîäà") $errors - áóôåð îøèáîê.

Exported constants

Êîñòàíòû ýêñïîðòèðóþòñÿ, åñëè óêàçàí òýã const:

    use use PowerBuilder::ORCA qw/:const/;

Òèïû îáúåêòîâ

    PBORCA_APPLICATION
    PBORCA_DATAWINDOW
    PBORCA_FUNCTION
    PBORCA_MENU
    PBORCA_PIPELINE
    PBORCA_PROJECT
    PBORCA_PROXYOBJECT
    PBORCA_QUERY
    PBORCA_STRUCTURE
    PBORCA_USEROBJECT
    PBORCA_WINDOW

Ïàðàìåòðû ãåíåðàöèè êîäà

    PBORCA_P_CODE
    PBORCA_MACHINE_CODE
    PBORCA_MACHINE_CODE_NATIVE
    PBORCA_MACHINE_CODE_16
    PBORCA_P_CODE_16
    PBORCA_OPEN_SERVER
    PBORCA_TRACE_INFO
    PBORCA_ERROR_CONTEXT
    PBORCA_MACHINE_CODE_OPT
    PBORCA_MACHINE_CODE_OPT_SPEED
    PBORCA_MACHINE_CODE_OPT_SPACE
    PBORCA_MACHINE_CODE_OPT_NONE

HISTORY

V0.03 10/11/2002
        - ïîëíîöåííûé òåñòîâûé ïðèìåð, ïðîâåðåí íà PB5, PB6 è PB8
        - äîðàáîòêè è èñïðàâëåíèÿ îøèáîê â EntryInfo,Import,ImportList
        - íå áûëà îïèñàíà ôóíêöèÿ Del â äîêóìåíòàöèè
        - òåïåðü ìîäóëü ìîæåò ðàáîòàòü ñ ëþáîé âåðñèåé PB - dll ORCA ëèíêóåòñÿ 
          äèíàìè÷åñêè

BUGS

Ãäå-òî âíóòðè ORCA åñòü memory leak.  ÷àñòíîñòè, ýòèì ãðåøíà PBORCA_LibraryDirectory, âûçûâàåìàÿ ñ callback-îì. Ñîîòâåòñòâåííî, ïàìÿòü óòåêàåò ïðè âûçîâå LibDir, õîòÿ åå XS êîä êîððåêòåí, ñ òî÷êè çðåíèÿ ðàáîòû ñ ïàìÿòüþ. Íå äóìàþ, ÷òî ýòî ñîçäàñò ïðîáëåìû â ðåàëüíîé æèçíè.

Âñå ôóíöèè áûëè îòòåñòèðîâàíû íî îøèáêè âîçìîæíû, òåì áîëåå, ÷òî ýòî ïåðâûé ðåëèç. Ñîîáùàéòå ïî e-mail.

AUTHOR

Ilya Chelpanov, ilya@macro.ru, chelpanov@mail.ru http://i72.narod.ru/

Ýòîò ìîäóëü - ñâîáîäíîå ÏÎ. Âû ìîæåòå èñïîëüçîâàòü, ðàñïðîñòðàíÿòü è ìîäèôèöèðîâàòü åå íà òåõ æå óñëîâèÿõ, ÷òî è ñàì Perl.

SEE ALSO

PowerBuilder online books, "ORCA Guide" http://manuals.sybase.com/onlinebooks/group-pb/adt/orca/

5 POD Errors

The following errors were encountered while parsing the POD:

Around line 3:

Non-ASCII character seen before =encoding in 'äëÿ'. Assuming ISO8859-1

Around line 104:

You forgot a '=back' before '=head2'

Around line 109:

'=item' outside of any '=over'

Around line 122:

You forgot a '=back' before '=head2'

Around line 124:

'=item' outside of any '=over'