Update release

This commit is contained in:
Zihan Chen
2017-04-11 08:06:36 -07:00
parent 090085783a
commit dfc1b13f9c
10 changed files with 792 additions and 637 deletions
+13 -27
View File
@@ -35961,6 +35961,7 @@ GuiTableComposition
if (previousContentBounds != result || cellMinSizeModified)
{
previousContentBounds = result;
UpdateCellBounds();
InvokeOnCompositionStateChanged();
}
@@ -44009,48 +44010,31 @@ namespace vl
using namespace parsing::json;
using namespace regex;
using namespace stream;
using namespace filesystem;
WString GetFolderPath(const WString& filePath)
{
for (vint i = filePath.Length() - 1; i >= 0; i--)
auto path = FilePath(filePath).GetFolder().GetFullPath();
if (path != L"")
{
if (filePath[i] == L'\\' || filePath[i] == L'/')
if (path[path.Length() - 1] != FilePath::Delimiter)
{
return filePath.Sub(0, i + 1);
path += FilePath::Delimiter;
}
}
return L"";
return path;
}
WString GetFileName(const WString& filePath)
{
for (vint i = filePath.Length() - 1; i >= 0; i--)
{
if (filePath[i] == L'\\' || filePath[i] == L'/')
{
return filePath.Sub(i + 1, filePath.Length() - i - 1);
}
}
return filePath;
return FilePath(filePath).GetName();
}
bool LoadTextFile(const WString& filePath, WString& text)
{
stream::FileStream fileStream(filePath, stream::FileStream::ReadOnly);
return LoadTextFromStream(fileStream, text);
}
bool LoadTextFromStream(stream::IStream& stream, WString& text)
{
if (stream.IsAvailable())
{
stream::BomDecoder decoder;
stream::DecoderStream decoderStream(stream, decoder);
stream::StreamReader reader(decoderStream);
text = reader.ReadToEnd();
return true;
}
return false;
BomEncoder::Encoding encoding;
bool bom;
return File(filePath).ReadAllTextWithEncodingTesting(text, encoding, bom);
}
bool IsResourceUrl(const WString& text, WString& protocol, WString& path)
@@ -44120,6 +44104,7 @@ GlobalStringKey
***********************************************************************/
GlobalStringKey GlobalStringKey::Empty;
GlobalStringKey GlobalStringKey::_InferType;
GlobalStringKey GlobalStringKey::_Set;
GlobalStringKey GlobalStringKey::_Ref;
GlobalStringKey GlobalStringKey::_Bind;
@@ -44138,6 +44123,7 @@ GlobalStringKey
void InitializeConstants()
{
GlobalStringKey::_Set = GlobalStringKey::Get(L"set");
GlobalStringKey::_InferType = GlobalStringKey::Get(L"_");
GlobalStringKey::_Ref = GlobalStringKey::Get(L"ref");
GlobalStringKey::_Bind = GlobalStringKey::Get(L"bind");
GlobalStringKey::_Format = GlobalStringKey::Get(L"format");
+1 -5
View File
@@ -3281,11 +3281,6 @@ Helper Functions
/// <param name="filePath">The text file path.</param>
/// <param name="text">The text file content, if succeeded.</param>
extern bool LoadTextFile(const WString& filePath, WString& text);
/// <summary>Load the text from a stream.</summary>
/// <returns>Returns true if the operation succeeded.</returns>
/// <param name="stream">The stream containing text.</param>
/// <param name="text">The text file content, if succeeded.</param>
extern bool LoadTextFromStream(stream::IStream& stream, WString& text);
/// <summary>Test is a text a resource url and extract the protocol and the path.</summary>
/// <returns>Returns true if the text is a resource url.</returns>
/// <param name="text">The text.</param>
@@ -3304,6 +3299,7 @@ Global String Key
{
public:
static GlobalStringKey Empty;
static GlobalStringKey _InferType;
static GlobalStringKey _Set;
static GlobalStringKey _Ref;
static GlobalStringKey _Bind;
+367 -302
View File
File diff suppressed because one or more lines are too long
+36 -12
View File
@@ -9,18 +9,18 @@ DEVELOPER: Zihan Chen(vczh)
#include "GacUIReflection.h"
/***********************************************************************
INSTANCEQUERY\GUIINSTANCEQUERY_PARSER.H
INSTANCEQUERY\GUIINSTANCEQUERY_AST.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
Parser::GuiInstanceQuery_Parser
Parser::GuiInstanceQuery_Parser.parser.txt
This file is generated by: Vczh Parser Generator
***********************************************************************/
#ifndef VCZH_PRESENTATION_REFLECTION_INSTANCEQUERY_GUIINSTANCEQUERY_PARSER
#define VCZH_PRESENTATION_REFLECTION_INSTANCEQUERY_GUIINSTANCEQUERY_PARSER
#ifndef VCZH_PRESENTATION_REFLECTION_INSTANCEQUERY_GUIINSTANCEQUERY_PARSER_AST
#define VCZH_PRESENTATION_REFLECTION_INSTANCEQUERY_GUIINSTANCEQUERY_PARSER_AST
namespace vl
@@ -122,14 +122,6 @@ namespace vl
static vl::Ptr<GuiIqSetQuery> Convert(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens);
};
extern vl::WString GuiIqGetParserTextBuffer();
extern vl::Ptr<vl::parsing::ParsingTreeCustomBase> GuiIqConvertParsingTreeNode(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens);
extern vl::Ptr<vl::parsing::tabling::ParsingTable> GuiIqLoadTable();
extern vl::Ptr<vl::parsing::ParsingTreeNode> GuiIqParseAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
extern vl::Ptr<vl::parsing::ParsingTreeNode> GuiIqParseAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
extern vl::Ptr<GuiIqQuery> GuiIqParse(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
extern vl::Ptr<GuiIqQuery> GuiIqParse(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
}
}
namespace vl
@@ -173,6 +165,37 @@ namespace vl
}
#endif
/***********************************************************************
INSTANCEQUERY\GUIINSTANCEQUERY_PARSER.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
Parser::GuiInstanceQuery_Parser.parser.txt
This file is generated by: Vczh Parser Generator
***********************************************************************/
#ifndef VCZH_PRESENTATION_REFLECTION_INSTANCEQUERY_GUIINSTANCEQUERY_PARSER_PARSER
#define VCZH_PRESENTATION_REFLECTION_INSTANCEQUERY_GUIINSTANCEQUERY_PARSER_PARSER
namespace vl
{
namespace presentation
{
extern vl::WString GuiIqGetParserTextBuffer();
extern vl::Ptr<vl::parsing::ParsingTreeCustomBase> GuiIqConvertParsingTreeNode(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens);
extern vl::Ptr<vl::parsing::tabling::ParsingTable> GuiIqLoadTable();
extern vl::Ptr<vl::parsing::ParsingTreeNode> GuiIqParseAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
extern vl::Ptr<vl::parsing::ParsingTreeNode> GuiIqParseAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
extern vl::Ptr<GuiIqQuery> GuiIqParse(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
extern vl::Ptr<GuiIqQuery> GuiIqParse(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
}
}
#endif
/***********************************************************************
GUIINSTANCEREPRESENTATION.H
***********************************************************************/
@@ -804,6 +827,7 @@ WorkflowCompiler (Compile)
}
};
extern bool Workflow_GetPropertyTypes(WString& errorPrefix, types::ResolvingResult& resolvingResult, IGuiInstanceLoader* loader, IGuiInstanceLoader::TypeInfo resolvedTypeInfo, GlobalStringKey prop, Ptr<GuiAttSetterRepr::SetterValue> setter, collections::List<types::PropertyResolving>& possibleInfos, GuiResourceError::List& errors);
extern description::ITypeDescriptor* Workflow_CollectReferences(GuiResourcePrecompileContext& precompileContext, types::ResolvingResult& resolvingResult, GuiResourceError::List& errors);
extern void Workflow_GenerateCreating(GuiResourcePrecompileContext& precompileContext, types::ResolvingResult& resolvingResult, Ptr<workflow::WfBlockStatement> statements, GuiResourceError::List& errors);
extern void Workflow_GenerateBindings(GuiResourcePrecompileContext& precompileContext, types::ResolvingResult& resolvingResult, Ptr<workflow::WfBlockStatement> statements, GuiResourceError::List& errors);
+208 -131
View File
File diff suppressed because one or more lines are too long
+10 -3
View File
@@ -17648,17 +17648,24 @@ namespace vl
/// <returns>The file path.</returns>
const FilePath& GetFilePath()const;
/// <summary>Get the content of the file as text with encoding testing.</summary>
/// <returns>The content of the file.</returns>
/// <returns>Returns false if this operation succeeded.</returns>
/// <param name="text">The content of the file.</param>
/// <param name="encoding">The encoding.</param>
/// <param name="bom">True if there is BOM.</param>
bool ReadAllTextWithEncodingTesting(WString& text, stream::BomEncoder::Encoding& encoding, bool& containsBom);
/// <summary>Get the content of the file as text.</summary>
/// <returns>The content of the file.</returns>
WString ReadAllText()const;
WString ReadAllTextByBom()const;
/// <summary>Get the content of the file as text.</summary>
/// <returns>Returns false if this operation succeeded.</returns>
/// <param name="text">The content of the file.</param>
bool ReadAllText(WString& text)const;
bool ReadAllTextByBom(WString& text)const;
/// <summary>Get the content of the file as text.</summary>
/// <returns>Returns false if this operation succeeded.</returns>
/// <param name="lines">The content of the file.</param>
bool ReadAllLines(collections::List<WString>& lines)const;
bool ReadAllLinesByBom(collections::List<WString>& lines)const;
/// <summary>Write text to the file.</summary>
/// <returns>Returns false if this operation succeeded.</returns>
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.