*.ybc I/O More...
#include <Xmlcode.h>
Classes | |
class | Invalid |
struct | namespaceentry_t |
references to namespaces More... | |
Static Public Member Functions | |
static string | spaces (int count) |
static string | xmlify (const string &s) |
static std::ostream & | writeBytep (std::ostream &streamref, const unsigned char *bytep, unsigned int len) |
static unsigned char * | readBytep (xmlcodeistream &streamref) |
static std::ostream & | writeType (std::ostream &str, constTypePtr type) |
static TypePtr | readType (xmlcodeistream &str) |
static std::ostream & | writeYCodelist (std::ostream &str, const ycodelist_t *codelist) |
static bool | readYCodelist (xmlcodeistream &str, ycodelist_t **anchor) |
static void | namespaceInit () |
static int | namespaceId (const Y2Namespace *name_space) |
static const Y2Namespace * | namespacePtr (int namespace_id) |
static int | pushNamespace (const Y2Namespace *name_space, bool with_xrefs=false) |
static int | popNamespace (const Y2Namespace *name_space) |
static void | popUptoNamespace (const Y2Namespace *name_space) |
static int | tareStack () |
static void | untareStack (int tare_id) |
static std::ostream & | writeEntry (std::ostream &str, const SymbolEntryPtr entry) |
static SymbolEntryPtr | readEntry (xmlcodeistream &str) |
static YCodePtr | readCode (xmlcodeistream &str) |
static YBlockPtr | readModule (const string &mname) |
static YCodePtr | readFile (const string &filename) |
static bool | writeFile (const YCodePtr code, const string &filename) |
Static Private Attributes | |
static int | m_namespace_nesting_level = -1 |
static int | m_namespace_nesting_array_size = 0 |
static int | m_namespace_tare_level = 0 |
static namespaceentry_t * | m_namespace_nesting_array = 0 |
static map< string, YBlockPtr > * | m_xmlcodeCache = NULL |
*.ybc I/O
int Xmlcode::namespaceId | ( | const Y2Namespace * | name_space | ) | [static] |
References m_namespace_nesting_array, m_namespace_nesting_level, m_namespace_tare_level, and y2error.
void Xmlcode::namespaceInit | ( | ) | [static] |
References m_namespace_nesting_array_size, m_namespace_nesting_level, m_namespace_tare_level, and y2debug.
const Y2Namespace * Xmlcode::namespacePtr | ( | int | namespace_id | ) | [static] |
int Xmlcode::popNamespace | ( | const Y2Namespace * | name_space | ) | [static] |
References SymbolTable::closeXRefs(), m_namespace_nesting_array, m_namespace_nesting_array_size, m_namespace_nesting_level, m_namespace_tare_level, Y2Namespace::table(), y2debug, and y2error.
Referenced by YEBuiltin::toXml(), and YFunction::toXml().
void Xmlcode::popUptoNamespace | ( | const Y2Namespace * | name_space | ) | [static] |
int Xmlcode::pushNamespace | ( | const Y2Namespace * | name_space, | |
bool | with_xrefs = false | |||
) | [static] |
References m_namespace_nesting_array, m_namespace_nesting_array_size, m_namespace_nesting_level, m_namespace_tare_level, Xmlcode::namespaceentry_t::name_space, SymbolTable::openXRefs(), Y2Namespace::table(), Xmlcode::namespaceentry_t::with_xrefs, y2debug, and y2error.
Referenced by YSImport::toXml(), YEBuiltin::toXml(), YFunction::toXml(), and YBlock::toXml().
unsigned char * Xmlcode::readBytep | ( | xmlcodeistream & | streamref | ) | [static] |
YCodePtr Xmlcode::readCode | ( | xmlcodeistream & | str | ) | [static] |
References xmlcodeistream::isVersion(), YECall::readCall(), y2error, YCode::ycConstant, YCode::ycFunction, YCode::ycLocale, YCode::yeBinary, YCode::yeBlock, YCode::yeBracket, YCode::yeBuiltin, YCode::yeCompare, YCode::yeExpression, YCode::yeFunction, YCode::yeFunctionPointer, YCode::yeIs, YCode::yeList, YCode::yeLocale, YCode::yeMap, YCode::yePropagate, YCode::yeReference, YCode::yeReturn, YCode::yeTerm, YCode::yeTriple, YCode::yeUnary, YCode::yeVariable, YCode::ysAssign, YCode::ysBlock, YCode::ysBracket, YCode::ysBreak, YCode::ysContinue, YCode::ysDo, YCode::ysExpression, YCode::ysFilename, YCode::ysFunction, YCode::ysIf, YCode::ysImport, YCode::ysInclude, YCode::ysRepeat, YCode::ysReturn, YCode::ysSwitch, YCode::ysTextdomain, YCode::ysTypedef, YCode::ysVariable, and YCode::ysWhile.
Referenced by readFile().
SymbolEntryPtr Xmlcode::readEntry | ( | xmlcodeistream & | str | ) | [static] |
YCodePtr Xmlcode::readFile | ( | const string & | filename | ) | [static] |
References xmlcodeistream::isVersion(), xmlcodeistream::major(), xmlcodeistream::minor(), readCode(), xmlcodeistream::release(), y2error, YaST_BYTECODE_MAJOR, YaST_BYTECODE_MINOR, and YaST_BYTECODE_RELEASE.
Referenced by readModule().
YBlockPtr Xmlcode::readModule | ( | const string & | mname | ) | [static] |
References YCPPathSearch::findModule(), m_xmlcodeCache, readFile(), tareStack(), untareStack(), y2error, and ycperror.
TypePtr Xmlcode::readType | ( | xmlcodeistream & | str | ) | [static] |
References Type::AnyT, Type::BlockT, Type::BooleanT, Type::ByteblockT, Type::Error, Type::ErrorT, Type::FlexT, Type::FloatT, Type::FunctionT, Type::IntegerT, Type::ListT, Type::LocaleT, Type::MapT, Type::NFlexT, Type::NilT, Type::PathT, Type::StringT, Type::SymbolT, Type::TermT, Type::TupleT, Type::UnspecT, Type::VariableT, Type::VoidT, Type::WildcardT, y2debug, and y2error.
bool Xmlcode::readYCodelist | ( | xmlcodeistream & | str, | |
ycodelist_t ** | anchor | |||
) | [static] |
string Xmlcode::spaces | ( | int | count | ) | [static] |
int Xmlcode::tareStack | ( | ) | [static] |
References m_namespace_nesting_level, and m_namespace_tare_level.
Referenced by readModule().
void Xmlcode::untareStack | ( | int | tare_id | ) | [static] |
References m_namespace_tare_level.
Referenced by readModule().
std::ostream & Xmlcode::writeBytep | ( | std::ostream & | streamref, | |
const unsigned char * | bytep, | |||
unsigned int | len | |||
) | [static] |
References to_hexc().
Referenced by YCPByteblockRep::toXml().
std::ostream & Xmlcode::writeEntry | ( | std::ostream & | str, | |
const SymbolEntryPtr | entry | |||
) | [static] |
References Y2Namespace::name().
Referenced by YSBracket::toXml(), YEReference::toXml(), YCPEntryRep::toXml(), TableEntry::toXml(), and Point::toXml().
bool Xmlcode::writeFile | ( | const YCodePtr | code, | |
const string & | filename | |||
) | [static] |
References y2error.
Referenced by compilefile().
std::ostream & Xmlcode::writeType | ( | std::ostream & | str, | |
constTypePtr | type | |||
) | [static] |
std::ostream & Xmlcode::writeYCodelist | ( | std::ostream & | str, | |
const ycodelist_t * | codelist | |||
) | [static] |
References ycodelist::code, ycodelist::next, and y2error.
Referenced by YEBuiltin::toXml(), YEList::toXml(), and YETerm::toXml().
string Xmlcode::xmlify | ( | const string & | s | ) | [static] |
Xmlcode::namespaceentry_t * Xmlcode::m_namespace_nesting_array = 0 [static, private] |
Referenced by namespaceId(), namespacePtr(), popNamespace(), popUptoNamespace(), and pushNamespace().
int Xmlcode::m_namespace_nesting_array_size = 0 [static, private] |
Referenced by namespaceInit(), popNamespace(), popUptoNamespace(), and pushNamespace().
int Xmlcode::m_namespace_nesting_level = -1 [static, private] |
Referenced by namespaceId(), namespaceInit(), namespacePtr(), popNamespace(), popUptoNamespace(), pushNamespace(), and tareStack().
int Xmlcode::m_namespace_tare_level = 0 [static, private] |
Referenced by namespaceId(), namespaceInit(), namespacePtr(), popNamespace(), popUptoNamespace(), pushNamespace(), tareStack(), and untareStack().
map< string, YBlockPtr > * Xmlcode::m_xmlcodeCache = NULL [static, private] |
Referenced by readModule().