From 52be1ef0d126f09ba943c7afcf367e7d9347f2fd Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 8 Nov 2012 22:58:28 +0000 Subject: tabconv: it's all spaces now. --- src/variable.h | 190 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 95 insertions(+), 95 deletions(-) (limited to 'src/variable.h') diff --git a/src/variable.h b/src/variable.h index 890552a..f6c2044 100644 --- a/src/variable.h +++ b/src/variable.h @@ -12,109 +12,109 @@ class Variable friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Variable &v ); friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, Variable &v ); public: - enum Type - { - typeNone, - typeBool, - typeInt, - typeFloat, - typeVersion, - typeString, - typeList, - typeRef, /**< Reference by name, it's just a string. */ - typeOpaque /**< Only useful to functions. */ - }; + enum Type + { + typeNone, + typeBool, + typeInt, + typeFloat, + typeVersion, + typeString, + typeList, + typeRef, /**< Reference by name, it's just a string. */ + typeOpaque /**< Only useful to functions. */ + }; public: - Variable(); - Variable( Type t ); - Variable( int iVal ); - Variable( double fVal ); - Variable( bool bVal ); - Variable( const Bu::String &sVal ); - Variable( const char *sVal ); - Variable( const Variable &v ); - Variable( const class AstLeaf &l ); - /** - * This special case function turns the variable into a string if there is - * only one string in the list, or a list of strings if there is more or - * less than one. - */ - Variable( const StrList &lst ); - Variable( const VarList &lst ); - Variable( void *oVal ); - virtual ~Variable(); - - static Variable mkRef( const Bu::String &sVal ); - - Type getType() const; - - // Raw aquisition functions, if the type isn't right, - // they throw an exception - int getInt() const; - double getFloat() const; - bool getBool() const; - const Bu::String &getString() const; - const VarList &getList() const; - const void *getOpaque() const; - - // Conversion functions, they'll return the requested type, maybe an error - // if the source data is really bad - int toInt() const; - double toFloat() const; - bool toBool() const; - Bu::String toString() const; - VarList toList() const; - - Variable toType( Type eNewType ) const; - - void append( const Variable &v ); - VarList::iterator begin(); - VarList::const_iterator begin() const; - - void doNegate(); - void doNot(); - - const Variable &operator=( const Variable &rhs ); - const Variable &operator=( const int &rhs ); - const Variable &operator=( const double &rhs ); - const Variable &operator=( const bool &rhs ); - const Variable &operator=( const Bu::String &rhs ); - const Variable &operator=( void *rhs ); - - const Variable &operator+=( const Variable &rhs ); - const Variable &operator<<( const Variable &rhs ); - - bool operator==( const Variable &rhs ) const; - bool operator!=( const Variable &rhs ) const; - bool operator<( const Variable &rhs ) const; - bool operator>( const Variable &rhs ) const; - bool operator<=( const Variable &rhs ) const; - bool operator>=( const Variable &rhs ) const; - - Variable operator+( const Variable &rhs ) const; - Variable operator-( const Variable &rhs ) const; - Variable operator*( const Variable &rhs ) const; - Variable operator/( const Variable &rhs ) const; + Variable(); + Variable( Type t ); + Variable( int iVal ); + Variable( double fVal ); + Variable( bool bVal ); + Variable( const Bu::String &sVal ); + Variable( const char *sVal ); + Variable( const Variable &v ); + Variable( const class AstLeaf &l ); + /** + * This special case function turns the variable into a string if there is + * only one string in the list, or a list of strings if there is more or + * less than one. + */ + Variable( const StrList &lst ); + Variable( const VarList &lst ); + Variable( void *oVal ); + virtual ~Variable(); + + static Variable mkRef( const Bu::String &sVal ); + + Type getType() const; + + // Raw aquisition functions, if the type isn't right, + // they throw an exception + int getInt() const; + double getFloat() const; + bool getBool() const; + const Bu::String &getString() const; + const VarList &getList() const; + const void *getOpaque() const; + + // Conversion functions, they'll return the requested type, maybe an error + // if the source data is really bad + int toInt() const; + double toFloat() const; + bool toBool() const; + Bu::String toString() const; + VarList toList() const; + + Variable toType( Type eNewType ) const; + + void append( const Variable &v ); + VarList::iterator begin(); + VarList::const_iterator begin() const; + + void doNegate(); + void doNot(); + + const Variable &operator=( const Variable &rhs ); + const Variable &operator=( const int &rhs ); + const Variable &operator=( const double &rhs ); + const Variable &operator=( const bool &rhs ); + const Variable &operator=( const Bu::String &rhs ); + const Variable &operator=( void *rhs ); + + const Variable &operator+=( const Variable &rhs ); + const Variable &operator<<( const Variable &rhs ); + + bool operator==( const Variable &rhs ) const; + bool operator!=( const Variable &rhs ) const; + bool operator<( const Variable &rhs ) const; + bool operator>( const Variable &rhs ) const; + bool operator<=( const Variable &rhs ) const; + bool operator>=( const Variable &rhs ) const; + + Variable operator+( const Variable &rhs ) const; + Variable operator-( const Variable &rhs ) const; + Variable operator*( const Variable &rhs ) const; + Variable operator/( const Variable &rhs ) const; private: - Type eType; - union - { - int iVal; - double fVal; - bool bVal; - Bu::String *sVal; - VarList *lVal; - void *oVal; - } uVal; - - void reset( Type eType ); + Type eType; + union + { + int iVal; + double fVal; + bool bVal; + Bu::String *sVal; + VarList *lVal; + void *oVal; + } uVal; + + void reset( Type eType ); }; namespace Bu { - class Formatter; + class Formatter; } Bu::Formatter &operator<<( Bu::Formatter &f, const Variable::Type &t ); -- cgit v1.2.3