Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5183 in orxonox.OLD for trunk/src/lib/shell


Ignore:
Timestamp:
Sep 15, 2005, 1:01:00 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: SubString now also can split by whiteSpaces :>
this cost me almost 2 hours… sometimes i think, that i am unable to think…. :/
other times it just works, like when learning some Information Transfer

Location:
trunk/src/lib/shell
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell.cc

    r5181 r5183  
    4646  this->setName("Shell");
    4747
     48  // Element2D and generals
    4849  this->setAbsCoor2D(3, -400);
    4950  this->textSize = 15;
    5051  this->lineSpacing = 5;
    5152  this->bActive = false;
    52 
    5353
    5454  // BUFFER
  • trunk/src/lib/shell/shell.h

    r5181 r5183  
    4848
    4949    // BUFFERS
    50     void flush();
    5150    void setBufferDisplaySize(unsigned int bufferDisplaySize);
    5251    void printToDisplayBuffer(const char* text);
     52    void flush();
    5353
    5454    void clear();
     
    5656    // EventListener
    5757    virtual void process(const Event &event);
    58 
    5958    // Element2D-functions
    6059    virtual void draw() const;
     
    6362
    6463  private:
    65 
    6664    // helpers //
    6765    Vector calculateLinePosition(unsigned int lineNumber);
    68 //     void testI (int i);
    69 //     void testS (const char* s);
    70 //     void testB (bool b);
    71 //     void testF (float f);
    72 //     void testSF (const char* s, float f);
     66
     67    //     void testI (int i);
     68    //     void testS (const char* s);
     69    //     void testB (bool b);
     70    //     void testF (float f);
     71    //     void testSF (const char* s, float f);
    7372
    7473  private:
  • trunk/src/lib/shell/shell_buffer.cc

    r5177 r5183  
    9191#endif
    9292
    93   vprintf(line, arguments);
     93    vprintf(line, arguments);
    9494#if DEBUG < 3
    9595  else
  • trunk/src/lib/shell/shell_completion.cc

    r5182 r5183  
    2020#include "shell_input.h"
    2121
     22#include "substring.h"
    2223#include "base_object.h"
    2324#include "class_list.h"
     
    6263bool ShellCompletion::autoComplete(ShellInput* input)
    6364{
     65  char* completionLine;
     66
     67  long classID;         //< the classID retrieved from the Class.
     68  char* classBegin;     //< the beginn of the slass string
     69  char* classEnd;       //< the end of the class string
     70  char* objectBegin;    //< the begin of the object string
     71  char* objectEnd;      //< the end of the object string
     72  char* functionBegin;  //< the begin of the function string
     73  char* functionEnd;    //< the end of the function string
     74
    6475  if (input != NULL)
    6576    this->input = input;
    66   //PRINTF(3)("AutoCompletion not implemented yet\n");
    67 
    68   char* completionLine = new char[strlen(this->input->getText())+1];
     77
     78  SubString(input->getText(), true).debug();
     79
     80/*  completionLine = new char[strlen(this->input->getText())+1];
    6981  strcpy(completionLine, this->input->getText());
    7082
     
    92104    this->classComplete(commandBegin);
    93105
    94   delete[] completionLine;
     106  delete[] completionLine;*/
    95107}
    96108
  • trunk/src/lib/shell/shell_completion.h

    r5182 r5183  
    2424  bool autoComplete(ShellInput* input);
    2525  bool classComplete(const char* classBegin);
     26  long classMatch(const char* input, unsigned int* length);
    2627  bool objectComplete(const char* objectBegin, long classID);
     28  bool objectMatch(const char* objectBegin, long classID, unsigned int* length);
    2729  bool functionComplete(const char* functionBegin);
     30  bool functionMatch(const char* functionBegin, long classID, unsigned int* length);
    2831
    2932  bool generalComplete(const tList<const char>* stringList, const char* begin, const char* displayAs = "%s", const char* addBack = NULL, const char* addFront = NULL);
Note: See TracChangeset for help on using the changeset viewer.