Changeset ee804c2 in tol


Ignore:
Timestamp:
Aug 3, 2010, 8:54:28 AM (16 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
f9c366f
Parents:
110d3c5
Message:

Refs #956
Using direct protocol of built-in functions instead of macros to avoid duplications of contents

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@2430 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/LoadDynLib/LoadDynLib.cpp

    r110d3c5 ree804c2  
    3434
    3535//--------------------------------------------------------------------
    36 DeclareContensClass(BNameBlock, BNameBlockTemporary, BLoadDynLib);
    37 DefExtOpr(1, BLoadDynLib, "LoadDynLib", 1, 1, "Set",
    38  "(Text libraryPath)",
    39  I2("Returns a NameBlock that contains methods and members written "
     36class BLoadDynLib: public BExternalOperator
     37{
     38public:
     39  BLoadDynLib() : BExternalOperator
     40  (
     41    "LoadDynLib",GraNameBlkock(),"Text", NIL,1,1,
     42    "(Text libraryPath)",
     43    I2("Returns a NameBlock that contains methods and members written "
    4044    "in C + + in a precompiled library for dynamic linking. Once "
    4145    "loaded Nameblock is nothing particular and can be used like "
    … …  
    4650    "particular y puede ser usado como cualquier otro objeto creado "
    4751    "con el lenguaje TOL. Vea más detalles en ")+"\n"
    48  "https://www.tol-project.org/wiki/LoadDynLib",
    49  BOperClassify::System_);
     52    "https://www.tol-project.org/wiki/LoadDynLib",
     53    BOperClassify::System_
     54  )
     55  { IncNRefs(); }
     56  BSyntaxObject* Evaluator(BList* argTrees) const;
     57};
     58
    5059//--------------------------------------------------------------------
    51 void BLoadDynLib::CalcContens()
     60BSyntaxObject* BLoadDynLib::Evaluator(BList* arg) const
    5261//--------------------------------------------------------------------
    5362{
    54   BText& libraryPath = Text(Arg(1));
     63  if(CheckNonDeclarativeAction("LoadDynLib")) { return(NULL); }
     64  BText& libraryPath = Text(Car(arg));
    5565  BText libraryName = GetFilePrefix(libraryPath); 
     66  BUserNameBlock* unb = NULL;
     67  //VBR: Jorge, inserta aquí el código que enlaza con la dll y pon
     68  //el resultado en unb para devolverlo
     69
     70  //Al final hay que destruir la lista de argumentos antes de salir
     71  DESTROY(arg);
     72  return(unb);
    5673}
Note: See TracChangeset for help on using the changeset viewer.