Back to index

salome-kernel  6.5.0
Functions | Variables
SALOME_ModuleCatalog_impl.cxx File Reference
#include "SALOME_ModuleCatalog_impl.hxx"
#include "SALOME_ModuleCatalog_Acomponent_impl.hxx"
#include <libxml/parser.h>
#include <fstream>
#include <map>
#include "utilities.h"

Go to the source code of this file.

Functions

std::list< std::string > splitStringToList (const std::string &theString, const std::string &theSeparator)

Variables

static int MYDEBUG = 0
static const char * SEPARATOR = "::"
static const char * OLD_SEPARATOR = ":"

Function Documentation

std::list<std::string> splitStringToList ( const std::string &  theString,
const std::string &  theSeparator 
)

Definition at line 50 of file SALOME_ModuleCatalog_impl.cxx.

{
  std::list<std::string> aList;

  int sepLen = theSeparator.length();
  int startPos = 0, sepPos = theString.find(theSeparator, startPos);

  while (1)
    {
      std::string anItem ;
      if(sepPos != std::string::npos)
        anItem = theString.substr(startPos, sepPos - startPos);
      else
        anItem = theString.substr(startPos);
      if (anItem.length() > 0)
        aList.push_back(anItem);
      if(sepPos == std::string::npos)
        break;
      startPos = sepPos + sepLen;
      sepPos = theString.find(theSeparator, startPos);
    }

  return aList;
}

Variable Documentation

int MYDEBUG = 0 [static]

Definition at line 43 of file SALOME_ModuleCatalog_impl.cxx.

const char* OLD_SEPARATOR = ":" [static]

Definition at line 47 of file SALOME_ModuleCatalog_impl.cxx.

const char* SEPARATOR = "::" [static]

Definition at line 46 of file SALOME_ModuleCatalog_impl.cxx.