Example: Changed glyph-outline.shape for use with FontConfig.
[shapes.git] / source / shapescore.h
blob6c8687aca8ceeb69524da728c88a977e463d24a6
1 /* This file is part of Shapes.
3 * Shapes is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * any later version.
8 * Shapes is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with Shapes. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright 2008, 2010 Henrik Tidefelt
19 #pragma once
21 #include <list>
22 #include <iostream>
23 #include <string>
25 #include "refcount.h"
26 #include "shapestypes.h"
29 namespace Shapes
31 namespace Lang
34 class CoreFunction : public Lang::Function
36 protected:
37 const char * title_;
38 public:
39 CoreFunction( const char * title );
40 CoreFunction( const char * title, Kernel::EvaluatedFormals * formals );
41 virtual void analyze_impl( Ast::Node * parent, Ast::AnalysisEnvironment * env, Ast::StateIDSet * freeStatesDst );
42 virtual bool isTransforming( ) const;
43 const char * getTitle( ) const;
44 virtual void show( std::ostream & os ) const;
45 virtual void gcMark( Kernel::GCMarkedSet & marked ){ };
49 /* This core function is declared here so that its static member function can be used from other files than coreconstruct.cc. */
50 class Core_range : public Lang::CoreFunction
52 public:
53 Core_range( const char * title );
54 virtual void call( Kernel::EvalState * evalState, Kernel::Arguments & args, const Ast::SourceLocation & callLoc ) const;
55 static void makeRange( const char * title, Kernel::EvalState * evalState, Kernel::Arguments & args, const Ast::SourceLocation & callLoc, bool isSpan = false, RefCountPtr< const Lang::Value > last = RefCountPtr< const Lang::Value >( NullPtr< const Lang::Value >( ) ) );