IpCbcColReader Class Reference

A class for reading a .col file containing name for variable (ampl generated file). More...

#include <IpCbcColReader.hpp>

List of all members.

Public Member Functions

 IpCbcColReader (const char *fileName)
 Constructor with a file name given by a const char *.
 IpCbcColReader (const std::string &fileName="")
 Constructor with a file name given by a string and also default (empty string).
bool readFile ()
 Reads the .col file.
bool readFile (const std::string &fileName)
 Reads the .col file fileName.
void copyNames (std::string *varNames, int n_var)
 Copy the names to varNames.

Private Types

typedef std::map< const char *,
int, ltstr
namesStorage
 Hash type.

Private Attributes

std::string fileName_
 Name of the file to read.
namesStorage varIndices_
 Hash map used to store the indices.
std::vector< std::string > varNames_
 Variable names.

Classes

struct  ltstr
 String comparison strucutre. More...


Detailed Description

A class for reading a .col file containing name for variable (ampl generated file).

Definition at line 22 of file IpCbcColReader.hpp.


Member Typedef Documentation

typedef std::map< const char *, int, ltstr > IpCbcColReader::namesStorage [private]

Hash type.

Definition at line 55 of file IpCbcColReader.hpp.


Constructor & Destructor Documentation

IpCbcColReader::IpCbcColReader ( const char *  fileName  ) 

Constructor with a file name given by a const char *.

IpCbcColReader::IpCbcColReader ( const std::string &  fileName = ""  ) 

Constructor with a file name given by a string and also default (empty string).


Member Function Documentation

bool IpCbcColReader::readFile (  ) 

Reads the .col file.

Referenced by readFile().

bool IpCbcColReader::readFile ( const std::string &  fileName  )  [inline]

Reads the .col file fileName.

Definition at line 32 of file IpCbcColReader.hpp.

References fileName_, and readFile().

void IpCbcColReader::copyNames ( std::string *  varNames,
int  n_var 
)

Copy the names to varNames.


Member Data Documentation

std::string IpCbcColReader::fileName_ [private]

Name of the file to read.

Definition at line 42 of file IpCbcColReader.hpp.

Referenced by readFile().

namesStorage IpCbcColReader::varIndices_ [private]

Hash map used to store the indices.

Definition at line 58 of file IpCbcColReader.hpp.

std::vector<std::string> IpCbcColReader::varNames_ [private]

Variable names.

Definition at line 60 of file IpCbcColReader.hpp.


The documentation for this class was generated from the following file:
Generated on Fri May 16 21:15:04 2008 for Bonmin by  doxygen 1.4.7