Fabrique

A build language for complex systems

 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
fabrique::FileType Class Reference

A type that represents an ordered sequence. More...

#include <FileType.h>

Inheritance diagram for fabrique::FileType:
fabrique::Type fabrique::Printable fabrique::Uncopyable

Public Member Functions

virtual TypeMap fields () const override
 The fields that objects of this type have. More...
 
FileTypeWithArguments (const TypeMap &) const
 
virtual bool hasFields () const override
 
virtual bool isSubtype (const Type &) const override
 
virtual bool isFile () const override
 
virtual bool isInputFile () const
 
virtual bool isOutputFile () const
 
virtual const TypeonAddTo (const Type &) const override
 
virtual const TypeonPrefixWith (const Type &) const override
 
- Public Member Functions inherited from fabrique::Type
 Type (std::weak_ptr< Type > parent)=delete
 
TypeContextcontext () const
 
virtual const std::string name () const
 
virtual void PrettyPrint (Bytestream &, size_t indent=0) const override
 Print a human-readable representation to an output stream and return that output stream.
 
bool operator== (const Type &) const
 
bool operator!= (const Type &t) const
 
const PtrVec< Type > & typeParameters () const
 
size_t typeParamCount () const
 
const Typeoperator[] (size_t i) const
 
const TypeMap (TypesMapper, const SourceRange &) const
 
virtual bool isSupertype (const Type &) const
 
 operator bool () const
 
virtual bool valid () const
 
virtual bool isFunction () const
 
virtual bool isString () const
 
virtual bool isOptional () const
 
virtual bool isOrdered () const
 
virtual bool canBeNegated () const
 
- Public Member Functions inherited from fabrique::Printable
 Printable (const Printable &)
 
Printableoperator= (const Printable &)
 
virtual std::string str () const
 

Static Public Member Functions

static bool isInput (const Type &)
 
static bool isOutput (const Type &)
 
static bool isFileOrFiles (const Type &)
 
static void CheckFileTags (const Type &, SourceRange)
 
- Static Public Member Functions inherited from fabrique::Type
static const TypeGetSupertype (const Type &, const Type &)
 
static const TypeListOf (const Type &, const SourceRange &)
 
static std::string UntypedPart (std::string typedName)
 

Protected Member Functions

virtual TypeParameterise (const PtrVec< Type > &, const SourceRange &) const override
 
- Protected Member Functions inherited from fabrique::Type
 Type (const std::string &, const PtrVec< Type > &params, TypeContext &)
 

Friends

class TypeContext
 

Additional Inherited Members

- Public Types inherited from fabrique::Type
typedef std::pair< std::string,
const Type & > 
NamedType
 
typedef std::vector< NamedType > NamedTypeVec
 
typedef StringMap< const Type & > TypeMap
 
typedef std::function< PtrVec
< Type >const PtrVec< Type > &)> 
TypesMapper
 

Detailed Description

A type that represents an ordered sequence.

Definition at line 45 of file FileType.h.

Member Function Documentation

FileType::TypeMap FileType::fields ( ) const
overridevirtual

The fields that objects of this type have.

This can be empty even if hasFields() is true: objects like this one might not happen to have fields while still being the kind of objects that, in general, do (e.g., a struct like args with no members).

Reimplemented from fabrique::Type.

Definition at line 95 of file FileType.cc.

References fabrique::TypeContext::booleanType(), fabrique::TypeContext::fileType(), and fabrique::TypeContext::stringType().

const Type & FileType::onAddTo ( const Type t) const
overridevirtual

We can add strings to files, creating files with longer names.

We can also concatenate filenames together.

Reimplemented from fabrique::Type.

Definition at line 162 of file FileType.cc.

References fabrique::TypeContext::nilType().

const Type & FileType::onPrefixWith ( const Type t) const
overridevirtual

! We can also prefix files with strings. This modifies the filename, but not the subdir or {src|build}root directories.

Reimplemented from fabrique::Type.

Definition at line 176 of file FileType.cc.

References fabrique::TypeContext::nilType().


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