EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PasswordString Class Reference

Python object "util.PasswordString". More...

#include "PyUtils.h"

Inheritance diagram for PasswordString:
Collaboration diagram for PasswordString:

Public Member Functions

 PasswordString (PyWString *password)
 
PyWString * GetPassword () const
 
- Public Member Functions inherited from PyObjectEx_Type2
 PyObjectEx_Type2 (PyTuple *args, PyDict *keywords, bool enclosed=false)
 
 PyObjectEx_Type2 (PyToken *args, PyDict *keywords, bool enclosed=false)
 
PyTuple * GetArgs () const
 
PyDict * GetKeywords () const
 
PyRep * FindKeyword (const char *keyword) const
 
- Public Member Functions inherited from PyObjectEx
 PyObjectEx (bool is_type_2, PyRep *header)
 
 PyObjectEx (const PyObjectEx &oth)
 
 PyObjectEx (PyObjectEx &&oth)=delete
 
PyObjectEx & operator= (const PyObjectEx &oth)
 
PyObjectEx & operator= (PyObjectEx &&oth)=delete
 
PyRep * Clone () const
 Clones object. More...
 
bool visit (PyVisitor &v) const
 Visits object. More...
 
PyRep * header () const
 
bool isType2 () const
 
list_type & list ()
 
const list_type & list () const
 
dict_type & dict ()
 
const dict_type & dict () const
 
- Public Member Functions inherited from PyRep
PyType GetType () const
 
bool IsInt () const
 
bool IsLong () const
 
bool IsFloat () const
 
bool IsBool () const
 
bool IsBuffer () const
 
bool IsString () const
 
bool IsWString () const
 
bool IsToken () const
 
bool IsTuple () const
 
bool IsList () const
 
bool IsDict () const
 
bool IsNone () const
 
bool IsSubStruct () const
 
bool IsSubStream () const
 
bool IsChecksumedStream () const
 
bool IsObject () const
 
bool IsObjectEx () const
 
bool IsPackedRow () const
 
const char * TypeString () const
 
PyInt * AsInt ()
 
const PyInt * AsInt () const
 
PyLong * AsLong ()
 
const PyLong * AsLong () const
 
PyFloat * AsFloat ()
 
const PyFloat * AsFloat () const
 
PyBool * AsBool ()
 
const PyBool * AsBool () const
 
PyBuffer * AsBuffer ()
 
const PyBuffer * AsBuffer () const
 
PyString * AsString ()
 
const PyString * AsString () const
 
PyWString * AsWString ()
 
const PyWString * AsWString () const
 
PyToken * AsToken ()
 
const PyToken * AsToken () const
 
PyTuple * AsTuple ()
 
const PyTuple * AsTuple () const
 
PyList * AsList ()
 
const PyList * AsList () const
 
PyDict * AsDict ()
 
const PyDict * AsDict () const
 
PyNone * AsNone ()
 
const PyNone * AsNone () const
 
PySubStruct * AsSubStruct ()
 
const PySubStruct * AsSubStruct () const
 
PySubStream * AsSubStream ()
 
const PySubStream * AsSubStream () const
 
PyChecksumedStream * AsChecksumedStream ()
 
const PyChecksumedStream * AsChecksumedStream () const
 
PyObject * AsObject ()
 
const PyObject * AsObject () const
 
PyObjectEx * AsObjectEx ()
 
const PyObjectEx * AsObjectEx () const
 
PyPackedRow * AsPackedRow ()
 
const PyPackedRow * AsPackedRow () const
 
void Dump (FILE *into, const char *pfx) const
 Dumps object to file. More...
 
void Dump (LogType type, const char *pfx) const
 Dumps object to console. More...
 
virtual int32 hash () const
 virtual function to generate a hash value of a object. More...
 
- Public Member Functions inherited from RefObject
 RefObject (size_t initRefCount)
 Initializes reference count. More...
 
virtual ~RefObject ()
 Destructor; must be virtual. More...
 
size_t GetCount ()
 

Static Protected Member Functions

static PyTuple * _CreateArgs (PyWString *password)
 
- Static Protected Member Functions inherited from PyObjectEx_Type2
static PyTuple * _CreateHeader (PyTuple *args, PyDict *keywords, bool enclosed=false)
 
static PyTuple * _CreateHeader (PyToken *args, PyDict *keywords, bool enclosed=false)
 

Additional Inherited Members

- Public Types inherited from PyObjectEx
typedef PyList list_type
 
typedef list_type::iterator list_iterator
 
typedef list_type::const_iterator const_list_iterator
 
typedef PyDict dict_type
 
typedef dict_type::iterator dict_iterator
 
typedef dict_type::const_iterator const_dict_iterator
 
- Public Types inherited from PyRep
enum  PyType {
  PyTypeMin = 0, PyTypeInt = 1, PyTypeLong = 2, PyTypeFloat = 3,
  PyTypeBool = 4, PyTypeBuffer = 5, PyTypeString = 6, PyTypeWString = 7,
  PyTypeToken = 8, PyTypeTuple = 9, PyTypeList = 10, PyTypeDict = 11,
  PyTypeNone = 12, PyTypeSubStruct = 13, PyTypeSubStream = 14, PyTypeChecksumedStream = 15,
  PyTypeObject = 16, PyTypeObjectEx = 17, PyTypePackedRow = 18, PyTypeError = 19
}
 Python wire object types. More...
 
- Static Public Member Functions inherited from PyRep
static std::string StringContent (PyRep *pRep)
 
static int64 IntegerValue (PyRep *pRep)
 
static uint32 IntegerValueU32 (PyRep *pRep)
 
- Protected Member Functions inherited from PyObjectEx_Type2
virtual ~PyObjectEx_Type2 ()
 
- Protected Member Functions inherited from PyObjectEx
virtual ~PyObjectEx ()
 
- Protected Member Functions inherited from PyRep
 PyRep (PyType t)
 
 PyRep (const PyRep &oth)
 
 PyRep (PyRep &&oth)=delete
 
PyRep & operator= (const PyRep &oth)=default
 
PyRep & operator= (PyRep &&oth)=default
 
virtual ~PyRep ()
 
- Protected Member Functions inherited from RefObject
void IncRef () const
 Increments reference count of object by one. More...
 
void DecRef () const
 Decrements reference count of object by one. More...
 
- Protected Attributes inherited from PyObjectEx
PyRep *const mHeader
 
const bool mIsType2
 
list_type *const mList
 
dict_type *const mDict
 
- Protected Attributes inherited from PyRep
const PyType mType
 
- Protected Attributes inherited from RefObject
size_t mRefCount
 Reference count of instance. More...
 
bool mDeleted
 

Detailed Description

Python object "util.PasswordString".

This object is used when transporting plain password over network.

Author
Bloody.Rabbit

Definition at line 39 of file PyUtils.h.

Constructor & Destructor Documentation

PasswordString::PasswordString ( PyWString *  password)
Parameters
[in]passwordPassword to be stored.

Definition at line 30 of file PyUtils.cpp.

31 : PyObjectEx_Type2( _CreateArgs( password ), NULL )
32 {
33 }
static PyTuple * _CreateArgs(PyWString *password)
Definition: PyUtils.cpp:40
PyObjectEx_Type2(PyTuple *args, PyDict *keywords, bool enclosed=false)
Definition: PyRep.cpp:942

Member Function Documentation

PyTuple * PasswordString::_CreateArgs ( PyWString *  password)
staticprotected

Definition at line 40 of file PyUtils.cpp.

References PyTuple::SetItem().

41 {
42  PyTuple* head = new PyTuple( 2 );
43  head->SetItem( 0, new PyToken( "util.PasswordString" ) );
44  head->SetItem( 1, password );
45 
46  return head;
47 }
Python tuple.
Definition: PyRep.h:567
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:610
Python token (eg. class name).
Definition: PyRep.h:522

Here is the call graph for this function:

PyWString * PasswordString::GetPassword ( ) const
Returns
Password stored within this object.

Definition at line 35 of file PyUtils.cpp.

References PyRep::AsWString(), PyObjectEx_Type2::GetArgs(), and PyTuple::GetItem().

36 {
37  return GetArgs()->GetItem( 1 )->AsWString();
38 }
PyRep * GetItem(size_t index) const
Returns Python object.
Definition: PyRep.h:602
PyTuple * GetArgs() const
Definition: PyRep.cpp:947
PyWString * AsWString()
Definition: PyRep.h:134

Here is the call graph for this function:


The documentation for this class was generated from the following files: