Puma Reference Manual Puma::FileUnit Class Reference



Puma::FileUnit Class Reference

#include <FileUnit.h>

Inheritance diagram for Puma::FileUnit:
Inheritance graph

Public Member Functions

 FileUnit ()
 
 FileUnit (Unit &)
 
 FileUnit (const List &)
 
virtual ~FileUnit ()
 
virtual void name (const char *)
 Set the name of the unit (usually the file name). More...
 
void setLocation (const char *)
 
char * lastLocation () const
 
char * absolutePath () const
 
bool isFile () const
 Check if this is a unit for a file. More...
 
bool belongsTo (Project &)
 
- Public Member Functions inherited from Puma::Unit
 Unit ()
 Constructor. More...
 
 Unit (const List &list)
 Copy-constructor. More...
 
virtual ~Unit ()
 Destructor. More...
 
char * name () const
 Get the name of the unit (usually the file name). More...
 
virtual void print (ostream &os) const
 Print the tokens of the unit on the given stream. More...
 
virtual bool isMacroExp () const
 Check if this is a unit for a macro expansion. More...
 
virtual bool isTemplateInstance () const
 Check if this is a unit for a template instance. More...
 
UnitState & state ()
 Get the state of the unit. More...
 
char * buildString () const
 Build a string from the unit. More...
 
Token * first () const
 Get the first token in the unit. More...
 
Token * last () const
 Get the last token in the unit. More...
 
Token * next (const Token *token) const
 Get the next token of the given token. More...
 
Token * prev (const Token *token) const
 Get the previous token of the given token. More...
 
- Public Member Functions inherited from Puma::List
 List ()
 Constructor. More...
 
 List (const List &copy)
 Copy-constructor. More...
 
 ~List ()
 Destructor. More...
 
List & operator= (const List &copy)
 Assignment operator. More...
 
List & operator+= (const List &list)
 Append the given list. More...
 
List operator+ (const List &list)
 Create a new list containing the elements of this list followed by the elements of the given list. More...
 
void clear ()
 Destroy the list elements. More...
 
void append (ListElement &element)
 Append an element to the list. More...
 
void prepend (ListElement &element)
 Prepend an element to the list. More...
 
void insert (ListElement *at, ListElement &element)
 Insert an element at the given list position. More...
 
void remove (ListElement *element)
 Remove the given element from the list. More...
 
void kill (ListElement *from, ListElement *to=(ListElement *) 0)
 Remove and destroy all elements between the given list elements. More...
 
void cut (List &out, ListElement *from, ListElement *to=(ListElement *) 0)
 Cut all elements between the given list elements. More...
 
List * copy (ListElement *from=(ListElement *) 0, ListElement *to=(ListElement *) 0)
 Copy all elements between the given list elements. More...
 
void paste (ListElement *at, const List &l)
 Insert copies of the elements of the given list at the given list position. More...
 
void paste_before (ListElement *at, const List &l)
 Insert copies of the elements of the given list before the given list position. More...
 
void move (ListElement *at, List &l)
 Insert the elements of the given list at the given list position. More...
 
void move_before (ListElement *at, List &l)
 Insert the elements of the given list before the given list position. More...
 
bool empty () const
 Check if the list is empty. More...
 
const ListElement * first () const
 Get the first element in the list. More...
 
const ListElement * last () const
 Get the last element in the list. More...
 
const ListElement * next (const ListElement *element) const
 Get the next element of the given element. More...
 
const ListElement * prev (const ListElement *element) const
 Get the previous element of the given element. More...
 
- Public Member Functions inherited from Puma::Printable
virtual ~Printable ()
 Destructor. More...
 

Static Public Member Functions

static char * absolutePath (const char *)
 
static char * resolvePath (const char *)
 

Constructor & Destructor Documentation

Puma::FileUnit::FileUnit ( )
inline
Puma::FileUnit::FileUnit ( Unit &  unit)
inline
Puma::FileUnit::FileUnit ( const List &  list)
inline
Puma::FileUnit::~FileUnit ( )
inlinevirtual

Member Function Documentation

char * Puma::FileUnit::absolutePath ( ) const
inline
static char* Puma::FileUnit::absolutePath ( const char *  )
static
bool Puma::FileUnit::belongsTo ( Project &  )
bool Puma::FileUnit::isFile ( ) const
inlinevirtual

Check if this is a unit for a file.

Reimplemented from Puma::Unit.

char * Puma::FileUnit::lastLocation ( ) const
inline
virtual void Puma::FileUnit::name ( const char *  name)
virtual

Set the name of the unit (usually the file name).

Parameters
nameThe name.

Reimplemented from Puma::Unit.

static char* Puma::FileUnit::resolvePath ( const char *  )
static
void Puma::FileUnit::setLocation ( const char *  )



Puma Reference Manual. Created on Fri Aug 28 2015.