idep_alutil.cxx File Reference

#include "idep_aliasutil.h"
#include "idep_aliastable.h"
#include "idep_tokeniter.h"
#include "idep_string.h"
#include <fstream>
#include <iostream>
#include <cassert>

Go to the source code of this file.

Functions

static std::ostream & warning (std::ostream &orr, const char *file, int lineno)
static std::ostream & err (std::ostream &orr, const char *file, int lineno)
static int tryToAlias (idep_AliasTable *table, std::ostream &orr, const char *inputName, int lineno, const char *componentName, const char *alias)

Function Documentation

static std::ostream& err ( std::ostream &  orr,
const char *  file,
int  lineno 
) [static]

Definition at line 18 of file idep_alutil.cxx.

Referenced by tryToAlias().

00019 {
00020     return orr << "Error in " << file << '(' << lineno << "): ";
00021 }

static int tryToAlias ( idep_AliasTable table,
std::ostream &  orr,
const char *  inputName,
int  lineno,
const char *  componentName,
const char *  alias 
) [static]

Definition at line 23 of file idep_alutil.cxx.

References idep_AliasTable::add(), err(), and idep_AliasTable::lookup().

Referenced by idep_AliasUtil::readAliases().

00026 {
00027     if (table->add(alias, componentName) < 0) {
00028         const char *previousName = table->lookup(alias);
00029         err(orr, inputName, lineno) << "two names for alias \"" 
00030             << alias << "\":" << std::endl << "    \"" << previousName
00031             << "\" and \"" << componentName << "\"" << std::endl;
00032         return 1;
00033     }
00034     return 0;
00035 }

static std::ostream& warning ( std::ostream &  orr,
const char *  file,
int  lineno 
) [static]

Definition at line 13 of file idep_alutil.cxx.

Referenced by idep_AliasUtil::readAliases().

00014 {
00015     return orr << "Warning in " << file << '(' << lineno << "): ";
00016 }


Generated on 16 Jan 2018 for loon by  doxygen 1.6.1