Dynalib Utils
Public Member Functions | Static Public Member Functions | List of all members
KAML::File Class Reference

#include <File.h>

Inheritance diagram for KAML::File:
Inheritance graph
[legend]
Collaboration diagram for KAML::File:
Collaboration graph
[legend]

Public Member Functions

 File ()
 
 File (const String &fileName)
 Construct a new File:: File object. More...
 
virtual ~File ()
 
 File (const File &other)
 
Filecopy () override
 
bool isOpen ()
 
bool open (const String &fileName, const char *mode)
 
const StringgetFileName () const
 
size_t read (String &buf)
 
void close ()
 
bool save ()
 
bool saveAs (const String &fileName)
 
NodegetRootNode ()
 
NodegetDoc (int index=0)
 
int hashCode () const override
 
bool operator== (const File &other) const override
 
- Public Member Functions inherited from IHashable< File >
 IHashable ()=default
 
virtual ~IHashable ()=default
 
- Public Member Functions inherited from IComparable< File >
 IComparable ()=default
 
virtual ~IComparable ()=default
 
virtual bool operator== (const File &other) const=0
 
- Public Member Functions inherited from ICopyable< File >
 ICopyable ()=default
 
virtual ~ICopyable ()=default
 

Static Public Member Functions

static bool exists (const String &fileName)
 
static bool canAccess (const String &fileName)
 

Constructor & Destructor Documentation

◆ File() [1/3]

KAML::File::File ( )

◆ File() [2/3]

KAML::File::File ( const String fileName)
explicit

Construct a new File:: File object.

Parameters
fileName
Exceptions
FileNotFoundexception if file is not found
DataFileExceptionis the file is not accessible

◆ ~File()

KAML::File::~File ( )
virtual

◆ File() [3/3]

KAML::File::File ( const File other)

Member Function Documentation

◆ canAccess()

bool KAML::File::canAccess ( const String fileName)
static

◆ close()

void KAML::File::close ( )

◆ copy()

File * KAML::File::copy ( )
overridevirtual

Implements ICopyable< File >.

◆ exists()

bool KAML::File::exists ( const String fileName)
static

◆ getDoc()

Node & KAML::File::getDoc ( int  index = 0)

◆ getFileName()

const String * KAML::File::getFileName ( ) const

◆ getRootNode()

Node & KAML::File::getRootNode ( )

◆ hashCode()

int KAML::File::hashCode ( ) const
overridevirtual

Implements IHashable< File >.

◆ isOpen()

bool KAML::File::isOpen ( )

◆ open()

bool KAML::File::open ( const String fileName,
const char *  mode 
)

◆ operator==()

bool KAML::File::operator== ( const File other) const
override

◆ read()

size_t KAML::File::read ( String buf)

◆ save()

bool KAML::File::save ( )

◆ saveAs()

bool KAML::File::saveAs ( const String fileName)

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