Pārlūkot izejas kodu

cleaned up namespace in snf_xci

master
Pete McNeil pirms 4 gadiem
vecāks
revīzija
e4347dcded
1 mainītis faili ar 7 papildinājumiem un 5 dzēšanām
  1. 7
    5
      snf_xci.cpp

+ 7
- 5
snf_xci.cpp Parādīt failu

@@ -7,6 +7,8 @@

#include "snf_xci.hpp"

namespace cd = codedweller;

//// snf_xci Interpreter Object ////////////////////////////////////////////////

snf_xci::snf_xci() : // Construcing a blank snf_xci.
@@ -23,17 +25,17 @@ snf_xci::snf_xci(const char* bfr, int len) :
SNFWasParsed.setup(ReadWasGood);
SetupReader();
reset();
ConfigurationData Data(bfr, len); // Then build ConfigurationData from
cd::ConfigurationData Data(bfr, len); // Then build ConfigurationData from
Reader.interpret(Data); // the buffer and interpret it.
}

snf_xci::snf_xci(string& input) : // Constructing with a string.
snf_xci::snf_xci(std::string& input) : // Constructing with a string.
Reader("snf"), // Start with our blank construction.
ReadWasGood(false) {
SNFWasParsed.setup(ReadWasGood);
SetupReader();
reset();
ConfigurationData Data(input.c_str(), input.length()); // Then build ConfigurationData from
cd::ConfigurationData Data(input.c_str(), input.length()); // Then build ConfigurationData from
Reader.interpret(Data); // the string and interpret it.
}

@@ -119,12 +121,12 @@ void snf_xci::reset() {
};

bool snf_xci::read(const char* bfr, int len) { // To read from a buffer we
ConfigurationData Data(bfr, len); // construct ConfigurationData from
cd::ConfigurationData Data(bfr, len); // construct ConfigurationData from
Reader.interpret(Data); // the buffer and interpret it.
return good(); // Return true if it looked good.
}

bool snf_xci::read(string& input) { // To read from a string we
bool snf_xci::read(std::string& input) { // To read from a string we
return read(input.c_str(), input.length()); // get the strings buffer and hand off
} // to our buffer read()


Notiek ielāde…
Atcelt
Saglabāt